From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Cc: Derrick Stolee <stolee@gmail.com>,
Eric Sunshine <sunshine@sunshineco.com>
Subject: [PATCH] do not set GIT_TEST_MAINT_SCHEDULER where it does not matter
Date: Thu, 28 Mar 2024 17:51:07 -0700 [thread overview]
Message-ID: <xmqqmsqhsvwk.fsf@gitster.g> (raw)
31345d55 (maintenance: extract platform-specific scheduling,
2020-11-24) added code to t/test-lib.sh for everybody to set
GIT_TEST_MAINT_SCHEDULER to a "safe" value and instructed the test
writers to set the variable locally when their test wants to check
the scheduler integration.
But it did so without "export GIT_TEST_MAINT_SCHEDULER", so the
setting does not seem to have any effect anyway. Instead of setting
it to a "safe" value, just unset it.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
* t7900 (maintenance) uses many tests that does one-shot export of
the variable, and one test that sets the value to its safe
"failure" value and exports it at the end.
t9210 (scaler) sets up a safe fake scheduler and exports it
before doing any of its tests.
Nobody else that includes t/test-lib.sh mentions this variable.
t/test-lib.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git c/t/test-lib.sh w/t/test-lib.sh
index c8af8dab79..48345864f4 100644
--- c/t/test-lib.sh
+++ w/t/test-lib.sh
@@ -1959,9 +1959,9 @@ test_lazy_prereq DEFAULT_REPO_FORMAT '
# Ensure that no test accidentally triggers a Git command
# that runs the actual maintenance scheduler, affecting a user's
# system permanently.
-# Tests that verify the scheduler integration must set this locally
-# to avoid errors.
-GIT_TEST_MAINT_SCHEDULER="none:exit 1"
+# Tests that verify the scheduler integration must set and
+# export this variable locally.
+sane_unset GIT_TEST_MAINT_SCHEDULER
# Does this platform support `git fsmonitor--daemon`
#
next reply other threads:[~2024-03-29 0:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-29 0:51 Junio C Hamano [this message]
2024-03-29 2:43 ` [PATCH] do not set GIT_TEST_MAINT_SCHEDULER where it does not matter Eric Sunshine
2024-03-29 5:38 ` Junio C Hamano
2024-03-29 22:27 ` [PATCH] test-lib: fix non-functioning GIT_TEST_MAINT_SCHEDULER fallback Eric Sunshine
2024-03-31 6:51 ` Eric Sunshine
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqmsqhsvwk.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=stolee@gmail.com \
--cc=sunshine@sunshineco.com \
/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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.