1- unit sub MAIN(:a($author), :i($install));
1+ unit sub MAIN(
2+ :a($author),
3+ :i($install),
4+ :$rmd,
5+ :$disable-spesh,
6+ :$disable-spesh-inline,
7+ :$disable-JIT,
8+ :$enable-spesh-nodelay,
9+ :$enable-spesh-blocking,
10+ :$enable-spesh-log,
11+ );
212
313say run(<raku --version>, :out).out.slurp.chomp;
414say "Running on $*DISTRO.gist().\n";
515
16+ if $rmd {
17+ %*ENV<RAKUDO_MODULE_DEBUG> := 1;
18+ say "RAKUDO_MODULE_DEBUG=1";
19+ }
20+
21+ if $disable-spesh {
22+ %*ENV<MVM_SPESH_DISABLE> := 1;
23+ say "MVM_SPESH_DISABLE=1";
24+ }
25+
26+ if $disable-spesh-inline {
27+ %*ENV<MVM_SPESH_INLINE_DISABLE> := 1;
28+ say "MVM_SPESH_INLINE_DISABLE=1";
29+ }
30+
31+ if $disable-JIT {
32+ %*ENV<MVM_JIT_DISABLE> := 1;
33+ say "MVM_JIT_DISABLE=1";
34+ }
35+
36+ if $enable-spesh-nodelay {
37+ %*ENV<MVM_SPESH_NODELAY> := 1;
38+ say "MVM_SPESH_NODELAY=1";
39+ }
40+
41+ if $enable-spesh-blocking {
42+ %*ENV<MVM_SPESH_BLOCKING> := 1;
43+ say "MVM_SPESH_BLOCKING=1";
44+ }
45+
46+ my $spesh-log;
47+ if $enable-spesh-log {
48+ $spesh-log = (
49+ $enable-spesh-log ~~ Bool ?? "spesh-log" !! $enable-spesh-log
50+ ).IO;
51+ %*ENV<MVM_SPESH_LOG> := $spesh-log.absolute;
52+ say "MVM_SPESH_LOG=$spesh-log.relative()";
53+ }
54+
55+ say ""
56+ if $rmd
57+ || $disable-spesh
58+ || $disable-spesh-inline
59+ || $disable-JIT
60+ || $enable-spesh-nodelay
61+ || $enable-spesh-blocking
62+ || $enable-spesh-log;
63+
664say "Testing {
7- "dist.ini".IO.lines.head.substr(7)
65+ (try "dist.ini".IO.lines.head.substr(7)) // "..."
866}{
967 " including author tests" if $author
1068}";
@@ -15,6 +73,7 @@ my $done = 0;
1573sub process($proc, $filename) {
1674 if $proc {
1775 $proc.out.slurp;
76+ $spesh-log.unlink if $spesh-log;
1877 }
1978 else {
2079 @failed.push($filename);
@@ -32,6 +91,12 @@ sub process($proc, $filename) {
3291 else {
3392 say "No output received, exit-code $proc.exitcode() ($proc.signal()):\n$proc.os-error()";
3493 }
94+
95+ if $spesh-log {
96+ say "\nSpesh log requested, showing last 20000 lines:";
97+ say $spesh-log.lines(:!chomp).tail(20000).join;
98+ $spesh-log.unlink;
99+ }
35100 }
36101}
37102
@@ -53,7 +118,10 @@ sub test-dir($dir) {
53118test-dir("t");
54119test-dir($_) for dir("t", :test({ !.starts-with(".") && "t/$_".IO.d})).map(*.Str).sort;
55120test-dir("xt") if $author && "xt".IO.e;
56- install if $install;
121+ if $install {
122+ install;
123+ ++$done;
124+ }
57125
58126if @failed {
59127 say "\nFAILED: {+@failed} of $done:";
0 commit comments