* [PATCH] tests: sanitize more git environment variables
@ 2011-01-26 20:33 Jeff King
2011-01-26 20:34 ` Jeff King
2011-01-26 20:43 ` Junio C Hamano
0 siblings, 2 replies; 4+ messages in thread
From: Jeff King @ 2011-01-26 20:33 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
These variables should generally not be set in one's
environment, but they do get set by rebase, which means
doing an interactive rebase like:
pick abcd1234 foo
exec make test
will cause false negatives in the test suite.
Signed-off-by: Jeff King <peff@peff.net>
---
t/test-lib.sh | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 42f2f14..0fdc541 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -70,6 +70,9 @@ unset GIT_NOTES_REF
unset GIT_NOTES_DISPLAY_REF
unset GIT_NOTES_REWRITE_REF
unset GIT_NOTES_REWRITE_MODE
+unset GIT_REFLOG_ACTION
+unset GIT_CHERRY_PICK_HELP
+unset GIT_QUIET
GIT_MERGE_VERBOSITY=5
export GIT_MERGE_VERBOSITY
export GIT_AUTHOR_EMAIL GIT_AUTHOR_NAME
--
1.7.0.9.7.g36b59
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] tests: sanitize more git environment variables
2011-01-26 20:33 [PATCH] tests: sanitize more git environment variables Jeff King
@ 2011-01-26 20:34 ` Jeff King
2011-01-26 20:43 ` Junio C Hamano
1 sibling, 0 replies; 4+ messages in thread
From: Jeff King @ 2011-01-26 20:34 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
On Wed, Jan 26, 2011 at 03:33:32PM -0500, Jeff King wrote:
> These variables should generally not be set in one's
> environment, but they do get set by rebase, which means
> doing an interactive rebase like:
>
> pick abcd1234 foo
> exec make test
>
> will cause false negatives in the test suite.
Or I guess false positives, depending on your definition of positive and
negative. I.e., tests will fail when they shouldn't. :)
-Peff
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tests: sanitize more git environment variables
2011-01-26 20:33 [PATCH] tests: sanitize more git environment variables Jeff King
2011-01-26 20:34 ` Jeff King
@ 2011-01-26 20:43 ` Junio C Hamano
2011-01-27 0:31 ` Jeff King
1 sibling, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2011-01-26 20:43 UTC (permalink / raw)
To: Jeff King; +Cc: git
Jeff King <peff@peff.net> writes:
> These variables should generally not be set in one's
> environment, but they do get set by rebase, which means
> doing an interactive rebase like:
>
> pick abcd1234 foo
> exec make test
>
> will cause false negatives in the test suite.
Cute. Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tests: sanitize more git environment variables
2011-01-26 20:43 ` Junio C Hamano
@ 2011-01-27 0:31 ` Jeff King
0 siblings, 0 replies; 4+ messages in thread
From: Jeff King @ 2011-01-27 0:31 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano
On Wed, Jan 26, 2011 at 12:43:25PM -0800, Junio C Hamano wrote:
> Jeff King <peff@peff.net> writes:
>
> > These variables should generally not be set in one's
> > environment, but they do get set by rebase, which means
> > doing an interactive rebase like:
> >
> > pick abcd1234 foo
> > exec make test
> >
> > will cause false negatives in the test suite.
>
> Cute. Thanks.
BTW, for anyone interested, I am using this with the following script:
-- >8 --
#!/bin/sh
upstream=`git rev-parse --symbolic-full-name "$1@{u}" >/dev/null 2>&1`
GIT_EDITOR='sed -i "/^pick .*/aexec make -j8 test"' \
git rebase -i "${upstream:-origin}" $1
-- 8< --
which is a convenient way of testing each commit in a patch series
before submitting it upstream (and it stops on test failure so you can
fix up that commit).
You can drop it in your PATH as "git-test" and run "git test" or "git
test <branch>".
-Peff
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-01-27 0:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-26 20:33 [PATCH] tests: sanitize more git environment variables Jeff King
2011-01-26 20:34 ` Jeff King
2011-01-26 20:43 ` Junio C Hamano
2011-01-27 0:31 ` Jeff King
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).