Re: [PATCH 2/2 v4] Git.pm: add test suite

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH 2/2 v4] Git.pm: add test suite

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:47

Lea Wiemann [off-list ref] writes:
quoted hunk
diff --git a/t/t9700/test.pl b/t/t9700/test.pl
new file mode 100755
index 0000000..8318fec
--- /dev/null
+++ b/t/t9700/test.pl
@@ -0,0 +1,99 @@
+#!/usr/bin/perl
+use lib (split(/:/, $ENV{GITPERLLIB}));
+
+use warnings;
+use strict;
+
+use Test::More qw(no_plan);
+
+use Cwd;
+use File::Basename;
+use File::Temp;
+use IO::String;
The system I first tried this did not have IO::String installed.  Is this
something we would want to rely on being available?

It also indicates a slight problem in test_external.  Can it become a bit
easier to tell such a basic problem apart from real test errors?  I needed
to look into /tmp/* to see where it is failing but it would be nice if we
can somehow see the breakage with "sh t9700-*.sh -v".

Re: [PATCH 2/2 v4] Git.pm: add test suite

From: Lea Wiemann <hidden>
Date: 2016-06-15 22:44:47

Junio C Hamano wrote:
The system I first tried this did not have IO::String installed.
My bad, I should've checked this before sending it off.  I guess we'll 
solve this in Michael's patch thread; don't expect a reply from me in 
the next 12h though, I'm way tired and utterly unproductive right now.
[test_external:] Can it become a bit easier to tell such a basic
problem apart from real test errors?  I needed to look into
/tmp/* to see where it is failing
Hm, is your test output somehow different from the following?  It states 
the error quite clearly at the bottom.

$ ./t9700-perl-git.sh -v
* expecting success: echo "test file 1" > file1 &&
      echo "test file 2" > file2 &&
      [...]
      git-config --add test.int 2k

*   ok 1: set up test repository
[...]
*  run 2: Perl API (perl ../t9700/test.pl)
* FAIL 2: Perl API
	perl ../t9700/test.pl
* expecting no stderr from previous command
* FAIL 3: no stderr: Perl API
	perl ../t9700/test.pl
	Stderr is:
	Can't locate IO/String.pm in @INC (@INC contains: 
/home/lea/G/t/../perl/blib/lib /home/lea/G/t/../perl/blib/arch/auto/Git 
/home/lea/.perl/lib /etc/perl /usr/local/lib/perl/5.10.0 
/usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 
/usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at 
../t9700/test.pl line 12.
	BEGIN failed--compilation aborted at ../t9700/test.pl line 12.
	# Looks like your test died before it could output anything.
* failed 2 among 3 test(s)

-- Lea
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help