From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id CDD701FA19 for ; Wed, 28 Apr 2021 07:52:05 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 06/11] t/run.perl: add (GNU) tail and strace support Date: Wed, 28 Apr 2021 07:52:00 +0000 Message-Id: <20210428075205.19440-7-e@80x24.org> In-Reply-To: <20210428075205.19440-1-e@80x24.org> References: <20210428075205.19440-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: This may help track down some "make check-run" failures that don't seem to manifest under "make check". --- t/run.perl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/t/run.perl b/t/run.perl index f4e235b7..2fbe4033 100755 --- a/t/run.perl +++ b/t/run.perl @@ -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 = $$; }