]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
TestBed: correct log handling.
authorAmos Jeffries <squid3@treenet.co.nz>
Thu, 26 Feb 2009 03:58:09 +0000 (16:58 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 26 Feb 2009 03:58:09 +0000 (16:58 +1300)
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

index 36a2e4ca471354a2a69f92e973974913196abd62..ac92755c20d3c09bc06e544061aa2e1139d80466 100755 (executable)
@@ -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