git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH/RFC] tests: use the --long-tests facility to toggle some slow tests

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Mar 27, 2011, 23:00 UTC
Message-ID
<20110327230025.GD27445@elie>
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.

Show 8 quoted lines
> --- 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
Previous: Jens LehmannNext: Junio C Hamano
Message 6 of 10 in “tests: fix overeager scrubbing of environment variables”
  1. tests: fix overeager scrubbing of environment variablesJens Lehmann, Mar 27, 2011
  2. Jonathan NiederMar 27, 2011
  3. squash! tests: fix overeager scrubbing of environment variablesJonathan Nieder, Mar 27, 2011
  4. Jeff KingMar 28, 2011
  5. tests: fix overeager scrubbing of environment variablesJens Lehmann, Mar 27, 2011
  6. tests: use the --long-tests facility to toggle some slow testsJonathan Nieder, Mar 27, 2011
  7. Junio C HamanoMar 28, 2011
  8. tests: fix overeager scrubbing of environment variablesJens Lehmann, Mar 28, 2011
  9. Jonathan NiederMar 28, 2011
  10. Junio C HamanoMar 28, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.