From: Eric Covener Date: Sun, 19 Mar 2023 21:04:00 +0000 (+0000) Subject: rerun failing tests with -v X-Git-Tag: 2.5.0-alpha2-ci-test-only~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6fc8b4288e8716a17b63d0f4993dba66032a3ff0;p=thirdparty%2Fapache%2Fhttpd.git rerun failing tests with -v Submitted by: covener Github: closes #349 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1908531 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/test/travis_run_linux.sh b/test/travis_run_linux.sh index 1dc64871d48..c2ae092954a 100755 --- a/test/travis_run_linux.sh +++ b/test/travis_run_linux.sh @@ -119,14 +119,44 @@ if ! test -v SKIP_TESTING; then if ! test -v NO_TEST_FRAMEWORK; then if test -v WITH_TEST_SUITE; then - make check TESTS="${TESTS}" TEST_CONFIG="${TEST_ARGS}" - RV=$? + make check TESTS="${TESTS}" TEST_CONFIG="${TEST_ARGS}" | tee test.log + RV=${PIPESTATUS[0]} + # re-run failing tests with -v, avoiding set -e + if [ $RV -ne 0 ]; then + # mv test/perl-framework/t/logs/error_log test/perl-framework/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 test/perl-framework/t/logs/error_log_save test/perl-framework/t/logs/error_log + false + fi else 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