From 8dc0e65e563a372ce6480e1a6820fdd899466ad4 Mon Sep 17 00:00:00 2001 From: Geert Janssens Date: Sun, 6 Oct 2019 17:12:12 +0200 Subject: [PATCH] CI - limit error output to failed tests only Do so by rerunning these tests in verbose mode Obviously that's only possible if ctest had already run which is tested by evaluating the existence of directory /build/Testing --- util/ci/afterfailure | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/util/ci/afterfailure b/util/ci/afterfailure index dd065c1939..3157547a5b 100755 --- a/util/ci/afterfailure +++ b/util/ci/afterfailure @@ -1,12 +1,13 @@ #!/bin/bash -if [[ "$BUILDTYPE" == "cmake-make" ]] || [[ "$BUILDTYPE" == "cmake-ninja" ]]; then - echo "########################"; - echo "##### LastTest.log #####"; - echo "########################"; - cat /build/Testing/Temporary/LastTest.log; +if [[ -d "/build/Testing" ]] ; then + echo + echo "##################################################" + echo "##### Rerunning failed tests in verbose mode #####" + echo "##################################################" + ctest -V --rerun-failed else - echo "Unknown BUILDTYPE: \"$BUILDTYPE\", cannot create failure information."; + echo "Not rerunning tests. ctest hasn't run yet." fi # This script should fail so that the entire script will fail. -exit 1; +exit 1