aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-05-28 11:17:09 -0700
committerJunio C Hamano <gitster@pobox.com>2024-05-28 11:17:09 -0700
commitdfe42162d9bf748dcb2037d349077288ab736ad2 (patch)
tree982a87f3b67570deadbc8cf76904b4572ccf17f0
parent789ec1d91dbc662efde9b685ff88f1683d4a1ad0 (diff)
parent22f13e04146596f439bf6713f5872eec017f5438 (diff)
downloadgit-dfe42162d9bf748dcb2037d349077288ab736ad2.tar.xz
Merge branch 'jc/t0017-clarify-bogus-expectation'
Test clean-up. * jc/t0017-clarify-bogus-expectation: t0017: clarify dubious test set-up
-rwxr-xr-xt/t0017-env-helper.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/t/t0017-env-helper.sh b/t/t0017-env-helper.sh
index fc14ba091c..f3a16859cc 100755
--- a/t/t0017-env-helper.sh
+++ b/t/t0017-env-helper.sh
@@ -91,9 +91,16 @@ test_expect_success 'test-tool env-helper reads config thanks to trace2' '
git config -l 2>err &&
grep "exceeded maximum include depth" err &&
+ # This validates that the assumption that we attempt to
+ # read the configuration and fail very early in the start-up
+ # sequence (due to trace2 subsystem), even before we notice
+ # that the directory named with "test-tool -C" does not exist
+ # and die. It is a dubious thing to test, though.
test_must_fail \
env HOME="$(pwd)/home" GIT_TEST_ENV_HELPER=true \
- test-tool -C cycle env-helper --type=bool --default=0 --exit-code GIT_TEST_ENV_HELPER 2>err &&
+ test-tool -C no-such-directory \
+ env-helper --type=bool --default=0 \
+ --exit-code GIT_TEST_ENV_HELPER 2>err &&
grep "exceeded maximum include depth" err
'