]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
ci: print error_log on perl-framework failure.
authorYann Ylavic <ylavic@apache.org>
Sat, 18 Sep 2021 10:47:06 +0000 (10:47 +0000)
committerYann Ylavic <ylavic@apache.org>
Sat, 18 Sep 2021 10:47:06 +0000 (10:47 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1893410 13f79535-47bb-0310-9956-ffa450edef68

test/travis_run_linux.sh

index a265c4c2a74509415e147220b96c7b3204c40b58..a9803fe3da6f5b8a1cc4cea2d7005520674d99f0 100755 (executable)
@@ -75,6 +75,7 @@ fi
 
 if ! test -v SKIP_TESTING; then
     set +e
+    RV=0
 
     if test -v TEST_MALLOC; then
         # Enable enhanced glibc malloc debugging, see mallopt(3)
@@ -107,10 +108,10 @@ if ! test -v SKIP_TESTING; then
 
     # Skip further testing if a core dump was created during the test
     # suite run above.
-    if test $RV -eq 0 && ls test/perl-framework/t/core test/perl-framework/t/core.* &>/dev/null; then
+    if test $RV -eq 0 && test -n `ls test/perl-framework/t/core{,.*} 2>/dev/null`; then
         RV=4
-    fi            
-    
+    fi
+
     if test -v TEST_SSL -a $RV -eq 0; then
         pushd test/perl-framework
             # Test loading encrypted private keys
@@ -140,12 +141,6 @@ if ! test -v SKIP_TESTING; then
         popd
     fi
 
-    if test -v TEST_H2 -a $RV -eq 0; then
-        # Run HTTP/2 tests.
-        py.test-3 test/modules/http2
-        RV=$?
-    fi
-
     if test -v LITMUS -a $RV -eq 0; then
         pushd test/perl-framework
            mkdir -p t/htdocs/modules/dav
@@ -158,6 +153,16 @@ if ! test -v SKIP_TESTING; then
         popd
     fi
 
+    if test $RV -ne 0 && test -f test/perl-framework/t/logs/error_log; then
+        cat test/perl-framework/t/logs/error_log
+    fi
+
+    if test -v TEST_H2 -a $RV -eq 0; then
+        # Run HTTP/2 tests.
+        py.test-3 test/modules/http2
+        RV=$?
+    fi
+
     # Catch cases where abort()s get logged to stderr by libraries but
     # only cause child processes to terminate e.g. during shutdown,
     # which may not otherwise trigger test failures.
@@ -176,12 +181,12 @@ if ! test -v SKIP_TESTING; then
         fi
     done
 
-    if test -v TEST_UBSAN && ls ubsan.log.* &> /dev/null; then
+    if test -v TEST_UBSAN && test -n `ls ubsan.log.* 2>/dev/null`; then
         cat ubsan.log.*
         RV=3
     fi
 
-    if test -v TEST_ASAN && ls asan.log.* &> /dev/null; then
+    if test -v TEST_ASAN && test -n `ls asan.log.* 2>/dev/null`; then
         cat asan.log.*
 
         # ASan can report memory leaks, fail on errors only
@@ -190,8 +195,7 @@ if ! test -v SKIP_TESTING; then
         fi
     fi
 
-    shopt -s nullglob 
-    for core in test/perl-framework/t/core* ; do
+    for core in `ls test/perl-framework/t/core{,.*} 2>/dev/null`; do
         gdb -ex 'thread apply all backtrace full' -batch ./httpd "$core"
         RV=5
     done