[PATCH 2/2] test-lib.sh: Allow running the test suite against installed git

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Introduce variables externalpath and externalexecpath such that the test
suite can be run against a git which is installed at $externalpath with
subcommands at $externalexecpath. externalpath defaults to the git.git
checkout, externalexecpath defaults to $externalpath. Run the suite as

externalpath=somepath externalexecpath=someotherpath make test

but note that this requires and uses parts of a compiled git in the
git.git checkout: test helpers, templates and perl libraries are taken
from there.

Signed-off-by: Michael J Gruber <git@xxxxxxxxxxxxxxxxxxxx>
---
 t/test-lib.sh |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/t/test-lib.sh b/t/test-lib.sh
index b9da86e..f6c467f 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -514,8 +514,14 @@ test_done () {
 TEST_DIRECTORY=$(pwd)
 if test -z "$valgrind"
 then
-	PATH=$TEST_DIRECTORY/..:$PATH
-	GIT_EXEC_PATH=$TEST_DIRECTORY/..
+	if test -z "$externalpath"
+	then
+		PATH=$TEST_DIRECTORY/..:$PATH
+		GIT_EXEC_PATH=$TEST_DIRECTORY/..
+	else
+		PATH=$externalpath:$TEST_DIRECTORY/..:$PATH
+		GIT_EXEC_PATH=${externalexecpath:-$externalpath}
+	fi
 else
 	make_symlink () {
 		test -h "$2" &&
-- 
1.6.2.149.g6462

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux