On Fri, 6 May 2005, Leopold Toetsch wrote:

>"make testr" is broken. We need some replacement for it. It does:
>
>- read a source file
>- compile the source to a .pbc file
>- load that .pbc file
>- run it
>
>It corresponds to this command line:
>
>$ ./parrot -o foo.pbc -r -r foo.imc
>
>This was basically introduced to test running compiled PBCs, but it's
>not quite the same, because during compilation parts of the packfile
>are
>already created in memory for an immediate run. This interfers with the
>step of loading a .pbc and running that.
>
>I'll not gonna fix this run simulation, instead we should do the
>following:
>
>- compile the source to a .pbc
>- start a fresh parrot and run the .pbc
>
>According to these command two lines:
>
>$ ./parrot -o foo.pbc foo.imc
>$ ./parrot foo.pbc
>
>Patches for the test system are welcome.
>

I think this might do it:

---------------------------------------------------------------------------
Index: lib/Parrot/Test.pm
===================================================================
--- lib/Parrot/Test.pm  (revision 7995)
+++ lib/Parrot/Test.pm  (working copy)
@@ -380,11 +380,13 @@
                 if ( $func !~ /^pir_2_pasm_/ &&
                      ( $args =~ s/--run-pbc// || $args =~ s/-r //) ) {
                     my $pbc_f = per_test('.pbc', $test_no);
-                    $args = qq{$args -o "$pbc_f" -r -r};
+                    $args = qq{$args -o "$pbc_f"};
+                    $cmd = qq{$parrot $args "$code_f";$parrot "$pbc_f"};
+                } else {
+                    $cmd = qq{$parrot $args "$code_f"};
                 }
-                $cmd = qq{$parrot $args "$code_f"};
                 $exit_code = run_command($cmd, CD => $path_to_parrot,
-                                        STDOUT => $out_f, STDERR => $out_f);
+                    STDOUT => $out_f, STDERR => $out_f);
             }

             my $meth = $parrot_test_map{$func};
---------------------------------------------------------------------------


Also:  I'm new. I love Perl. Reading about and waiting for Perl 6 has
been killing me. I want to contribute.

So, greetings to the group!  :-)


>Thanks,
>leo

-Dino

-- 
 .~.    Dino Morelli
 /V\    email: [EMAIL PROTECTED]
/( )\   weblog: http://categorically.net/d/blog/
^^-^^   preferred distro: Debian GNU/Linux  http://www.debian.org

Reply via email to