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

[PATCH 3/4] remote-helpers: allow direct test execution

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
May 25, 2013, 02:38 UTC
Message-ID
<1369449507-18269-4-git-send-email-felipe.contreras@gmail.com>
In-Reply-To
<1369449507-18269-1-git-send-email-felipe.contreras@gmail.com>

Previously 'make' was the only option, or manually specifying the 'TEST_DIRECTORY'.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 contrib/remote-helpers/Makefile         | 1 +
 contrib/remote-helpers/test-bzr.t       | 3 ++-
 contrib/remote-helpers/test-hg-bidi.t   | 3 ++-
 contrib/remote-helpers/test-hg-hg-git.t | 3 ++-
 contrib/remote-helpers/test-hg.t        | 3 ++-
 5 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/contrib/remote-helpers/Makefile b/contrib/remote-helpers/Makefile
index 2c91ec6..55abf0b 100644
--- a/contrib/remote-helpers/Makefile
+++ b/contrib/remote-helpers/Makefile
@@ -5,6 +5,7 @@ export T := $(addprefix $(CURDIR)/,$(TESTS))
 export MAKE := $(MAKE) -e
 export PATH := $(CURDIR):$(PATH)
 export TEST_LINT := test-lint-executable test-lint-shell-syntax
+export TEST_DIRECTORY := $(CURDIR)/../../t
 
 export SCRIPT_PYTHON := $(addprefix $(CURDIR)/,$(SCRIPTS))
 
diff --git a/contrib/remote-helpers/test-bzr.t b/contrib/remote-helpers/test-bzr.t
index 5dfa070..0f24c48 100755
--- a/contrib/remote-helpers/test-bzr.t
+++ b/contrib/remote-helpers/test-bzr.t
@@ -5,7 +5,8 @@
 
 test_description='Test remote-bzr'
 
-. ./test-lib.sh
+test -z "$TEST_DIRECTORY" && TEST_DIRECTORY="$PWD/../../t"
+. "$TEST_DIRECTORY"/test-lib.sh
 
 if ! test_have_prereq PYTHON; then
 	skip_all='skipping remote-bzr tests; python not available'
diff --git a/contrib/remote-helpers/test-hg-bidi.t b/contrib/remote-helpers/test-hg-bidi.t
index f569697..8707eb9 100755
--- a/contrib/remote-helpers/test-hg-bidi.t
+++ b/contrib/remote-helpers/test-hg-bidi.t
@@ -8,7 +8,8 @@
 
 test_description='Test bidirectionality of remote-hg'
 
-. ./test-lib.sh
+test -z "$TEST_DIRECTORY" && TEST_DIRECTORY="$PWD/../../t"
+. "$TEST_DIRECTORY"/test-lib.sh
 
 if ! test_have_prereq PYTHON; then
 	skip_all='skipping remote-hg tests; python not available'
diff --git a/contrib/remote-helpers/test-hg-hg-git.t b/contrib/remote-helpers/test-hg-hg-git.t
index 7f579c8..ac1de96 100755
--- a/contrib/remote-helpers/test-hg-hg-git.t
+++ b/contrib/remote-helpers/test-hg-hg-git.t
@@ -8,7 +8,8 @@
 
 test_description='Test remote-hg output compared to hg-git'
 
-. ./test-lib.sh
+test -z "$TEST_DIRECTORY" && TEST_DIRECTORY="$PWD/../../t"
+. "$TEST_DIRECTORY"/test-lib.sh
 
 if ! test_have_prereq PYTHON; then
 	skip_all='skipping remote-hg tests; python not available'
diff --git a/contrib/remote-helpers/test-hg.t b/contrib/remote-helpers/test-hg.t
index 8de2aa7..a362867 100755
--- a/contrib/remote-helpers/test-hg.t
+++ b/contrib/remote-helpers/test-hg.t
@@ -8,7 +8,8 @@
 
 test_description='Test remote-hg'
 
-. ./test-lib.sh
+test -z "$TEST_DIRECTORY" && TEST_DIRECTORY="$PWD/../../t"
+. "$TEST_DIRECTORY"/test-lib.sh
 
 if ! test_have_prereq PYTHON; then
 	skip_all='skipping remote-hg tests; python not available'
-- 
1.8.3.rc3.312.g47657de
Previous: Felipe ContrerasNext: Felipe Contreras
Message 10 of 12 in “remote-helpers: test reorganization”
  1. 0/4 remote-helpers: test reorganizationFelipe Contreras, May 25, 2013
  2. 1/4 remote-helpers: generate scriptsFelipe Contreras, May 25, 2013
  3. 2/4 remote-helpers: rename testsFelipe Contreras, May 25, 2013
  4. Junio C HamanoMay 28, 2013
  5. Felipe ContrerasMay 29, 2013
  6. Junio C HamanoMay 29, 2013
  7. Felipe ContrerasMay 29, 2013
  8. Junio C HamanoMay 29, 2013
  9. Felipe ContrerasMay 29, 2013
  10. 3/4 remote-helpers: allow direct test executionFelipe Contreras, May 25, 2013
  11. 4/4 remote-helpers: add exec-path linksFelipe Contreras, May 25, 2013
  12. Junio C HamanoMay 28, 2013

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.