Skip Menu |

This queue is for tickets about the Test-Unit CPAN distribution.

Report information
The Basics
Id: 3963
Status: resolved
Priority: 0/
Queue: Test-Unit

People
Owner: mca1001 [...] users.sourceforge.net
Requestors: ilya [...] martynov.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.24
Fixed in: 0.25



Subject: [PATCH] Wrong path to perl executable in t/try_examples.t
Hi, I tried to install Test-Unit and it had test failures. I looked in the sources and discovered that t/try_examples.t hardcodes name of perl executable. On my system I have several perl installations which use different names for perl executable so t/try_examples.t was peeking wrong perl and was failing apart. I've attached a patch to fix it. P.S. After fixing Test-Unit I was still getting test failure but it was already reported as bug #2244 (see http://xrl.us/vf9).
diff -ru Test-Unit-0.24-orig/t/try_examples.t Test-Unit-0.24/t/try_examples.t --- Test-Unit-0.24-orig/t/try_examples.t Thu Oct 2 17:23:40 2003 +++ Test-Unit-0.24/t/try_examples.t Thu Oct 2 17:30:04 2003 @@ -78,11 +78,13 @@ warn "There might be problems with error redirection undef $^O" if grep { $^O =~ $_ } ( qr/win/i ); +my $perl = $^X || 'perl'; + foreach my $e (@examples) { if (defined $guru_checked{$e}) { # get program output my $runner = $e =~ /\.pm$/ ? './TestRunner.pl ' : ''; - my $cmd = "perl -I lib -I examples $runner$e 2>&1"; + my $cmd = "$perl -I lib -I examples $runner$e 2>&1"; # warn "cmd $cmd\n"; my $out = `$cmd`; foreach ($out, $guru_checked{$e}) {
BTW I think this error report is caused by bug fixed by my patch: http://nntp.x.perl.org/group/perl.cpan.testers/67648
Subject: Fixed in CVS
From: mca1001 [...] users.sourceforge.net
[ILYAM - Thu Oct 2 09:39:04 2003]: Show quoted text
> I tried to install Test-Unit and it had test failures. I looked in the > sources and discovered that t/try_examples.t hardcodes name of perl > executable. On my system I have several perl installations which > use different names for perl executable so t/try_examples.t was > peeking wrong perl and was failing apart. I've attached a patch to > fix it.
Thanks for the patch, it's now fixed in CVS: http://cvs.sourceforge.net/viewcvs.py/perlunit/src/Test-Unit/t/try_examples.t?rev=1.13&view=log (note lag on public CVS...) Show quoted text
> P.S. After fixing Test-Unit I was still getting test failure but it > was already reported as bug #2244 (see http://xrl.us/vf9).
Also fixed in CVS. Release and CPAN upload will follow eventually.
The release last week included the bug fix. Picking the correct perl environment for tests is something that should probably be checked in more detail, possibly as part of the test framework. A job for later, I think - I've made a note in doc/TODO.