Skip to content

Commit 41eae3e

Browse files
committed
Merge branch 'cb/t0000-use-the-configured-shell'
The basic test did not honor $TEST_SHELL_PATH setting, which has been corrected. * cb/t0000-use-the-configured-shell: t/t0000-basic: make sure subtests also use TEST_SHELL_PATH
2 parents 37b48f0 + 0555e4a commit 41eae3e

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
@@ -77,9 +77,7 @@ _run_sub_test_lib_test_common () {
7777
# the sub-test.
7878
sane_unset HARNESS_ACTIVE &&
7979
cd "$name" &&
80-
cat >"$name.sh" <<-EOF &&
81-
#!$SHELL_PATH
82-
80+
write_script "$name.sh" "$TEST_SHELL_PATH" <<-EOF &&
8381
test_description='$descr (run in sub test-lib)
8482
8583
This is run in a sub test-lib so that we do not get incorrect
@@ -94,7 +92,6 @@ _run_sub_test_lib_test_common () {
9492
. "\$TEST_DIRECTORY"/test-lib.sh
9593
EOF
9694
cat >>"$name.sh" &&
97-
chmod +x "$name.sh" &&
9895
export TEST_DIRECTORY &&
9996
TEST_OUTPUT_DIRECTORY=$(pwd) &&
10097
export TEST_OUTPUT_DIRECTORY &&
@@ -103,7 +100,7 @@ _run_sub_test_lib_test_common () {
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)