Skip to content
Snippets Groups Projects
Commit 0f134712 authored by Sam Thursfield's avatar Sam Thursfield Committed by Tristan Van Berkom
Browse files

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.
parent 165e97f7
No related branches found
No related tags found
Loading
Pipeline #
......@@ -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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment