develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r33732 - trunk/languages/perl6/tools

From:
moritz
Date:
December 9, 2008 14:57
Subject:
[svn:parrot] r33732 - trunk/languages/perl6/tools
Message ID:
20081209225710.2F498CB9AF@x12.develooper.com
Author: moritz
Date: Tue Dec  9 14:57:09 2008
New Revision: 33732

Modified:
   trunk/languages/perl6/tools/autounfudge.pl

Log:
[rakudo] tools/autounfudge.pl: add a --section option to for example only
process S12 tests


Modified: trunk/languages/perl6/tools/autounfudge.pl
==============================================================================
--- trunk/languages/perl6/tools/autounfudge.pl	(original)
+++ trunk/languages/perl6/tools/autounfudge.pl	Tue Dec  9 14:57:09 2008
@@ -62,7 +62,7 @@
 my $impl = 'rakudo';
 our $debug = 0;
 our $out_filename = 'autounfudge.patch';
-my $exclude = '(?:(?:chop|rx|rounders)\.t|modifiers/(while|until).t)$';
+my $exclude = '(?:(?:radix|modifiers/while|rx)\.t)$';
 our $threads_num = 1;
 
 GetOptions  'impl=s'        => \$impl,
@@ -71,6 +71,7 @@
             'auto'          => \my $auto,
             'keep-env'      => \my $keep_env,
             'unskip'        => \my $unskip,
+            'section=s'     => \my $section,
             'exclude'       => \$exclude,
             'jobs=i'        => \$threads_num,
             or usage();
@@ -88,6 +89,14 @@
     @files = @ARGV or usage();
 }
 
+if ($section) {
+    my $s = ($section =~ m/^\d{1,2}$/)
+            ? sprintf('S%02d', $section)
+            : $section;
+    print "Only of section `$section'\n";
+    @files = grep { m{ spec [/\\] \Q$section\E  }x } @files;
+}
+
 our $diff_lock :shared = 0;
 open our $diff_fh, '>', $out_filename
     or die "Can't open '$out_filename' for writing: $!";
@@ -196,6 +205,7 @@
     --auto              use t/spectest.data for --specfile
     --keep-env          Keep PERL6LIB environment variable.
     --exclude regex     Don't run the tests that match regex
+    --section number    Run only on tests belonging to section <number>
 USAGE
 }
 



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About