Skip to content

Commit

Permalink
[js] Add a 'make js-spectest' which run a bunch of passing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pmurias committed May 30, 2017
1 parent 2a84ee0 commit 2e0d8b3
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 3 deletions.
8 changes: 5 additions & 3 deletions t/harness5
Expand Up @@ -27,6 +27,7 @@ GetOptions(
'stress:1' => \my $do_stress,
'archive=s' => \my $archive,
'jvm' => \my $jvm,
'js' => \my $js,
'moar' => \my $moar,
'randomize' => \my $randomize,
'slow' => \(my $slow = !$win),
Expand All @@ -36,7 +37,8 @@ GetOptions(
my @pass_through_options = grep m/^--?[^-]/, @ARGV;
my @files = grep m/^[^-]/, @ARGV;

$ENV{'HARNESS_PERL'} = ".${slash}perl6-" . ($moar ? "m" : $jvm ? "j" : "m");

$ENV{'HARNESS_PERL'} = ".${slash}perl6-" . ($js ? "js" : $moar ? "m" : $jvm ? "j" : "m");
$ENV{'PERL6LIB'} = "lib";

my @slow;
Expand Down Expand Up @@ -176,7 +178,7 @@ sub all_in {
}

sub fudge {
my $impl = $moar ? 'rakudo.moar' : 'rakudo.jvm';
my $impl = $js ? 'rakudo.js' : $moar ? 'rakudo.moar' : 'rakudo.jvm';
my $cmd = join ' ', $^X, 't/spec/fudgeall',
@pass_through_options, $impl, @_;
return split ' ', `$cmd`;
Expand All @@ -202,4 +204,4 @@ Options:
--archive=[archive] - write to an archive.
--randomize randomize the order in which test-files are processed.
--slow - spread tests marked "slow" equally over the run (default on non-Win)
--moar/--jvm - mutually exclusive. Use MoarVM/JVM backend
--moar/--jvm/--js - mutually exclusive. Use MoarVM/JVM/JS backend
62 changes: 62 additions & 0 deletions t/spectest.js.data
@@ -0,0 +1,62 @@
# This is a list of all spec tests that are expected to pass.
#
# Empty lines and those beginning with a # are ignored
#
# We intend to include *all* tests from roast, even when we
# skip most of the tests or the entire test file. To verify
# we are running all tests, run:
#
# perl tools/update-passing-test-data.pl
#
# If a file appears in the output of the script, it is not run
# by default. It may need to be fudged in order to run successfully.
# Open an RT when necessary as part of the fudge process, using the
# RT in the fudge message, and then add the test file to this file, sorted.
#
# Each file may have one or more markers that deselects the test:
# long - run tests unless --quick
# stress - run tests only if --stress
# moar - run tests only for MoarVM backend
# See the "make quicktest" and "make stresstest" targets in
# build/Makefile.in for examples of use.


S02-lexical-conventions/begin_end_pod.t
S02-lexical-conventions/bom.t
S02-lexical-conventions/comments.t
S02-lexical-conventions/end-pod.t
S02-lexical-conventions/minimal-whitespace.t
S02-lexical-conventions/one-pass-parsing.t
S02-lexical-conventions/pod-in-multi-line-exprs.t
S02-lexical-conventions/sub-block-parsing.t
S02-lexical-conventions/unicode.t
S02-lexical-conventions/unicode-whitespace.t
S02-lexical-conventions/unspace.t
S02-lists/indexing.t
S02-lists/tree.t
#S02-literals/adverbs.t
#S02-literals/allomorphic.t
S02-literals/array-interpolation.t
S02-literals/autoref.t
#S02-literals/char-by-name.t
S02-literals/char-by-number.t
S02-literals/fmt-interpolation.t
S02-literals/hash-interpolation.t
#S02-literals/heredocs.t
S02-literals/hex_chars.t
S02-literals/listquote.t
S02-literals/listquote-whitespace.t
S02-literals/misc-interpolation.t
S02-literals/numeric.t
S02-literals/pair-boolean.t
S02-literals/pairs.t
S02-literals/pod.t
#S02-literals/quoting.t
S02-literals/quoting-unicode.t
S02-literals/radix.t
#S02-literals/string-interpolation.t
S02-literals/sub-calls.t
S02-literals/subscript.t
S02-literals/types.t
S02-literals/underscores.t
#S02-literals/version.t
4 changes: 4 additions & 0 deletions tools/build/gen-js-makefile.nqp
Expand Up @@ -130,5 +130,9 @@ say("js-clean:\n\t\$(RM_F) $ModuleLoader-nqp rakudo.js $CORE $CORE-combined {nqp
say("js-lint:
gjslint --strict --max_line_length=200 --nojsdoc src/vm/js/perl6-runtime/*.js");


rule('js-testable', 'js-all spectest_checkout spectest_update');
rule('js-spectest', 'js-testable', '$(PERL5) t/harness5 --fudge --js --keep-exit-code --tests-from-file=t/spectest.js.data');

# Stub
say("js-runner-default:")

0 comments on commit 2e0d8b3

Please sign in to comment.