3 # SPDX-License-Identifier: MIT
5 # SPDX-FileCopyrightText: 2020 Michael Jeanson <mjeanson@efficios.com>
8 # This file is meant to be sourced at the start of shell script-based tests.
11 # Error out when encountering an undefined variable
14 # If "readlink -f" is available, get a resolved absolute path to the
15 # tests source dir, otherwise make do with a relative path.
16 scriptdir
="$(dirname "${BASH_SOURCE[0]}")"
17 if readlink
-f "." >/dev
/null
2>&1; then
18 testsdir
=$
(readlink
-f "$scriptdir/..")
20 testsdir
="$scriptdir/.."
23 # Allow overriding the source and build directories
24 if [ "x${RSEQ_TESTS_SRCDIR:-}" = "x" ]; then
25 RSEQ_TESTS_SRCDIR
="$testsdir"
27 export RSEQ_TESTS_SRCDIR
29 if [ "x${RSEQ_TESTS_BUILDDIR:-}" = "x" ]; then
30 RSEQ_TESTS_BUILDDIR
="$testsdir"
32 export RSEQ_TESTS_BUILDDIR
34 # By default, it will not source tap.sh. If you to tap output directly from
35 # the test script, define the 'SH_TAP' variable to '1' before sourcing this
37 if [ "x${SH_TAP:-}" = x1
]; then
38 # shellcheck source=./tap.sh
39 .
"${RSEQ_TESTS_SRCDIR}/utils/tap.sh"
This page took 0.060415 seconds and 4 git commands to generate.