rakudo's "make spectest" suffers from too much noise in its output.
The attached patch adds a spectest_regression target to Makefile that uses whitelisting to run only those tests that are known to pass. The code in t/harness is somewhat ugly now (ok, it was ugly before, but now it's even uglier), for example the options --regression-only and --fudge are non-orthogonal, although in an ideal world they should be. Should I refactor t/harness? or just leave it in the current shape? Cheers, Moritz -- Moritz Lenz http://moritz.faui2k3.org/ | http://perl-6.de/
Index: t/harness
===================================================================
--- t/harness (revision 27698)
+++ t/harness (working copy)
@@ -7,6 +7,7 @@
use lib qw( ../../lib );
our %harness_args;
+our $recurse;
BEGIN {
our %harness_args = (
@@ -14,6 +15,7 @@
compiler => 'perl6.pbc',
);
+
my %opts;
while( $_ = $ARGV[0] ) {
last unless defined && /^-/;
@@ -22,12 +24,31 @@
$opts{$_} = $_;
}
+ my %accepted_tests;
+ my $regression_only;
+ if ( delete $opts{'--regression-only'} ) {
+ $regression_only = 1;
+ $recurse = 1;
+ open(my $f, '<', 't/passing_spec')
+ or die "Can't ope file 't/passing_spec' for reading: $!";
+ while (<$f>){
+ next if m/^\s*#/;
+ next unless m/\S/;
+ chomp;
+ $accepted_tests{"t/spec/$_"} = 1;
+ }
+ close $f;
+ }
+
## if we aren't fudging tests, we're done here
return unless defined delete $opts{'--fudge'};
my $impl = 'rakudo';
my @tfiles = sort map { -d $_ ? all_in($_) : $_ } map glob, @ARGV;
+ if ($regression_only){
+ @tfiles = grep { $accepted_tests{$_} } @tfiles;
+ }
my $cmd = join ' ', $^X, 't/spec/fudgeall', keys(%opts), $impl, @tfiles;
print "$cmd\n";
@@ -62,7 +83,6 @@
return @hits;
}
-
}
use Parrot::Test::Harness %harness_args;
Index: t/passing_spec
===================================================================
--- t/passing_spec (revision 0)
+++ t/passing_spec (revision 0)
@@ -0,0 +1,36 @@
+# this is a list of all spec tests that are supposed to pass
+# on current rakudo.
+# empty lines and those beginning with a # are ignored
+
+S02-literals/autoref.t
+S02-literals/hex_chars.t
+S03-operators/equality.t
+S03-operators/not.t
+S03-operators/relational.t
+S04-statements/until.t
+S04-statements/while.t
+S12-class/attributes.t
+S12-class/instantiate.t
+S12-class/parent_attributes.t
+t/spec/S12-methods/calling_syntax.t
+S29-array/delete.t
+S29-array/exists.t
+S29-array/keys_values.t
+S29-array/kv.t
+S29-array/pairs.t
+S29-list/mutating_listops.t
+S29-num/abs.t
+S29-num/complex.t
+S29-num/exp.t
+S29-num/int.t
+S29-num/log.t
+S29-num/pi.t
+S29-num/roots.t
+S29-num/sign.t
+S29-num/sqrt.t
+S29-str/append.t
+S29-str/capitalize.t
+S29-str/comb.t
+S29-str/lcfirst.t
+S29-str/sprintf.t
+S29-str/ucfirst.t
Property changes on: t/passing_spec
___________________________________________________________________
Name: svn:mime-type
+ text/plain; charset=UTF-8
Name: svn:eol-style
+ native
Index: config/makefiles/root.in
===================================================================
--- config/makefiles/root.in (revision 27698)
+++ config/makefiles/root.in (working copy)
@@ -150,12 +150,20 @@
t/spec/S03-operators \
t/spec/S04-statements \
t/spec/S12-class \
+ t/spec/S12-role \
+ t/spec/S12-methods \
+ t/spec/S12-attributes \
t/spec/S29-array \
t/spec/S29-hash \
t/spec/S29-list \
t/spec/S29-num \
t/spec/S29-str \
+spectest_regression: all t/spec
+ cd t/spec && svn up
+ $(PERL) t/harness --fudge --regression-only --keep-exit-code \
+ t/spec/ \
+
fulltest: all testtest spectest
t/spec:
signature.asc
Description: OpenPGP digital signature
