]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t: use `test_bool_env` to parse GIT_TEST_LONG
authorPatrick Steinhardt <ps@pks.im>
Mon, 6 Jul 2026 06:24:02 +0000 (08:24 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 6 Jul 2026 14:21:57 +0000 (07:21 -0700)
It's currently hard to explicitly disable GIT_TEST_LONG by setting it to
`false`. Fix this by using `test_bool_env` instead.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
ci/lib.sh
t/test-lib.sh

index b939110a6eefcf4c67673c047367df7241b4d8f8..01a0bc6b7557e5ca81c8e4f4428bb734154763e4 100755 (executable)
--- a/ci/lib.sh
+++ b/ci/lib.sh
@@ -321,7 +321,7 @@ export SKIP_DASHED_BUILT_INS=YesPlease
 # enable the long tests for pushes to the integration branches as well.
 case "$GITHUB_EVENT_NAME,$CI_BRANCH" in
 pull_request,*|push,*next*|push,*master*|push,*main*|push,*maint*)
-       export GIT_TEST_LONG=YesPlease
+       export GIT_TEST_LONG=true
        ;;
 esac
 
index ceefb99bff60e046f2363fcbbc65df87284f1422..623fcfb747b529142871bcbd191757c97eade9ab 100644 (file)
@@ -210,7 +210,7 @@ parse_option () {
        -i|--i|--im|--imm|--imme|--immed|--immedi|--immedia|--immediat|--immediate)
                immediate=t ;;
        -l|--l|--lo|--lon|--long|--long-|--long-t|--long-te|--long-tes|--long-test|--long-tests)
-               GIT_TEST_LONG=t; export GIT_TEST_LONG ;;
+               GIT_TEST_LONG=true; export GIT_TEST_LONG ;;
        -r)
                mark_option_requires_arg "$opt" run_list
                ;;
@@ -1849,7 +1849,7 @@ test_lazy_prereq AUTOIDENT '
 '
 
 test_lazy_prereq EXPENSIVE '
-       test -n "$GIT_TEST_LONG"
+       test_bool_env GIT_TEST_LONG false
 '
 
 test_lazy_prereq EXPENSIVE_ON_WINDOWS '