]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
re-run failing tests with -v
authorEric Covener <covener@apache.org>
Sun, 19 Mar 2023 21:05:11 +0000 (21:05 +0000)
committerEric Covener <covener@apache.org>
Sun, 19 Mar 2023 21:05:11 +0000 (21:05 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1908532 13f79535-47bb-0310-9956-ffa450edef68

test/travis_run_linux.sh

index 58370700437f14dfbe8e8bfb7eeb224cc04d3a67..f7a72d29f8207b636b260d4e0c72895b4597f429 100755 (executable)
@@ -122,8 +122,23 @@ if ! test -v SKIP_TESTING; then
         test -v TEST_INSTALL || make install
         pushd test/perl-framework
             perl Makefile.PL -apxs $PREFIX/bin/apxs
-            make test APACHE_TEST_EXTRA_ARGS="${TEST_ARGS} ${TESTS}"
-            RV=$?
+            make test APACHE_TEST_EXTRA_ARGS="${TEST_ARGS} ${TESTS}" | tee test.log
+            RV=${PIPESTATUS[0]}
+            # re-run failing tests with -v, avoiding set -e
+            if [ $RV -ne 0 ]; then
+                #mv t/logs/error_log t/logs/error_log_save
+                FAILERS=""
+                while read FAILER; do
+                    FAILERS="$FAILERS $FAILER"
+                done < <(awk '/Failed:/{print $1}' test.log)
+                if [ -n "$FAILERS" ]; then
+                    t/TEST -v $FAILERS || true
+                fi
+                # set -e would have killed us after the original t/TEST
+                rm -f test.log
+                #mv t/logs/error_log_save t/logs/error_log
+                false
+            fi
         popd
     fi