Skip to content

Commit b74a7db

Browse files
committed
Indicate that the bot process finished
This should make it easier to see segfaults when running tests. Also, use the new stdin config (see 7f880a5).
1 parent a2f3d7c commit b74a7db

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

t/lib/Testable.pm6

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,13 @@ class Testable {
4242
);
4343
start $!irc-client.run;
4444

45-
$!bot-proc = Proc::Async.new: ./bin/ ~ $bot ~ .p6;
46-
$!bot-proc.start: :ENV(|%*ENV, PERL6LIB => lib);
45+
$!bot-proc = Proc::Async.new: perl6, ./bin/ ~ $bot ~ .p6;
46+
$!bot-proc.bind-stdin: config.json.IO.open;
47+
start react {
48+
whenever $!bot-proc.start(:ENV(|%*ENV, PERL6LIB => lib)) {
49+
note Bot process finished (exit code={.exitcode}, signal={.signal})
50+
}
51+
}
4752

4853
start { sleep 20; $ready.send: False }
4954
$!bot-nick = $ready.receive;

0 commit comments

Comments
 (0)