Skip to content

Commit 3228c74

Browse files
committed
CI test before release
1 parent 1776567 commit 3228c74

File tree

3 files changed

+73
-3
lines changed

3 files changed

+73
-3
lines changed

Changes

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Revision history for Chemistry::Elements
22

33
{{$NEXT}}
4+
- Fix improper use of item, when what was needed is .clone
45

56
0.2 2024-08-07T12:51:52+02:00
67
- Initial version

lib/Chemistry/Elements.rakumod

+1-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ class Chemistry::Elements:auth<zef:raku-community-modules>:ver<0.2> {
219219
Cs Ba La Ce Pr Nd Pm Sm Eu Gd Tb Dy Ho Er Tm Yb Lu Hf Ta W Re Os Ir Pt Au Hg Tl Pb Bi Po At Rn
220220
Fr Ra Ac Th Pa U Np Pu Am Cm Bk Cf Es Fm Md No Lr Rf Ha Sg Bh Hs Mt Ds Rg Cn Nh Fl Mc Lv Ts Og
221221
>
222-
==> map( { state $n = 0; $n++; $_.Str => item $n } )
222+
==> map( { state $n = 0; $n++; $_.Str => $n.clone } )
223223
==> my %symbol_to_name;
224224

225225
# I could perhaps use Z=> above

run-tests

+71-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,66 @@
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

313
say run(<raku --version>, :out).out.slurp.chomp;
414
say "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+
664
say "Testing {
765
"dist.ini".IO.lines.head.substr(7)
866
}{
@@ -15,6 +73,7 @@ my $done = 0;
1573
sub 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

@@ -51,8 +116,12 @@ sub test-dir($dir) {
51116
}
52117

53118
test-dir("t");
119+
test-dir($_) for dir("t", :test({ !.starts-with(".") && "t/$_".IO.d})).map(*.Str).sort;
54120
test-dir("xt") if $author && "xt".IO.e;
55-
install if $install;
121+
if $install {
122+
install;
123+
++$done;
124+
}
56125

57126
if @failed {
58127
say "\nFAILED: {+@failed} of $done:";

0 commit comments

Comments
 (0)