From 5fee3ef27c531ea994a9ceb5e40d0d57bc02c28d Mon Sep 17 00:00:00 2001 From: Wilhelm Schuermann Date: Wed, 6 May 2015 20:56:35 +0200 Subject: [PATCH] Tests: Clean up after "run_all --fast" --- test/.gitignore | 3 +++ test/run_all.in | 35 ++++++++++++++++++++++------------- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/test/.gitignore b/test/.gitignore index ce5e6d22e..76e1a0b72 100644 --- a/test/.gitignore +++ b/test/.gitignore @@ -2,6 +2,9 @@ *.pyc *.data *.log +*.runlog +_run_all_parallel.txt +_run_all_serial.txt autocomplete.t color.t config.t diff --git a/test/run_all.in b/test/run_all.in index b5385fff7..d86cd1722 100755 --- a/test/run_all.in +++ b/test/run_all.in @@ -3,6 +3,24 @@ # Look for taskd in $PATH instead of task/src/ export TASKD_USE_PATH=1 + +runlog_cleanup() { + if [ -f "_run_all_parallel.txt" ]; then + rm _run_all_parallel.txt + fi + if [ -f "_run_all_serial.txt" ]; then + rm _run_all_serial.txt + fi + for i in *.runlog; do + # Ugly hack. :) + if [ -f "$i" ]; then + rm *.runlog + fi + break + done +} + + rc=0 if [ x"$1" = x"--verbose" ]; then @@ -36,19 +54,8 @@ elif [ "$1" = "--fast" ]; then # because 'date +%s' isn't supported on Solaris. STARTEPOCH=`perl -e 'print time'` - if [ -f "_run_all_parallel.txt" ]; then - rm _run_all_parallel.txt - fi - if [ -f "_run_all_serial.txt" ]; then - rm _run_all_serial.txt - fi - for i in *.runlog; do - # Ugly hack. :) - if [ -f "$i" ]; then - rm *.runlog - fi - break - done + # Clean up after aborted runs + runlog_cleanup for i in ${TESTBLOB}; do if [ -x "$i" ]; then @@ -86,6 +93,8 @@ elif [ "$1" = "--fast" ]; then cat *.runlog >> all.log + runlog_cleanup + date >> all.log ENDEPOCH=`perl -e 'print time'`