While persisting lei-daemon across different test cases isn't
the default anymore, we can notice problems more quickly if
the daemon PID changes since the daemon gets auto-restarted
after failures.
---
 t/run.perl | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/t/run.perl b/t/run.perl
index b0ee611a..e5ee0ade 100755
--- a/t/run.perl
+++ b/t/run.perl
@@ -254,5 +254,8 @@ for (my $i = $repeat; $i != 0; $i--) {
 print $OLDOUT "1..".($repeat * scalar(@tests))."\n" if $repeat >= 0;
 if ($lei_env && $$ == $owner_pid) {
        my $opt = { 1 => $OLDOUT, 2 => $OLDERR };
+       my $cur_daemon_pid;
+       run_script([qw(lei daemon-pid)], $lei_env, { 1 => \$cur_daemon_pid });
        run_script([qw(lei daemon-kill)], $lei_env, $opt);
+       DIE "lei daemon restarted\n" if $cur_daemon_pid != $lei_daemon_pid;
 }
--
unsubscribe: one-click, see List-Unsubscribe header
archive: https://public-inbox.org/meta/

Reply via email to