guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[shepherd] 03/03: tests: Print the shepherd log at the end of all the te


From: Ludovic Courtès
Subject: [shepherd] 03/03: tests: Print the shepherd log at the end of all the test logs.
Date: Wed, 10 Apr 2024 12:32:00 -0400 (EDT)

civodul pushed a commit to branch devel
in repository shepherd.

commit f765fca6c6acd8027c661d8df9e0f0bd9c35b709
Author: Attila Lendvai <attila@lendvai.name>
AuthorDate: Sat Dec 9 11:33:53 2023 +0100

    tests: Print the shepherd log at the end of all the test logs.
    
    * tests/daemonize.sh, tests/eval-load.sh,
    tests/misbehaved-client.sh, tests/signals.sh,
    tests/startup-failure.sh, tests/status-sexp.sh: Add “cat $log” to ‘trap’
    snippet.
---
 tests/daemonize.sh         | 2 +-
 tests/eval-load.sh         | 2 +-
 tests/misbehaved-client.sh | 2 +-
 tests/signals.sh           | 2 +-
 tests/startup-failure.sh   | 2 +-
 tests/status-sexp.sh       | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/tests/daemonize.sh b/tests/daemonize.sh
index af00a0c..df2430d 100644
--- a/tests/daemonize.sh
+++ b/tests/daemonize.sh
@@ -37,7 +37,7 @@ pid="t-pid-$$"
 
 herd="herd -s $socket"
 
-trap "rm -f $socket $conf $log;
+trap "cat $log || true; rm -f $socket $conf $log;
       test -f $pid && kill \`cat $pid\` || true; rm -f $pid" EXIT
 
 cat > "$conf" <<EOF
diff --git a/tests/eval-load.sh b/tests/eval-load.sh
index 0ac78bf..0e282c5 100755
--- a/tests/eval-load.sh
+++ b/tests/eval-load.sh
@@ -26,7 +26,7 @@ pid="t-pid-$$"
 
 herd="herd -s $socket"
 
-trap "rm -f $socket $conf $log;
+trap "cat $log || true; rm -f $socket $conf $log;
       test -f $pid && kill \`cat $pid\` || true; rm -f $pid" EXIT
 
 cat > "$conf" <<EOF
diff --git a/tests/misbehaved-client.sh b/tests/misbehaved-client.sh
index 00e7d8f..3b86360 100644
--- a/tests/misbehaved-client.sh
+++ b/tests/misbehaved-client.sh
@@ -26,7 +26,7 @@ pid="t-pid-$$"
 
 herd="herd -s $socket"
 
-trap "rm -f $socket $conf $stamp $log;
+trap "cat $log || true; rm -f $socket $conf $stamp $log;
       test -f $pid && kill \`cat $pid\` || true; rm -f $pid" EXIT
 
 rm -f "$pid"
diff --git a/tests/signals.sh b/tests/signals.sh
index 09f7068..4aa7d3a 100644
--- a/tests/signals.sh
+++ b/tests/signals.sh
@@ -28,7 +28,7 @@ pid="t-pid-$$"
 
 herd="herd -s $socket"
 
-trap "rm -f $socket $conf $stamp $log;
+trap "cat $log || true; rm -f $socket $conf $stamp $log;
       test -f $pid && kill \`cat $pid\` || true; rm -f $pid" EXIT
 
 cat > "$conf"<<EOF
diff --git a/tests/startup-failure.sh b/tests/startup-failure.sh
index 2c8d11a..f118ecc 100644
--- a/tests/startup-failure.sh
+++ b/tests/startup-failure.sh
@@ -27,7 +27,7 @@ stamp="t-stamp-$$"
 
 herd="herd -s $socket"
 
-trap "rm -f $socket $conf $log $stamp;
+trap "cat $log || true; rm -f $socket $conf $log $stamp;
       test -f $pid && kill \`cat $pid\` || true; rm -f $pid" EXIT
 
 cat > "$conf" <<EOF
diff --git a/tests/status-sexp.sh b/tests/status-sexp.sh
index 32c0fad..d8359f2 100644
--- a/tests/status-sexp.sh
+++ b/tests/status-sexp.sh
@@ -26,7 +26,7 @@ pid="t-pid-$$"
 
 herd="herd -s $socket"
 
-trap "rm -f $socket $conf $stamp $log;
+trap "cat $log || true; rm -f $socket $conf $stamp $log;
       test -f $pid && kill \`cat $pid\` || true; rm -f $pid" EXIT
 
 cat > "$conf"<<EOF



reply via email to

[Prev in Thread] Current Thread [Next in Thread]