aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-10-10 18:35:25 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-10-10 18:35:25 +0100
commite0f9b728dd5f6aa56aaf1cab0880ef59002e4cb7 (patch)
tree2d0b23e461a3bb30e2c20e3ed0df295d80dce2b5
parent88c1cdfa234c04f61ea026e588c5819c39acd4ee (diff)
downloadpaludis-e0f9b728dd5f6aa56aaf1cab0880ef59002e4cb7.tar.gz
paludis-e0f9b728dd5f6aa56aaf1cab0880ef59002e4cb7.tar.xz
Keep a record of test failures
-rw-r--r--.gitignore1
-rw-r--r--test/Makefile.am2
-rwxr-xr-xtest/run_test.sh7
3 files changed, 9 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 65c77d9..23bdadc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,6 +22,7 @@ Makefile
*.1
man-*
.keep
+*.epicfail
!/paludis/repositories/e/ebuild/utils/dolib.a
!/paludis/repositories/e/ebuild/utils/dolib.so
diff --git a/test/Makefile.am b/test/Makefile.am
index d178ef1..f2bdabf 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1,4 +1,4 @@
-CLEANFILES = *~ gmon.out *.gcov *.gcno *.gcda *.loT
+CLEANFILES = *~ gmon.out *.gcov *.gcno *.gcda *.loT test_fail_TEST.epicfail
MAINTAINERCLEANFILES = Makefile.in
AM_CXXFLAGS = -I$(top_srcdir) @PALUDIS_CXXFLAGS@ @PALUDIS_CXXFLAGS_VISIBILITY@
EXTRA_DIST = run_test.sh
diff --git a/test/run_test.sh b/test/run_test.sh
index 5bffa4d..a5f49bd 100755
--- a/test/run_test.sh
+++ b/test/run_test.sh
@@ -38,6 +38,13 @@ fi
if [[ 0 != ${code} ]] ; then
echo ">>> test ${testname} returned ${code}"
+ if [[ -z "${PALUDIS_TESTS_RERUN_VERBOSELY}" ]] ; then
+ out=`pwd`/${testname#./}.epicfail
+ echo ">>> rerunning test ${testname} verbosely redirected to ${out}"
+ env PALUDIS_TESTS_RERUN_VERBOSELY=no PALUDIS_TESTS_KEEP_STDERR=yes \
+ PALUDIS_TESTS_KEEP_LOG=yes $@ 2>&1 > $out
+ echo ">>> saved output of verbose ${testname} rerun to ${out}"
+ fi
echo ">>> exiting with error for test ${testname}"
exit 255
fi