git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Define $PERL_PATH in test-lib.sh
@ 2009-11-10 10:46 Philippe Bruhat (BooK)
  2009-11-10 12:23 ` Jeff King
  2009-11-10 12:26 ` [PATCH] Define $PERL_PATH in test-lib.sh Johannes Sixt
  0 siblings, 2 replies; 18+ messages in thread
From: Philippe Bruhat (BooK) @ 2009-11-10 10:46 UTC (permalink / raw)
  To: git; +Cc: Philippe Bruhat (BooK)

The main Makefile defines PERL_PATH as the perl to use in the shebang
line of git*.perl commands. This ensures this will be the perl used
to run the tests (in case another perl appears in $PATH before the one
defined in $PERL_PATH)

Signed-off-by: Philippe Bruhat (BooK) <book@cpan.org>
---
 t/t9400-git-cvsserver-server.sh |    2 +-
 t/t9401-git-cvsserver-crlf.sh   |    2 +-
 t/t9700-perl-git.sh             |    4 ++--
 t/test-lib.sh                   |    2 ++
 4 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh
index 64f947d..dc710f8 100755
--- a/t/t9400-git-cvsserver-server.sh
+++ b/t/t9400-git-cvsserver-server.sh
@@ -20,7 +20,7 @@ then
     say 'skipping git-cvsserver tests, cvs not found'
     test_done
 fi
-perl -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {
+$PERL_PATH -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {
     say 'skipping git-cvsserver tests, Perl SQLite interface unavailable'
     test_done
 }
diff --git a/t/t9401-git-cvsserver-crlf.sh b/t/t9401-git-cvsserver-crlf.sh
index aca40c1..c9e3dba 100755
--- a/t/t9401-git-cvsserver-crlf.sh
+++ b/t/t9401-git-cvsserver-crlf.sh
@@ -57,7 +57,7 @@ then
     say 'skipping git-cvsserver tests, perl not available'
     test_done
 fi
-perl -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {
+$PERL_PATH -e 'use DBI; use DBD::SQLite' >/dev/null 2>&1 || {
     say 'skipping git-cvsserver tests, Perl SQLite interface unavailable'
     test_done
 }
diff --git a/t/t9700-perl-git.sh b/t/t9700-perl-git.sh
index 4eb7d3f..3354e18 100755
--- a/t/t9700-perl-git.sh
+++ b/t/t9700-perl-git.sh
@@ -11,7 +11,7 @@ if ! test_have_prereq PERL; then
 	test_done
 fi
 
-perl -MTest::More -e 0 2>/dev/null || {
+$PERL_PATH -MTest::More -e 0 2>/dev/null || {
 	say "Perl Test::More unavailable, skipping test"
 	test_done
 }
@@ -48,6 +48,6 @@ test_expect_success \
 
 test_external_without_stderr \
     'Perl API' \
-    perl "$TEST_DIRECTORY"/t9700/test.pl
+    $PERL_PATH "$TEST_DIRECTORY"/t9700/test.pl
 
 test_done
diff --git a/t/test-lib.sh b/t/test-lib.sh
index f2ca536..54dd4d5 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -730,6 +730,8 @@ esac
 
 test -z "$NO_PERL" && test_set_prereq PERL
 
+test -z "$NO_PERL" && test -z "$PERL_PATH" && export PERL_PATH=/usr/bin/perl
+
 # test whether the filesystem supports symbolic links
 ln -s x y 2>/dev/null && test -h y 2>/dev/null && test_set_prereq SYMLINKS
 rm -f y
-- 
1.6.0.3.517.g759a

^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2009-11-17 18:25 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-10 10:46 [PATCH] Define $PERL_PATH in test-lib.sh Philippe Bruhat (BooK)
2009-11-10 12:23 ` Jeff King
2009-11-10 13:33   ` Philippe Bruhat (BooK)
2009-11-15  9:12   ` Junio C Hamano
2009-11-16 23:48     ` Philippe Bruhat (BooK)
2009-11-16 23:53       ` [PATCH] Make sure $PERL_PATH is defined when the test suite is run Philippe Bruhat (BooK)
2009-11-17  0:10         ` Junio C Hamano
2009-11-17  0:17           ` Philippe Bruhat (BooK)
2009-11-17  0:20           ` Philippe Bruhat (BooK)
2009-11-17  8:30             ` Johannes Sixt
2009-11-17  8:35               ` Philippe Bruhat (BooK)
2009-11-17 18:25                 ` Junio C Hamano
2009-11-17  8:42               ` Philippe Bruhat (BooK)
2009-11-10 12:26 ` [PATCH] Define $PERL_PATH in test-lib.sh Johannes Sixt
2009-11-10 13:34   ` Philippe Bruhat (BooK)
2009-11-10 20:17     ` Junio C Hamano
2009-11-11  8:40       ` Philippe Bruhat (BooK)
2009-11-11  8:43         ` Jeff King

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