git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Skip Perl interface (Git.pm) tests if requirements not fullfilled

From
Jakub Narebski <jnareb@gmail.com>
Date
Jun 29, 2008, 20:32 UTC
Message-ID
<1214771560-14005-1-git-send-email-jnareb@gmail.com>
In-Reply-To
<alpine.LFD.1.10.0806291241210.27776@hp.linux-foundation.org>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
Linus Torvalds wrote:
> Wouldn't it be a lot more polite to just not run the test when the 
> Test::More stuff doesn't exist? Rather than failing the testsuite? From a 
> quick "git grep", this test is the only one that uses Test::More...
Would this be enough?
 t/t9700-perl-git.sh |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/t/t9700-perl-git.sh b/t/t9700-perl-git.sh
index b2fb9ec..81ff84d 100755
--- a/t/t9700-perl-git.sh
+++ b/t/t9700-perl-git.sh
@@ -6,6 +6,18 @@
 test_description='perl interface (Git.pm)'
 . ./test-lib.sh
 
+perl -MTest::More -e '' >/dev/null 2>&1 || {
+	test_expect_success 'skipping Git.pm tests, Test::More module not found' :
+	test_done
+	exit
+}
+
+perl -e 'use 5.006002;' >/dev/null 2>&1 || {
+	test_expect_success 'skipping Git.pm tests, Perl version too old' :
+	test_done
+	exit
+}
+
 # set up test repository
 
 test_expect_success \
-- 
1.5.6
Previous: Johannes SixtNext: Johannes Schindelin
Message 8 of 9 in “perl t9700 failures?”
  1. Linus TorvaldsJun 29, 2008
  2. Junio C HamanoJun 29, 2008
  3. Linus TorvaldsJun 30, 2008
  4. Junio C HamanoJun 29, 2008
  5. Jakub NarebskiJun 29, 2008
  6. Lea WiemannJun 29, 2008
  7. Johannes SixtJun 30, 2008
  8. Skip Perl interface (Git.pm) tests if requirements not fullfilledJakub Narebski, Jun 29, 2008
  9. Johannes SchindelinJun 29, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.