You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2011/06/20 05:21:23 UTC
[lucy-commits] svn commit: r1137489 - /incubator/lucy/trunk/perl/lib/Lucy/Test.pm
Author: marvin
Date: Mon Jun 20 03:21:23 2011
New Revision: 1137489
URL: http://svn.apache.org/viewvc?rev=1137489&view=rev
Log:
Make Charmonizer tests pass when run from both svn checkout and CPAN distro.
Modified:
incubator/lucy/trunk/perl/lib/Lucy/Test.pm
Modified: incubator/lucy/trunk/perl/lib/Lucy/Test.pm
URL: http://svn.apache.org/viewvc/incubator/lucy/trunk/perl/lib/Lucy/Test.pm?rev=1137489&r1=1137488&r2=1137489&view=diff
==============================================================================
--- incubator/lucy/trunk/perl/lib/Lucy/Test.pm (original)
+++ incubator/lucy/trunk/perl/lib/Lucy/Test.pm Mon Jun 20 03:21:23 2011
@@ -22,13 +22,18 @@ Lucy::Index::PostingListWriter::set_defa
package Lucy::Test::TestCharmonizer;
use Config;
+use File::Spec::Functions qw( catfile updir );
+
sub run_tests {
my $name = ucfirst shift;
$name =~ s/_([a-z])/\u$1/g;
- exec "../charmonizer/Test$name$Config{_exe}";
+ my $path = catfile( 'charmonizer', "Test$name$Config{_exe}" );
+ if ( !-e $path ) {
+ $path = catfile( updir(), $path );
+ }
+ exec $path;
}
-
1;
__END__