{"thread":{"id":"53418","subject":"[PATCH] t/t0000-basic: make sure subtests also use TEST_SHELL_PATH","startedAt":"2020-05-07T01:07:58Z","lastAt":"2020-05-07T11:39:37Z","messageCount":2,"participants":["Carlo Marcelo Arenas Belón","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"397252","messageId":"20200507010746.83418-1-carenas@gmail.com","threadId":"53418","inReplyTo":null,"subject":"[PATCH] t/t0000-basic: make sure subtests also use TEST_SHELL_PATH","fromName":"Carlo Marcelo Arenas Belón","fromEmail":"carenas@gmail.com","sentAt":"2020-05-07T01:07:46Z","receivedAt":"2020-05-07T01:07:58Z","isPatch":true,"sender":{"key":"carenas@gmail.com","avatar":"https://avatars.githubusercontent.com/u/76036?v=4"},"body":"3f824e91c8 (t/Makefile: introduce TEST_SHELL_PATH, 2017-12-08) allows for\nsetting a shell for running the tests, but the generated subtests weren't\nupdated.\n\nCorrect that and while at it update it to use write_script.\n\nSigned-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>\n---\n t/t0000-basic.sh | 7 ++-----\n 1 file changed, 2 insertions(+), 5 deletions(-)\n\ndiff --git a/t/t0000-basic.sh b/t/t0000-basic.sh\nindex 3e440c078d..272f75ce63 100755\n--- a/t/t0000-basic.sh\n+++ b/t/t0000-basic.sh\n@@ -77,9 +77,7 @@ _run_sub_test_lib_test_common () {\n \t\t# the sub-test.\n \t\tsane_unset HARNESS_ACTIVE &&\n \t\tcd \"$name\" &&\n-\t\tcat >\"$name.sh\" <<-EOF &&\n-\t\t#!$SHELL_PATH\n-\n+\t\twrite_script \"$name.sh\" \"$TEST_SHELL_PATH\" <<-EOF &&\n \t\ttest_description='$descr (run in sub test-lib)\n \n \t\tThis is run in a sub test-lib so that we do not get incorrect\n@@ -94,7 +92,6 @@ _run_sub_test_lib_test_common () {\n \t\t. \"\\$TEST_DIRECTORY\"/test-lib.sh\n \t\tEOF\n \t\tcat >>\"$name.sh\" &&\n-\t\tchmod +x \"$name.sh\" &&\n \t\texport TEST_DIRECTORY &&\n \t\tTEST_OUTPUT_DIRECTORY=$(pwd) &&\n \t\texport TEST_OUTPUT_DIRECTORY &&\n@@ -102,7 +99,7 @@ _run_sub_test_lib_test_common () {\n \t\tthen\n \t\t\t./\"$name.sh\" \"$@\" >out 2>err\n \t\telse\n-\t\t\t!  ./\"$name.sh\" \"$@\" >out 2>err\n+\t\t\t! ./\"$name.sh\" \"$@\" >out 2>err\n \t\tfi\n \t)\n }\n-- \n2.26.2.686.gfaf46a9ccd\n\n"},{"id":"397283","messageId":"20200507113935.GB3027470@coredump.intra.peff.net","threadId":"53418","inReplyTo":"20200507010746.83418-1-carenas@gmail.com","subject":"Re: [PATCH] t/t0000-basic: make sure subtests also use TEST_SHELL_PATH","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2020-05-07T11:39:35Z","receivedAt":"2020-05-07T11:39:37Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, May 06, 2020 at 06:07:46PM -0700, Carlo Marcelo Arenas Belón wrote:\n\n> 3f824e91c8 (t/Makefile: introduce TEST_SHELL_PATH, 2017-12-08) allows for\n> setting a shell for running the tests, but the generated subtests weren't\n> updated.\n\nYeah, this makes sense. The primary benefit of $TEST_SHELL_PATH was to\nget better support for special testing options (like using bash's\ntrace_fd with \"-x\"). But based on recent patches I guess you were\nwanting to test the behavior of an unusual shell. And if we're testing\nhow the test framework runs, certainly using TEST_SHELL_PATH is the most\nsensible thing.\n\n-Peff\n"}]}