]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/run.perl
t/run.perl: add (GNU) tail and strace support
[public-inbox.git] / t / run.perl
index f4e235b7fd3a800fb8c1cc4ed3c1fef81e87da11..2fbe403393eb58e0e95d3ae12e2e04bb9d327d45 100755 (executable)
@@ -52,6 +52,13 @@ if (!$ENV{TEST_LEI_DAEMON_PERSIST_DIR} &&
        chomp $lei_daemon_pid;
        $lei_daemon_pid =~ /\A[0-9]+\z/ or die "no daemon pid: $lei_daemon_pid";
        kill(0, $lei_daemon_pid) or die "kill $lei_daemon_pid: $!";
+       if (my $t = $ENV{GNU_TAIL}) {
+               system("$t --pid=$lei_daemon_pid -F " .
+                       "$lei_env->{XDG_RUNTIME_DIR}/lei/errors.log >&2 &");
+       }
+       if (my $strace_cmd = $ENV{STRACE_CMD}) {
+               system("$strace_cmd -p $lei_daemon_pid &");
+       }
        $owner_pid = $$;
 }