Skip to content

Commit

Permalink
testsuite: Fix sharness tests using SHELL_PATH
Browse files Browse the repository at this point in the history
Newer sharness.sh sets environment variable SHELL_PATH dependent
on default SHELL of the user.  If tests assume a certain shell
(such as bourne shell) but user's default shell is not compatible,
tests can fail.

Solve by setting individual tests to use the shell they require.

See felipec/sharness#58 for more detailed
issue description.
  • Loading branch information
chu11 committed Apr 12, 2017
1 parent 00b3eb6 commit 0e33dec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion t/t0000-sharness.t
Expand Up @@ -50,7 +50,7 @@ run_sub_test_lib_test () {
(
cd "$name" &&
cat >".$name.t" <<-EOF &&
#!$SHELL_PATH
#!/bin/sh
test_description='$descr (run in sub sharness)
Expand Down
2 changes: 1 addition & 1 deletion t/t0001-basic.t
Expand Up @@ -92,7 +92,7 @@ test_expect_success 'test_under_flux works' '
mkdir -p test-under-flux && (
cd test-under-flux &&
cat >.test.t <<-EOF &&
#!$SHELL_PATH
#!/bin/sh
pwd
test_description="test_under_flux (in sub sharness)"
. "\$SHARNESS_TEST_SRCDIR"/sharness.sh
Expand Down

0 comments on commit 0e33dec

Please sign in to comment.