[svn:parrot] r36645 - trunk/lib/Parrot/Harness
chromatic at svn.parrot.org
chromatic at svn.parrot.org
Thu Feb 12 21:28:10 UTC 2009
Author: chromatic
Date: Thu Feb 12 21:28:10 2009
New Revision: 36645
URL: https://trac.parrot.org/parrot/changeset/36645
Log:
[lib] Added option remapping to Parrot::Harness::Options to use the recommended
--runcore=foo flags instead.
Modified:
trunk/lib/Parrot/Harness/Options.pm
Modified: trunk/lib/Parrot/Harness/Options.pm
==============================================================================
--- trunk/lib/Parrot/Harness/Options.pm Thu Feb 12 21:14:50 2009 (r36644)
+++ trunk/lib/Parrot/Harness/Options.pm Thu Feb 12 21:28:10 2009 (r36645)
@@ -64,8 +64,9 @@
sub get_test_prog_args {
my ($optsref, $gc_debug, $run_exec) = @_;
- my %opts = %{ $optsref };
+ my %opts = remap_runcore_opts( $optsref );
my $args = join(' ', map { "-$_" } keys %opts );
+
$args =~ s/-O/-O$opts{O}/ if exists $opts{O};
$args =~ s/-D/-D$opts{D}/;
$args .= ' --gc-debug' if $gc_debug;
@@ -77,6 +78,22 @@
return $args;
}
+sub remap_runcore_opts
+{
+ my ($opts_ref) = @_;
+ my %remap = (
+ 'j' => '-runcore=jit',
+ 'g' => '-runcore=cgoto',
+ 'C' => '-runcore=cgp',
+ 'S' => '-runcore=switch',
+ 'b' => '-runcore=bounds',
+ 'f' => '-runcore=fast',
+ );
+
+ return map { $_ => ( exists $remap{$_} ? $remap{$_} : $opts_ref->{$_} ) }
+ keys %{ $opts_ref };
+}
+
sub Usage {
print <<"EOF";
perl t/harness [options] [testfiles]
More information about the parrot-commits
mailing list