Skip to content
Permalink
Browse files

Add a m-spectest5_precompile to run tests in precompilation mode

Currently this fails for both tests that use 'use lib' or have
precompilation only bugs. Fixing the 'use lib' part need further
work.
  • Loading branch information...
pmurias committed Jan 16, 2019
1 parent 836c18a commit 89fee86acec7feaf2b70843416c513f2a4bac5f6
Showing with 10 additions and 1 deletion.
  1. +4 −1 t/harness5
  2. +2 −0 t/precompileandrun
  3. +4 −0 tools/build/Makefile-Moar.in
@@ -28,6 +28,7 @@ GetOptions(
'quick:1' => \my $do_quick,
'stress:1' => \my $do_stress,
'archive=s' => \my $archive,
'precompile' => \my $precompile,
'jvm' => \my $jvm,
'js' => \my $js,
'moar' => \my $moar,
@@ -120,8 +121,9 @@ if ($jvm) {
}

if (eval "require $tap_harness_class;") {
my $run_with_perl = $precompile ? [$ENV{HARNESS_PERL}, 't/precompileandrun'] : [$ENV{HARNESS_PERL}];
my %harness_options = (
exec => $jvm ? [$^X, "./eval-client.pl", "TESTTOKEN", "run"] : [$ENV{HARNESS_PERL}],
exec => $jvm ? [$^X, "./eval-client.pl", "TESTTOKEN", "run"] : $run_with_perl,
verbosity => 0+$Test::Harness::verbose,
jobs => $jobs,
ignore_exit => 1,
@@ -239,6 +241,7 @@ Options:
--slow - spread tests marked "slow" equally over the run (default on non-Win)
--moar/--jvm/--js - mutually exclusive. Use MoarVM/JVM backend
--no-merge - pass STDERR from the tests through to the terminal's STDERR
--precompile - precompile tests before running them
--verbosity=[level] - set the verbosity level.
1 verbose Print individual test results to STDOUT.
@@ -0,0 +1,2 @@
$*REPO.precomp-repository.precompile(@*ARGS[0].IO, 'precompiled_test', :force);
$*REPO.precomp-repository.load('precompiled_test');
@@ -240,6 +240,10 @@ m-coretest5: m-all
m-spectest5: m-testable t/spectest.data
$(M_HARNESS5_WITH_FUDGE) --tests-from-file=t/spectest.data

# Run the spectests that we know work after precompiling them.
m-spectest5_precompile: m-testable t/spectest.data
$(M_HARNESS5_WITH_FUDGE) --precompile --tests-from-file=t/spectest.data

m-spectest_full5: m-testable
$(M_HARNESS5_WITH_FUDGE) t/spec

0 comments on commit 89fee86

Please sign in to comment.
You can’t perform that action at this time.