summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 499c293)
raw | patch | inline | side by side (parent: 499c293)
author | Jeff King <peff@peff.net> | |
Fri, 3 Apr 2009 19:33:59 +0000 (15:33 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 9 Apr 2009 05:42:16 +0000 (22:42 -0700) |
These scripts all test git programs that are written in
perl, and thus obviously won't work if NO_PERL is defined.
We pass NO_PERL to the scripts from the building Makefile
via the GIT-BUILD-OPTIONS file.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
perl, and thus obviously won't work if NO_PERL is defined.
We pass NO_PERL to the scripts from the building Makefile
via the GIT-BUILD-OPTIONS file.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 files changed:
diff --git a/Makefile b/Makefile
index 34b05397de33652d994de4f3ef9ff38b88c72735..a865a460538f8e3c758766a947b9e8d1b1628f64 100644 (file)
--- a/Makefile
+++ b/Makefile
@echo SHELL_PATH=\''$(subst ','\'',$(SHELL_PATH_SQ))'\' >$@
@echo TAR=\''$(subst ','\'',$(subst ','\'',$(TAR)))'\' >>$@
@echo NO_CURL=\''$(subst ','\'',$(subst ','\'',$(NO_CURL)))'\' >>$@
+ @echo NO_PERL=\''$(subst ','\'',$(subst ','\'',$(NO_PERL)))'\' >>$@
### Detect Tck/Tk interpreter path changes
ifndef NO_TCLTK
diff --git a/t/lib-git-svn.sh b/t/lib-git-svn.sh
index cdd7ccdd2ac87e27bd6912e92477e986517c32ad..773d47cf3cb704d7976185738a2b9840c159a33c 100644 (file)
--- a/t/lib-git-svn.sh
+++ b/t/lib-git-svn.sh
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
index fe017839c467d10b82f5527bcd143a6c480c878a..dfc65601aa2171bfc9321753a3d90db112d81f72 100755 (executable)
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 b4e2b4db8421c24cb714fcad7cd6ec00ea88c016..e2ef53228ecc6162afdcce78109d426e154b7caa 100755 (executable)
--- a/t/t7501-commit.sh
+++ b/t/t7501-commit.sh
"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)"
"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 3c90c4fc1c0ee798b5e37729d1a67018499f0a92..d9420e0a3b611c8aa8bb3a64d1bb21859d4a87ff 100755 (executable)
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
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' \
index 36656923ac2dbf76a76173181b8244fcfa55edc2..56b7c06921d9ef3b72ff3ee6f62f7a1c426b3028 100755 (executable)
. ./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
index 39185db6c962ee95caf35cc5ad9d26f228224f44..64f947d75bc0700fc75e8c7c87d97ec4f3e62e44 100755 (executable)
. ./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
index 12e0e508226cb9197ad3f419387dfcfb3ab9e0d9..aca40c1b1ff0f957652f75383625367d85242c14 100755 (executable)
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
index 0bd332c4932c796f9bb3547d4a708cebbd9cfc2c..f4210fbb04065cfe32f26053eb5f5f054d52e3cf 100755 (executable)
. ./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 33eb51938dbf90f93d10c2cf1d0edfc788befece..4322a0c1ed6d792cbba4b52a7ba8bad74986bbad 100755 (executable)
--- a/t/t9600-cvsimport.sh
+++ b/t/t9600-cvsimport.sh
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 4a501c68471e3ba472bf82d65789d06838c7eec8..b4ca244626a6635faa2587722c26f4c17692af65 100755 (executable)
--- a/t/t9700-perl-git.sh
+++ b/t/t9700-perl-git.sh
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 b050196cb7bb1b668925afe4c9307ea578c97166..4bd986f43091715432bb4b740cfe4f0e0701cf85 100644 (file)
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
;;
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