Perhaps this is too complicated a method. The shootouts should
probably be ran with the testing core. If you want to test the CGP
core, use 'make testC', and so on. Otherwise, how will we know if
ack.pir starts failing with a different runcore? I'd feel it'd be
preferable to ignore the first line, perhaps just comment out the code
for parsing the first line.
On Mar 27, 2007, at 9:19 AM, Andy Dougherty (via RT) wrote:
# New Ticket Created by Andy Dougherty
# Please include the string: [perl #42135]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=42135 >
Many of the examples in examples/shootout specify preferred flags. For
example, ack.pir starts with
#!./parrot -Oc -Cj
I don't know what -Oc does. docs/running.pod doesn't say. It refers
to
the non-existent F<imcc/docs/operation.pod> for more details. I found
what I presume is that file in F<docs/imcc/operation.pod>, but that
doesn't say anything about -Oc either. Oh well.
Ignoring that for the moment, the second set of flags is the problem.
On a system with neither -C nor -j, t/examples/shootout.t would leave
the second argument there as a plain '-'. Parrot would then sit
waiting
forever for stdin, and the test suite would hang.
This patch fixes that.
--- parrot-current/t/examples/shootout.t Tue Feb 20 19:15:45 2007
+++ parrot-andy/t/examples/shootout.t Tue Mar 27 08:23:38 2007
@@ -84,10 +84,11 @@
}
unless ( $PConfig{cg_flag} =~ /HAVE/ ) {
$args =~ s/-Cj/-j/;
- $args =~ s/C//;
+ # Remove any plain -C option.
+ $args =~ s/(^|\s)-C(\s|$)/$1$2/;
+ # Remove any extra Cs still floating around
+ $args =~ s/C//;
}
-
- $args eq '-' and $args = '';
# look for input files
my $input = "$file$INPUT_EXT";
--
Andy Dougherty [EMAIL PROTECTED]