]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
test: also output server.log on failure
authorHarald Hoyer <harald@redhat.com>
Tue, 14 Aug 2018 09:37:57 +0000 (11:37 +0200)
committerHarald Hoyer <harald@redhat.com>
Tue, 14 Aug 2018 09:37:57 +0000 (11:37 +0200)
test/test-functions

index 57611ff566d8f92e5452a726fa8442031d537b71..f27be9121a325d880030bf43aefd02cc1decd5bb 100644 (file)
@@ -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