]> git.notmuchmail.org Git - notmuch/commitdiff
test: test-lib.sh: use $BASH instead of ${SHELL-sh} to relaunch
authorTomi Ollila <tomi.ollila@iki.fi>
Sat, 24 Sep 2016 12:43:27 +0000 (15:43 +0300)
committerDavid Bremner <david@tethera.net>
Sat, 24 Sep 2016 13:10:40 +0000 (10:10 -0300)
In case of the test script is to be relaunced under valgrind, or --tee
is requested, use the $BASH shell variable to locate the command
interpreter. The $SHELL variable is re-set by non-interactive shells
so in case the shell uses some other shell (e.g. zsh) for interactive
use these bash scripts continue to work.

test/test-lib.sh

index e2e26e6f274a1260ac570b09cd92f27ae90f1478..bda8a80a54988c9b80c8e8be71185591cef98aa0 100644 (file)
@@ -39,7 +39,7 @@ done,*)
 *' --tee '*|*' --va'*)
        mkdir -p test-results
        BASE=test-results/$this_test
-       (GIT_TEST_TEE_STARTED=done ${SHELL-sh} "$0" "$@" 2>&1;
+       (GIT_TEST_TEE_STARTED=done "$BASH" "$0" "$@" 2>&1;
         echo $? > $BASE.exit) | tee $BASE.out
        test "$(cat $BASE.exit)" = 0
        exit