git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: git@vger.kernel.org
Cc: Jakub Narebski <jnareb@gmail.com>
Subject: [PATCH 1/5] Export more test-related variables when running external tests
Date: Sat, 24 Apr 2010 15:50:09 +0200	[thread overview]
Message-ID: <20100424134640.30511.37449.stgit@localhost.localdomain> (raw)
In-Reply-To: <20100424132255.30511.98829.stgit@localhost.localdomain>

Add exporting TEST_DIRECTORY and TRASH_DIRECTORY to test_external, for
external tests to be able to find test script (and git sources), and
to find trash directory (usually with test repository in it).

Add also exporting GIT_TEST_LONG, so that external test can skip
time-intensive tests unless test is invoked with `--long' option.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
Currently there is no test that requires those variables; git test
suite uses test_external* only in t9700-perl-git.sh.  It would be
needed for tests of caching for gitweb.

Nevertheless I think it is a good change to have...

 t/test-lib.sh |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
 mode change 100644 => 100755 t/test-lib.sh

diff --git a/t/test-lib.sh b/t/test-lib.sh
old mode 100644
new mode 100755
index c582964..6187328
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -459,6 +459,9 @@ test_external () {
 		# Announce the script to reduce confusion about the
 		# test output that follows.
 		say_color "" " run $test_count: $descr ($*)"
+		# Export TEST_DIRECTORY, TRASH_DIRECTORY and GIT_TEST_LONG
+		# to be able to use them in script
+		export TEST_DIRECTORY TRASH_DIRECTORY GIT_TEST_LONG
 		# Run command; redirect its stderr to &4 as in
 		# test_run_, but keep its stdout on our stdout even in
 		# non-verbose mode.

  reply	other threads:[~2010-04-24 13:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-24 13:46 [PATCH 0/5] gitweb: Miscellaneous improvements, in preparation for caching support Jakub Narebski
2010-04-24 13:50 ` Jakub Narebski [this message]
2010-04-25 11:47   ` [PATCH 1/5] Export more test-related variables when running external tests Jakub Narebski
2010-04-24 13:53 ` [PATCH 2/5] gitweb: href(..., -path_info => 0|1) Jakub Narebski
2010-04-24 13:56 ` [PATCH 3/5] gitweb: Use nonlocal jump instead of 'exit' in die_error Jakub Narebski
2010-05-04 11:39   ` Jakub Narebski
2010-04-24 14:00 ` [PATCH 4/5] gitweb: Add custom error handler using die_error Jakub Narebski
2010-04-24 14:01 ` [PATCH 5/5] gitweb: Move generating page title to separate subroutine Jakub Narebski
2010-04-25  9:20 ` [PATCH 0/5] gitweb: Miscellaneous improvements, in preparation for caching support Petr Baudis
2010-04-25 11:45   ` Jakub Narebski

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=20100424134640.30511.37449.stgit@localhost.localdomain \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    /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).