From cac277bb674fe05c0ea184fad30de07c2d976d99 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Thu, 26 Feb 2009 16:58:09 +1300 Subject: [PATCH] TestBed: correct log handling. Removal of the log MUST happen after the log has been checked for a successful run. Removal of run data MAY hapen before this. Probably data SHOULD be removed early to prevent excess data between runs. --- test-builds.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test-builds.sh b/test-builds.sh index 36a2e4ca47..ac92755c20 100755 --- a/test-builds.sh +++ b/test-builds.sh @@ -51,10 +51,14 @@ buildtest() { grep -E "${errors}" $log && exit 1 if test "${cleanup}" = "yes" ; then echo "REMOVE: ${btlayer}" - rm -f -r ${btlayer} $log + rm -f -r ${btlayer} fi result=`tail -2 $log | head -1` test "${result}" = "Build Successful." || ( tail -5 $log ; exit 1 ) + if test "${cleanup}" = "yes" ; then + echo "REMOVE: ${log}" + rm -f -r $log + fi } # Run a single test build by name or opts file -- 2.47.2