+# Name of the `cc` command to use when testing, if not set
+if [[ -z ${BT_TESTS_CC_BIN:-} ]]; then
+ BT_TESTS_CC_BIN=cc
+fi
+export BT_TESTS_CC_BIN
+
+# Whether or not to enable AddressSanitizer, `0` (disabled) if not set.
+#
+# This doesn't need to be exported from the point of view of this file,
+# but the sourced `env.sh` above does export it.
+if [[ -z ${BT_TESTS_ENABLE_ASAN:-} ]]; then
+ BT_TESTS_ENABLE_ASAN=0
+fi
+
+# Directory containing test data
+BT_TESTS_DATADIR=$BT_TESTS_SRCDIR/data
+
+# Directory containing test CTF traces
+BT_CTF_TRACES_PATH=$BT_TESTS_DATADIR/ctf-traces
+
+# Source the shell TAP utilities if `SH_TAP` is `1`
+if [[ ${SH_TAP:-} == 1 ]]; then
+ # shellcheck source=./tap/tap.sh
+ . "$BT_TESTS_SRCDIR/utils/tap/tap.sh"
+fi
+
+# Removes the CR characters from the file having the path `$1`.
+#
+# This is sometimes needed on Windows with text files.
+#
+# We can't use the `--string-trailing-cr` option of `diff` because
+# Solaris doesn't have it.
+bt_remove_cr() {
+ "$BT_TESTS_SED_BIN" -i'' -e 's/\r//g' "$1"
+}