cefb782c1d2aef4207dcbda646d45375708dbfa1
3 # SPDX-License-Identifier: GPL-2.0-only
5 # Copyright (c) 2019 Michael Jeanson <mjeanson@efficios.com>
6 # Copyright (C) 2019 Philippe Proulx <pproulx@efficios.com>
9 # This file is meant to be sourced at the start of shell script-based tests.
12 # Error out when encountering an undefined variable
15 # If "readlink -f" is available, get a resolved absolute path to the
16 # tests source dir, otherwise make do with a relative path.
17 scriptdir
="$(dirname "${BASH_SOURCE[0]}")"
18 if readlink
-f "." >/dev
/null
2>&1; then
19 testsdir
=$
(readlink
-f "$scriptdir/..")
21 testsdir
="$scriptdir/.."
24 # Allow overriding the source and build directories
25 if [ "x${UST_TESTS_SRCDIR:-}" = "x" ]; then
26 UST_TESTS_SRCDIR
="$testsdir"
28 export UST_TESTS_SRCDIR
30 if [ "x${UST_TESTS_BUILDDIR:-}" = "x" ]; then
31 UST_TESTS_BUILDDIR
="$testsdir"
33 export UST_TESTS_BUILDDIR
This page took 0.05402 seconds and 3 git commands to generate.