diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2017-11-06 10:46:25 +0000 |
---|---|---|
committer | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2017-11-06 12:49:41 +0000 |
commit | 0f134712d3efb31cd1e3d53d464a8e66ee92a5f1 (patch) | |
tree | 06a1703643e598e06749258a9aba69394ec6f5a4 | |
parent | 165e97f7fe50675fab66490158621a60d2cdc3b7 (diff) | |
download | buildstream-0f134712d3efb31cd1e3d53d464a8e66ee92a5f1.tar.gz |
integration-tests: Fix `run-tests.sh --sources DIR` when DIR doesn't exist
We need to canonicalize the path using the `realpath -m` or
`realpath --canonicalize-missing`, otherwise if the directory doesn't
exist we get an error:
realpath: /tmp/foo/bar/: No such file or directory
The tests still work if this happens but the sources go into the
default location because the BST_SOURCE_CACHE variable goes unset.
-rwxr-xr-x | integration-tests/run-test.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/integration-tests/run-test.sh b/integration-tests/run-test.sh index c9556ebdd..17039bc99 100755 --- a/integration-tests/run-test.sh +++ b/integration-tests/run-test.sh @@ -56,10 +56,10 @@ main () { clean "$@" break ;; --sources) - export BST_SOURCE_CACHE=$(realpath "${2}") + export BST_SOURCE_CACHE=$(realpath -m "${2}") shift 2 ;; -c|--cov) - export BST_COVERAGE=$(realpath "${2}") + export BST_COVERAGE=$(realpath -m "${2}") shift 2 ;; -a|--arg) export BST_FLAGS="${BST_FLAGS:-} $2" |