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
+ );
2
12
3
13
say run(<raku --version>, :out).out.slurp.chomp;
4
14
say "Running on $*DISTRO.gist().\n";
5
15
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
+
6
64
say "Testing {
7
65
"dist.ini".IO.lines.head.substr(7)
8
66
}{
@@ -15,6 +73,7 @@ my $done = 0;
15
73
sub process($proc, $filename) {
16
74
if $proc {
17
75
$proc.out.slurp;
76
+ $spesh-log.unlink if $spesh-log;
18
77
}
19
78
else {
20
79
@failed.push($filename);
@@ -32,6 +91,12 @@ sub process($proc, $filename) {
32
91
else {
33
92
say "No output received, exit-code $proc.exitcode() ($proc.signal()):\n$proc.os-error()";
34
93
}
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
+ }
35
100
}
36
101
}
37
102
@@ -51,8 +116,12 @@ sub test-dir($dir) {
51
116
}
52
117
53
118
test-dir("t");
119
+ test-dir($_) for dir("t", :test({ !.starts-with(".") && "t/$_".IO.d})).map(*.Str).sort;
54
120
test-dir("xt") if $author && "xt".IO.e;
55
- install if $install;
121
+ if $install {
122
+ install;
123
+ ++$done;
124
+ }
56
125
57
126
if @failed {
58
127
say "\nFAILED: {+@failed} of $done:";
0 commit comments