On Fri Mar 28 21:03:12 2008, [EMAIL PROTECTED] wrote:
> Parrot::Test uses the full path of the test script to determine which
> optimization flags to pass parrot.  The method used causes the bogus
> optimization value '/' to be extracted when running the tests in
> /opt/foo as the character immediately following 'opt' is '/'.
> 
> The relevant code is lines 767 - 786 of lib/Parrot/Test.pm (r26609).
> 


If we simply add a forward slash after 'opt', does that solve the
problem?  (see attached)

kid51
Index: lib/Parrot/Test.pm
===================================================================
--- lib/Parrot/Test.pm  (revision 26580)
+++ lib/Parrot/Test.pm  (working copy)
@@ -770,7 +770,7 @@
             # output file
             my $out_f = per_test( '.pasm', $test_no );
 
-            my $opt = $code_f =~ m!opt(.)! ? "-O$1" : "-O1";
+            my $opt = $code_f =~ m!opt/(.)! ? "-O$1" : "-O1";
             my $args = $ENV{TEST_PROG_ARGS} || '';
             $args .= " $opt --output=$out_f";
             $args =~ s/--run-exec//;

Reply via email to