git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Jens Lehmann <Jens.Lehmann@web.de>
Cc: Junio C Hamano <gitster@pobox.com>,
	Git Mailing List <git@vger.kernel.org>,
	Johannes Schindelin <johannes.schindelin@gmx.de>,
	Clemens Buchacher <drizzd@aon.at>
Subject: [PATCH/RFC] tests: use the --long-tests facility to toggle some slow tests
Date: Sun, 27 Mar 2011 18:00:25 -0500	[thread overview]
Message-ID: <20110327230025.GD27445@elie> (raw)
In-Reply-To: <4D8FB995.20001@web.de>

The GIT_TEST_LONG facility (v1.6.0-rc0~246, 2008-06-17) was added to
support tests for a gitweb caching engine that was never merged.
So --long-tests has been a no-op for years.

Since then, some other expensive tests have sprouted up that fit its
description pretty well, namely:

 - GIT_NOTES_TIMING_TESTS
 - GIT_PATCHID_TIMING_TESTS
 - GIT_REMOTE_SVN_TEST_BIG_FILES

All of these are not part of the default test run because they are
expensive.  Let's replace their existing, undocumented triggers with
GIT_TEST_LONG, so now you can do

 sh t3302-notes-index-expensive.sh -l -v

to get a sanity check for notes lookup performance scalability.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
Jens Lehmann wrote:

> 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?).

Good idea.  See below for a possible sneaky way to document three of
them.

> --- 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);

My poor terminal. :)  I sent a possible more invasive change that
breaks this into multiple lines but it looks like our mails crossed.
Anyway, I have no serious complaint; it might be that this one is the
best way to go.  

 t/t0081-line-buffer.sh           |    2 +-
 t/t3302-notes-index-expensive.sh |    2 +-
 t/t3419-rebase-patch-id.sh       |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/t/t0081-line-buffer.sh b/t/t0081-line-buffer.sh
index 1dbe1c9..099abe0 100755
--- a/t/t0081-line-buffer.sh
+++ b/t/t0081-line-buffer.sh
@@ -12,7 +12,7 @@ correctly.
 "
 . ./test-lib.sh
 
-test -n "$GIT_REMOTE_SVN_TEST_BIG_FILES" && test_set_prereq EXPENSIVE
+test -n "$GIT_TEST_LONG" && test_set_prereq EXPENSIVE
 
 generate_tens_of_lines () {
 	tens=$1 &&
diff --git a/t/t3302-notes-index-expensive.sh b/t/t3302-notes-index-expensive.sh
index e35d781..62820d0 100755
--- a/t/t3302-notes-index-expensive.sh
+++ b/t/t3302-notes-index-expensive.sh
@@ -8,7 +8,7 @@ test_description='Test commit notes index (expensive!)'
 . ./test-lib.sh
 
 test_set_prereq NOT_EXPENSIVE
-test -n "$GIT_NOTES_TIMING_TESTS" && test_set_prereq EXPENSIVE
+test -n "$GIT_TEST_LONG" && test_set_prereq EXPENSIVE
 test -x /usr/bin/time && test_set_prereq USR_BIN_TIME
 
 create_repo () {
diff --git a/t/t3419-rebase-patch-id.sh b/t/t3419-rebase-patch-id.sh
index bd8efaf..0419e81 100755
--- a/t/t3419-rebase-patch-id.sh
+++ b/t/t3419-rebase-patch-id.sh
@@ -5,7 +5,7 @@ test_description='git rebase - test patch id computation'
 . ./test-lib.sh
 
 test_set_prereq NOT_EXPENSIVE
-test -n "$GIT_PATCHID_TIMING_TESTS" && test_set_prereq EXPENSIVE
+test -n "$GIT_TEST_LONG" && test_set_prereq EXPENSIVE
 test -x /usr/bin/time && test_set_prereq USR_BIN_TIME
 
 count()
-- 
1.7.4.2

  reply	other threads:[~2011-03-27 23:01 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   ` [PATCH v2] " Jens Lehmann
2011-03-27 23:00     ` Jonathan Nieder [this message]
2011-03-28 17:00   ` [PATCH] " 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=20110327230025.GD27445@elie \
    --to=jrnieder@gmail.com \
    --cc=Jens.Lehmann@web.de \
    --cc=drizzd@aon.at \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=johannes.schindelin@gmx.de \
    /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).