summaryrefslogtreecommitdiff
path: root/tests/common.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/common.sh')
-rw-r--r--tests/common.sh13
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/common.sh b/tests/common.sh
index 78512254..ed1c9f06 100644
--- a/tests/common.sh
+++ b/tests/common.sh
@@ -7,14 +7,13 @@
# Determine script directory.
SCRIPT_DIR="$(dirname "$(realpath "${BASH_SOURCE[0]}")")"
ROOT_DIR="$(dirname "${SCRIPT_DIR}")"
-SRCDIR="${SRCDIR:-${ROOT_DIR}}"
-BUILD="${BUILD:-${ROOT_DIR}/build}"
-BUILD_RUN="${BUILD_RUN:-${BUILD}}"
-SRC_RUN="${SRC_RUN:-${SRCDIR}}"
-BUILD_DIR="${BUILD}"
-BIN_DIR="${BUILD_DIR}/install_for_test/usr/bin"
+SRCDIR="${ROOT_DIR}"
+# BUILD_RUN should be supplied from the Makefile.
+# Some test scripts change the cwd so use an absolute path.
+BUILD_RUN="$(realpath "${BUILD_RUN}")"
+BIN_DIR="${BUILD_RUN}/install_for_test/usr/bin"
FUTILITY="${BIN_DIR}/futility"
-TEST_DIR="${BUILD_DIR}/tests"
+TEST_DIR="${BUILD_RUN}/tests"
TESTKEY_DIR="${SCRIPT_DIR}/testkeys"
TESTCASE_DIR="${SCRIPT_DIR}/testcases"
TESTKEY_SCRATCH_DIR="${TEST_DIR}/testkeys"