From: "Carlo Marcelo Arenas Belón" <carenas@gmail.com>
To: git@vger.kernel.org
Cc: peff@peff.net, gitster@pobox.com,
"Carlo Marcelo Arenas Belón" <carenas@gmail.com>
Subject: [PATCH] t/t0000-basic: make sure subtests also use TEST_SHELL_PATH
Date: Wed, 6 May 2020 18:07:46 -0700 [thread overview]
Message-ID: <20200507010746.83418-1-carenas@gmail.com> (raw)
3f824e91c8 (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 <carenas@gmail.com>
---
t/t0000-basic.sh | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/t/t0000-basic.sh b/t/t0000-basic.sh
index 3e440c078d..272f75ce63 100755
--- a/t/t0000-basic.sh
+++ b/t/t0000-basic.sh
@@ -77,9 +77,7 @@ _run_sub_test_lib_test_common () {
# the sub-test.
sane_unset HARNESS_ACTIVE &&
cd "$name" &&
- cat >"$name.sh" <<-EOF &&
- #!$SHELL_PATH
-
+ write_script "$name.sh" "$TEST_SHELL_PATH" <<-EOF &&
test_description='$descr (run in sub test-lib)
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 () {
. "\$TEST_DIRECTORY"/test-lib.sh
EOF
cat >>"$name.sh" &&
- chmod +x "$name.sh" &&
export TEST_DIRECTORY &&
TEST_OUTPUT_DIRECTORY=$(pwd) &&
export TEST_OUTPUT_DIRECTORY &&
@@ -102,7 +99,7 @@ _run_sub_test_lib_test_common () {
then
./"$name.sh" "$@" >out 2>err
else
- ! ./"$name.sh" "$@" >out 2>err
+ ! ./"$name.sh" "$@" >out 2>err
fi
)
}
--
2.26.2.686.gfaf46a9ccd
next reply other threads:[~2020-05-07 1:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-07 1:07 Carlo Marcelo Arenas Belón [this message]
2020-05-07 11:39 ` [PATCH] t/t0000-basic: make sure subtests also use TEST_SHELL_PATH Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200507010746.83418-1-carenas@gmail.com \
--to=carenas@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).