diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2022-05-20 11:48:26 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2022-05-20 11:54:50 -0400 |
commit | d32c35244ae5484ff643d60a84577554e03ebdc6 (patch) | |
tree | 76928696271df8058ef881c1de86e993ce50c19f /tests/tests.sh | |
parent | bedd8f409a41bf2a2c9650eeda56effeda852817 (diff) | |
download | bfs-d32c35244ae5484ff643d60a84577554e03ebdc6.tar.xz |
Makefile: Add a BUILDDIR variable for out-of-tree builds
bfs can now be built from a read-only source tree.
Diffstat (limited to 'tests/tests.sh')
-rwxr-xr-x | tests/tests.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/tests.sh b/tests/tests.sh index 434e058..eaf5add 100755 --- a/tests/tests.sh +++ b/tests/tests.sh @@ -897,7 +897,12 @@ function _realpath() { } TESTS=$(_realpath "$(dirname -- "${BASH_SOURCE[0]}")") -BIN=$(_realpath "$TESTS/../bin") + +if [ "$BUILDDIR" ]; then + BIN=$(_realpath "$BUILDDIR/bin") +else + BIN=$(_realpath "$TESTS/../bin") +fi # Try to resolve the path to $BFS before we cd, while also supporting # --bfs="./bin/bfs -S ids" |