git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Robin H. Johnson" <robbat2@gentoo.org>,
	Git Mailing List <git@vger.kernel.org>
Subject: [PATCH 4/4] tests: skip perl tests if NO_PERL is defined
Date: Fri, 3 Apr 2009 15:33:59 -0400	[thread overview]
Message-ID: <20090403193359.GD5547@coredump.intra.peff.net> (raw)
In-Reply-To: <20090403192700.GA14965@coredump.intra.peff.net>

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>
---
This touches every test that Robin's patch touched except for
t5505-remote. There is no need to skip those tests, as these days
"git remote" is a builtin.

 Makefile                               |    1 +
 t/lib-git-svn.sh                       |    4 ++++
 t/t3701-add-interactive.sh             |    5 +++++
 t/t7501-commit.sh                      |    4 ++--
 t/t9001-send-email.sh                  |    5 +++++
 t/t9200-git-cvsexportcommit.sh         |    5 +++++
 t/t9400-git-cvsserver-server.sh        |    4 ++++
 t/t9500-gitweb-standalone-no-errors.sh |    5 +++++
 t/t9600-cvsimport.sh                   |    5 +++++
 t/t9700-perl-git.sh                    |    5 +++++
 t/test-lib.sh                          |    2 ++
 11 files changed, 43 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index d7b0837..584a757 100644
--- a/Makefile
+++ b/Makefile
@@ -1417,6 +1417,7 @@ GIT-BUILD-OPTIONS: .FORCE-GIT-BUILD-OPTIONS
 	@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 cdd7ccd..773d47c 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 fe01783..dfc6560 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 b4e2b4d..e2ef532 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 192b97b..4281ce2 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 3665692..56b7c06 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 39185db..64f947d 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/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-standalone-no-errors.sh
index 0bd332c..f4210fb 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 33eb519..4322a0c 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 4a501c6..b4ca244 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 b050196..4bd986f 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
-- 
1.6.2.2.569.g2d4b2

  parent reply	other threads:[~2009-04-03 19:35 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-03  7:03 [PATCH] NO_PERL support Robin H. Johnson
2009-04-03 13:20 ` Jeff King
2009-04-03 14:51   ` Johannes Schindelin
2009-04-03 14:53     ` Jeff King
2009-04-03 15:02       ` Johannes Schindelin
2009-04-03 15:11         ` Miklos Vajna
2009-04-03 15:16         ` Jeff King
2009-04-03 17:54   ` Johannes Sixt
2009-04-03 18:37     ` Jeff King
2009-04-03 15:46 ` Jeff King
2009-04-03 15:59   ` Robin H. Johnson
2009-04-03 16:18     ` Jeff King
2009-04-03 16:25 ` Junio C Hamano
2009-04-03 17:15   ` Jeff King
2009-04-03 20:20     ` Junio C Hamano
2009-04-03 20:56       ` Jeff King
2009-04-03 19:27 ` [PATCH 0/4] " Jeff King
2009-04-03 19:28   ` [PATCH 1/4] commit: abort commit if interactive add failed Jeff King
2009-04-03 19:31   ` [PATCH 2/4] tests: remove exit after test_done call Jeff King
2009-04-03 19:32   ` [PATCH 3/4] Makefile: allow building without perl Jeff King
2009-04-04 22:47     ` Robin H. Johnson
2009-04-04 23:39       ` Jeff King
2009-04-04 23:51         ` Robin H. Johnson
2009-04-04 23:56           ` Jeff King
2009-04-05  0:06             ` Robin H. Johnson
2009-04-07  7:27               ` Jeff King
2009-04-03 19:33   ` Jeff King [this message]
2009-04-04 23:30     ` [PATCH 4/4] tests: skip perl tests if NO_PERL is defined Robin H. Johnson
2009-04-04 23:42       ` Jeff King
2009-04-07  7:31   ` [PATCH 0/4] NO_PERL support Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090403193359.GD5547@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=robbat2@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).