run-in-py-utils-bt2-env.sh: use `[[ ... ]]` instead of `[` or `test`
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 10 Nov 2023 14:19:17 +0000 (09:19 -0500)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Wed, 7 Feb 2024 21:25:56 +0000 (16:25 -0500)
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

tests/utils/run-in-py-env.sh

index 6f197d734da8a96e3a0dcf9810c886e2b130a2f0..86d5eeb28d5b00d1a75a01ff67b7129abb1dced7 100755 (executable)
@@ -5,7 +5,7 @@
 # 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"
@@ -25,13 +25,13 @@ usage() {
        echo "environment variable to the built \`tests\` directory."
 }
 
-if [ -z "$*" ]; then
+if [[ -z "$*" ]]; then
        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).
 
This page took 0.026496 seconds and 4 git commands to generate.