Skip to content

Commit 0555e4a

Browse files
carenasgitster
authored andcommitted
t/t0000-basic: make sure subtests also use TEST_SHELL_PATH
3f824e9 (t/Makefile: introduce TEST_SHELL_PATH, 2017-12-08) allows for setting a shell for running the tests, but the generated subtests weren't updated. Correct that and while at it update it to use write_script. Signed-off-by: Carlo Marcelo Arenas Belón <[email protected]> Acked-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 041bc65 commit 0555e4a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

t/t0000-basic.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,7 @@ _run_sub_test_lib_test_common () {
7878
# the sub-test.
7979
sane_unset HARNESS_ACTIVE &&
8080
cd "$name" &&
81-
cat >"$name.sh" <<-EOF &&
82-
#!$SHELL_PATH
83-
81+
write_script "$name.sh" "$TEST_SHELL_PATH" <<-EOF &&
8482
test_description='$descr (run in sub test-lib)
8583
8684
This is run in a sub test-lib so that we do not get incorrect
@@ -95,15 +93,14 @@ _run_sub_test_lib_test_common () {
9593
. "\$TEST_DIRECTORY"/test-lib.sh
9694
EOF
9795
cat >>"$name.sh" &&
98-
chmod +x "$name.sh" &&
9996
export TEST_DIRECTORY &&
10097
TEST_OUTPUT_DIRECTORY=$(pwd) &&
10198
export TEST_OUTPUT_DIRECTORY &&
10299
if test -z "$neg"
103100
then
104101
./"$name.sh" "$@" >out 2>err
105102
else
106-
! ./"$name.sh" "$@" >out 2>err
103+
! ./"$name.sh" "$@" >out 2>err
107104
fi
108105
)
109106
}

0 commit comments

Comments
 (0)