From: Jens Lehmann <Jens.Lehmann@web.de>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Junio C Hamano <gitster@pobox.com>,
Git Mailing List <git@vger.kernel.org>
Subject: [PATCH v2] tests: fix overeager scrubbing of environment variables
Date: Mon, 28 Mar 2011 00:26:29 +0200 [thread overview]
Message-ID: <4D8FB995.20001@web.de> (raw)
In-Reply-To: <20110327213756.GD25927@elie>
In commit 95a1d12e9b9f ("tests: scrub environment of GIT_* variables") all
environment variables starting with "GIT_" were unset for the tests using
a perl script rather than unsetting them one by one. Only three exceptions
were made to make them work as before: "GIT_TRACE*", "GIT_DEBUG*" and
"GIT_USE_LOOKUP".
Unfortunately some environment variables used by the test framework itself
were not added to the exceptions and thus stopped working when given
before the make command instead of after it. Those are:
- GIT_NOTES_TIMING_TESTS
- GIT_PATCHID_TIMING_TESTS
- GIT_PROVE_OPTS
- GIT_REMOTE_SVN_TEST_BIG_FILES
- GIT_SKIP_TESTS
- GIT_TEST*
- GIT_VALGRIND_OPTIONS
I noticed that when skipping a test the way I was used to suddenly failed:
GIT_SKIP_TESTS='t1234' GIT_TEST_OPTS='--root=/dev/shm' make -j10 test
This should work according to t/README, but didn't anymore, so let's fix
that by adding them to the exception list.
Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
---
Am 27.03.2011 23:37, schrieb Jonathan Nieder:
> Jens Lehmann wrote:
>
>> - GIT_SKIP_TESTS
>> - GIT_TEST*
>> - GIT_PROVE_OPTS
>>
>> Let's fix that by adding them to the exception list.
>>
>> Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
>
> Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Thanks for your review! (I took the liberty to add your Ack to this updated
version, please speak up if you are unhappy with anything in this v2!)
> It misses a few, though:
>
> - GIT_REMOTE_SVN_TEST_BIG_FILES
> - GIT_NOTES_TIMING_TESTS
> - GIT_PATCHID_TIMING_TESTS
> - GIT_VALGRIND_OPTIONS
Right you are, this version includes those too (but - except once for
GIT_VALGRIND_OPTIONS - none of them are mentioned in t/README, that's why
I managed to miss them ... maybe they should be documented there?).
> If we were starting over I suppose those would all be GIT_TEST* but
> there's something to be said for muscle memory.
Yeah, I thought the same about GIT_SKIP_TESTS when writing the first version
of this patch ... ;-)
>> I noticed today that skipping a test the way I was used to suddenly failed:
>>
>> GIT_SKIP_TESTS='t1234' GIT_TEST_OPTS='--root=/dev/shm' make -j10 test
>>
>> This should work according to t/README, but didn't anymore.
>
> I would have just written that in the change description.
Yup, did that!
t/test-lib.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 7cc9a52..f1f6d94 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -46,7 +46,7 @@ unset VISUAL
unset EMAIL
unset $(perl -e '
my @env = keys %ENV;
- my @vars = grep(/^GIT_/ && !/^GIT_(TRACE|DEBUG|USE_LOOKUP)/, @env);
+ my @vars = grep(/^GIT_/ && !/^GIT_(TRACE|DEBUG|USE_LOOKUP|NOTES_TIMING_TESTS|PATCHID_TIMING_TESTS|PROVE_OPTS|REMOTE_SVN_TEST_BIG_FILES|SKIP_TESTS|TEST|VALGRIND_OPTIONS)/, @env);
print join("\n", @vars);
')
GIT_AUTHOR_EMAIL=author@example.com
--
1.7.4.2.407.gac78c
next prev parent reply other threads:[~2011-03-27 22:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-27 21:22 [PATCH] tests: fix overeager scrubbing of environment variables Jens Lehmann
2011-03-27 21:37 ` Jonathan Nieder
2011-03-27 22:17 ` [PATCH] squash! " Jonathan Nieder
2011-03-28 13:58 ` Jeff King
2011-03-27 22:26 ` Jens Lehmann [this message]
2011-03-27 23:00 ` [PATCH/RFC] tests: use the --long-tests facility to toggle some slow tests Jonathan Nieder
2011-03-28 17:00 ` [PATCH] tests: fix overeager scrubbing of environment variables Junio C Hamano
2011-03-28 19:16 ` [PATCH v3] " Jens Lehmann
2011-03-28 19:37 ` Jonathan Nieder
2011-03-28 21:03 ` Junio C Hamano
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=4D8FB995.20001@web.de \
--to=jens.lehmann@web.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.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 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 NNTP newsgroup(s).