From d32c35244ae5484ff643d60a84577554e03ebdc6 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Fri, 20 May 2022 11:48:26 -0400 Subject: Makefile: Add a BUILDDIR variable for out-of-tree builds bfs can now be built from a read-only source tree. --- tests/tests.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tests') 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" -- cgit v1.2.3