diff options
author | Josh Steadmon <steadmon@google.com> | 2024-05-06 12:57:32 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-05-06 14:06:34 -0700 |
commit | 22f0df7a093182eeaf5e6da957d20ae8b858679f (patch) | |
tree | 081c1d208f0503b711ee9432c0d08eed6fc522ba /builtin/commit.c | |
parent | 80bb227e41f462bb04f07991cb2bb531453820a5 (diff) |
test-tool run-command testsuite: get shell from env
When running tests through `test-tool run-command testsuite`, we
currently hardcode `sh` as the command interpreter. As discussed in [1],
this is incorrect, and we should be using the shell set in
TEST_SHELL_PATH instead.
Add a shell_path field in struct testsuite so that we can pass this to
the task runner callback. If this is non-null, we'll use it as the
argv[0] of the subprocess. Otherwise, we'll just execute the test
program directly. We will use this feature in a later commit to enable
running binary executable unit tests.
However, for now when setting up the struct testsuite in testsuite(),
use the value of TEST_SHELL_PATH if it's set, otherwise keep the
original behavior by defaulting to `sh`.
[1] https://lore.kernel.org/git/20240123005913.GB835964@coredump.intra.peff.net/
Signed-off-by: Josh Steadmon <steadmon@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
0 files changed, 0 insertions, 0 deletions