aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-04-12 16:46:42 -0700
committerJunio C Hamano <gitster@pobox.com>2009-04-12 16:46:42 -0700
commit6f523f6d38e660edc67719fb0953d79cee3b4b1f (patch)
tree83076a723d21df25e335c917570fd617ca9dbd16 /t
parentc736becc94b1d3f026e1144731c17359a755d23f (diff)
parent1b19ccd236e3369ac77d74ded207406ffbf9feca (diff)
downloadgit-6f523f6d38e660edc67719fb0953d79cee3b4b1f.tar.gz
git-6f523f6d38e660edc67719fb0953d79cee3b4b1f.tar.xz
Merge branch 'jk/no-perl'
* jk/no-perl: tests: skip perl tests if NO_PERL is defined Makefile: allow building without perl
Diffstat (limited to 't')
-rw-r--r--t/lib-git-svn.sh4
-rwxr-xr-xt/t3701-add-interactive.sh5
-rwxr-xr-xt/t7501-commit.sh4
-rwxr-xr-xt/t9001-send-email.sh5
-rwxr-xr-xt/t9200-git-cvsexportcommit.sh5
-rwxr-xr-xt/t9400-git-cvsserver-server.sh4
-rwxr-xr-xt/t9401-git-cvsserver-crlf.sh5
-rwxr-xr-xt/t9500-gitweb-standalone-no-errors.sh5
-rwxr-xr-xt/t9600-cvsimport.sh5
-rwxr-xr-xt/t9700-perl-git.sh5
-rw-r--r--t/test-lib.sh2
11 files changed, 47 insertions, 2 deletions
diff --git a/t/lib-git-svn.sh b/t/lib-git-svn.sh
index cdd7ccdd2..773d47cf3 100644
--- a/t/lib-git-svn.sh
+++ b/t/lib-git-svn.sh
@@ -8,6 +8,10 @@ then
say 'skipping git svn tests, NO_SVN_TESTS defined'
test_done
fi
+if ! test_have_prereq PERL; then
+ say 'skipping git svn tests, perl not available'
+ test_done
+fi
GIT_DIR=$PWD/.git
GIT_SVN_DIR=$GIT_DIR/svn/git-svn
diff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh
index fe017839c..dfc65601a 100755
--- a/t/t3701-add-interactive.sh
+++ b/t/t3701-add-interactive.sh
@@ -3,6 +3,11 @@
test_description='add -i basic tests'
. ./test-lib.sh
+if ! test_have_prereq PERL; then
+ say 'skipping git add -i tests, perl not available'
+ test_done
+fi
+
test_expect_success 'setup (initial)' '
echo content >file &&
git add file &&
diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh
index b4e2b4db8..e2ef53228 100755
--- a/t/t7501-commit.sh
+++ b/t/t7501-commit.sh
@@ -38,7 +38,7 @@ test_expect_success \
"echo King of the bongo >file &&
test_must_fail git commit -m foo -a file"
-test_expect_success \
+test_expect_success PERL \
"using paths with --interactive" \
"echo bong-o-bong >file &&
! (echo 7 | git commit -m foo --interactive file)"
@@ -119,7 +119,7 @@ test_expect_success \
"echo 'gak' >file && \
git commit -m 'author' --author 'Rubber Duck <rduck@convoy.org>' -a"
-test_expect_success \
+test_expect_success PERL \
"interactive add" \
"echo 7 | git commit --interactive | grep 'What now'"
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index 3c90c4fc1..d9420e0a3 100755
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
@@ -3,6 +3,11 @@
test_description='git send-email'
. ./test-lib.sh
+if ! test_have_prereq PERL; then
+ say 'skipping git send-email tests, perl not available'
+ test_done
+fi
+
PROG='git send-email'
test_expect_success \
'prepare reference tree' \
diff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh
index 36656923a..56b7c0692 100755
--- a/t/t9200-git-cvsexportcommit.sh
+++ b/t/t9200-git-cvsexportcommit.sh
@@ -6,6 +6,11 @@ test_description='Test export of commits to CVS'
. ./test-lib.sh
+if ! test_have_prereq PERL; then
+ say 'skipping git cvsexportcommit tests, perl not available'
+ test_done
+fi
+
cvs >/dev/null 2>&1
if test $? -ne 1
then
diff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh
index 39185db6c..64f947d75 100755
--- a/t/t9400-git-cvsserver-server.sh
+++ b/t/t9400-git-cvsserver-server.sh
@@ -10,6 +10,10 @@ cvs CLI client via git-cvsserver server'
. ./test-lib.sh
+if ! test_have_prereq PERL; then
+ say 'skipping git cvsserver tests, perl not available'
+ test_done
+fi
cvs >/dev/null 2>&1
if test $? -ne 1
then
diff --git a/t/t9401-git-cvsserver-crlf.sh b/t/t9401-git-cvsserver-crlf.sh
index 12e0e5082..aca40c1b1 100755
--- a/t/t9401-git-cvsserver-crlf.sh
+++ b/t/t9401-git-cvsserver-crlf.sh
@@ -52,6 +52,11 @@ then
say 'skipping git-cvsserver tests, cvs not found'
test_done
fi
+if ! test_have_prereq PERL
+then
+ say 'skipping git-cvsserver tests, perl not available'
+ test_done
+fi
perl -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/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-standalone-no-errors.sh
index 0bd332c49..f4210fbb0 100755
--- a/t/t9500-gitweb-standalone-no-errors.sh
+++ b/t/t9500-gitweb-standalone-no-errors.sh
@@ -65,6 +65,11 @@ gitweb_run () {
. ./test-lib.sh
+if ! test_have_prereq PERL; then
+ say 'skipping gitweb tests, perl not available'
+ test_done
+fi
+
perl -MEncode -e 'decode_utf8("", Encode::FB_CROAK)' >/dev/null 2>&1 || {
say 'skipping gitweb tests, perl version is too old'
test_done
diff --git a/t/t9600-cvsimport.sh b/t/t9600-cvsimport.sh
index 33eb51938..4322a0c1e 100755
--- a/t/t9600-cvsimport.sh
+++ b/t/t9600-cvsimport.sh
@@ -3,6 +3,11 @@
test_description='git cvsimport basic tests'
. ./test-lib.sh
+if ! test_have_prereq PERL; then
+ say 'skipping git cvsimport tests, perl not available'
+ test_done
+fi
+
CVSROOT=$(pwd)/cvsroot
export CVSROOT
unset CVS_SERVER
diff --git a/t/t9700-perl-git.sh b/t/t9700-perl-git.sh
index 4a501c684..b4ca24462 100755
--- a/t/t9700-perl-git.sh
+++ b/t/t9700-perl-git.sh
@@ -6,6 +6,11 @@
test_description='perl interface (Git.pm)'
. ./test-lib.sh
+if ! test_have_prereq PERL; then
+ say 'skipping perl interface tests, perl not available'
+ test_done
+fi
+
perl -MTest::More -e 0 2>/dev/null || {
say "Perl Test::More unavailable, skipping test"
test_done
diff --git a/t/test-lib.sh b/t/test-lib.sh
index b050196cb..4bd986f43 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -698,6 +698,8 @@ case $(uname -s) in
;;
esac
+test -z "$NO_PERL" && test_set_prereq 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