Skip to content

Commit

Permalink
CI - limit error output to failed tests only
Browse files Browse the repository at this point in the history
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
  • Loading branch information
gjanssens committed Oct 6, 2019
1 parent 43a47ba commit 8dc0e65
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions util/ci/afterfailure
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 8dc0e65

Please sign in to comment.