summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2017-11-06 10:46:25 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2017-11-06 10:49:38 +0000
commit2ec4203c2306b566e624499f95ac037f53ecadc8 (patch)
tree1e3c6232452fc1faaa95bea93b4b7382f007c675
parent5192c83a9ed6b42e17f199bdfcefb6b7b96e5244 (diff)
downloadbuildstream-sam/test-source-caching-fix.tar.gz
integration-tests: Fix `run-tests.sh --sources DIR` when DIR doesn't existsam/test-source-caching-fix
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-xintegration-tests/run-test.sh4
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"