35 lines
1.2 KiB
Diff
35 lines
1.2 KiB
Diff
|
From 827a5b1a80c63f62fbe70945d46a8eb9453fc9fe Mon Sep 17 00:00:00 2001
|
||
|
From: Harald Hoyer <harald@redhat.com>
|
||
|
Date: Tue, 14 Aug 2018 11:37:57 +0200
|
||
|
Subject: [PATCH] test: also output server.log on failure
|
||
|
|
||
|
---
|
||
|
test/test-functions | 6 +++++-
|
||
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/test/test-functions b/test/test-functions
|
||
|
index 57611ff5..f27be912 100644
|
||
|
--- a/test/test-functions
|
||
|
+++ b/test/test-functions
|
||
|
@@ -75,6 +75,9 @@ while (($# > 0)); do
|
||
|
test_setup && test_run
|
||
|
ret=$?
|
||
|
test_cleanup
|
||
|
+ if ((ret!=0)) && [[ -f "$TESTDIR"/server.log ]]; then
|
||
|
+ mv [[ -f "$TESTDIR"/server.log ]] ./
|
||
|
+ fi
|
||
|
rm -fr -- "$TESTDIR"
|
||
|
rm -f -- .testdir
|
||
|
exit $ret
|
||
|
@@ -88,7 +91,8 @@ while (($# > 0)); do
|
||
|
else
|
||
|
echo -e "TEST: $TEST_DESCRIPTION " $COLOR_FAILURE "[FAILED]" $COLOR_NORMAL
|
||
|
if [ "$V" == "2" ]; then
|
||
|
- cat $(pwd)/test.log
|
||
|
+ cat $(pwd)/server.log $(pwd)/test.log
|
||
|
+ echo -e "TEST: $TEST_DESCRIPTION " $COLOR_FAILURE "[FAILED]" $COLOR_NORMAL
|
||
|
else
|
||
|
echo "see $(pwd)/test.log"
|
||
|
fi
|
||
|
|