Permalink
Browse files

[rakudo] Add spectest_regression makefile target, which only runs tes…

…ts on a known-to-pass whitelist. The goal is to have make spectest be useful enough not to need this; for now, this way provides highly useful information. Patch courtesy of Moritz Lenz (moritz++), with a couple of platform tweaks by jonathan++ so it works on Windows.

git-svn-id: http://svn.perl.org/parrot/trunk/languages/perl6@27708 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information...
1 parent b7d59a6 commit 7d2219f1327ce503c95641c3a0f76762785c14ba @jnthn jnthn committed May 21, 2008
Showing with 69 additions and 1 deletion.
  1. +9 −0 config/makefiles/root.in
  2. +24 −1 t/harness
  3. +36 −0 t/passing_spec
View
@@ -122,6 +122,7 @@ help:
@echo " test: Run the test suite."
@echo " testclean: Clean up test results."
@echo " spectest: Run the official Perl 6 tests."
+ @echo " spectest_regression: Run the tests of the official test suite that are known to pass."
@echo ""
@echo "Cleaning:"
@echo " clean: Basic cleaning up."
@@ -150,12 +151,20 @@ spectest: all t/spec
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:
View
@@ -7,13 +7,15 @@ use File::Spec;
use lib qw( ../../lib );
our %harness_args;
+our $recurse;
BEGIN {
our %harness_args = (
language => 'perl6',
compiler => 'perl6.pbc',
);
+
my %opts;
while( $_ = $ARGV[0] ) {
last unless defined && /^-/;
@@ -22,12 +24,34 @@ BEGIN {
$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: $!";
+ my $slash = $^O eq 'MSWin32' ? '\\' : '/';
+ while (<$f>){
+ next if m/^\s*#/;
+ next unless m/\S/;
+ chomp;
+ $_ =~ s/\//$slash/g;
+ $accepted_tests{"t${slash}spec${slash}$_"} = 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;
+ die "No regression-only tests to run!" unless @tfiles;
+ }
my $cmd = join ' ', $^X, 't/spec/fudgeall', keys(%opts), $impl, @tfiles;
print "$cmd\n";
@@ -62,7 +86,6 @@ BEGIN {
return @hits;
}
-
}
use Parrot::Test::Harness %harness_args;
View
@@ -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

0 comments on commit 7d2219f

Please sign in to comment.