For the same reason we're using this form in `utils.sh` (see
"tests/utils/utils.sh: use `[[ ... ]]` instead of `[` or `test`").
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I9284cff1dc7d64cfbcf2ad56e6a3d2bd3652fb6e
# Copyright (C) 2017-2023 Philippe Proulx <pproulx@efficios.com>
# Copyright (C) 2019 Simon Marchi <simon.marchi@efficios.com>
# Copyright (C) 2017-2023 Philippe Proulx <pproulx@efficios.com>
# Copyright (C) 2019 Simon Marchi <simon.marchi@efficios.com>
-if [ -n "${BT_TESTS_SRCDIR:-}" ]; then
+if [[ -n "${BT_TESTS_SRCDIR:-}" ]]; then
UTILSSH="$BT_TESTS_SRCDIR/utils/utils.sh"
else
UTILSSH="$(dirname "$0")/../utils/utils.sh"
UTILSSH="$BT_TESTS_SRCDIR/utils/utils.sh"
else
UTILSSH="$(dirname "$0")/../utils/utils.sh"
echo "environment variable to the built \`tests\` directory."
}
echo "environment variable to the built \`tests\` directory."
}
usage
exit 1
fi
# Sanity check that the BT_TESTS_BUILDDIR value makes sense.
usage
exit 1
fi
# Sanity check that the BT_TESTS_BUILDDIR value makes sense.
-if [ ! -f "$BT_TESTS_BUILDDIR/Makefile" ]; then
+if [[ ! -f "$BT_TESTS_BUILDDIR/Makefile" ]]; then
fold -w 80 -s <<- END
$0: BT_TESTS_BUILDDIR does not point to a valid directory (\`$BT_TESTS_BUILDDIR/Makefile\` does not exist).
fold -w 80 -s <<- END
$0: BT_TESTS_BUILDDIR does not point to a valid directory (\`$BT_TESTS_BUILDDIR/Makefile\` does not exist).