Skip to content

Commit d5f50f4

Browse files
committed
Precompile bots before running tests
Just precompiling stuff may take many seconds which results in time out of the whole test file. Fixed by precomping the stuff before running it.
1 parent e1bee63 commit d5f50f4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

t/lib/Testable.pm6

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ class Testable {
5656
);
5757
start $!irc-client.run;
5858

59-
$!bot-proc = Proc::Async.new: perl6, ./bin/ ~ $bot ~ .p6;
59+
my $executable = ./bin/ ~ $bot ~ .p6;
60+
run :env(|%*ENV, PERL6LIB => lib), <perl6 -c -->, $executable; # precompahead
61+
$!bot-proc = Proc::Async.new: <perl6 -->, $executable;
6062
END .kill with $!bot-proc;
6163
$!bot-proc.bind-stdin: config.json.IO.open || config-default.json.IO.open;
6264
start react {

0 commit comments

Comments
 (0)