Always clean up even if the build failed
[strace-test.git] / strace-build-test
index 48ac2b1..e119fa7 100755 (executable)
@@ -94,14 +94,13 @@ cd ~
 # Run the command, outout to typescript
 script -c "schroot -r -c $mysid ~/build/strace/inside-schroot-test.sh"
 
-if [ -f ${BDIR}/RESULT ] ; then
-    schroot -e -c $mysid
-    rm -rf ${BDIR}
-    rm -f ~/build/strace/inside-schroot-test.sh
-else
+if [ ! -f ${BDIR}/RESULT ] ; then
     echo "BUILD FAILED - not doing cleanup"
     echo "Results in ${BDIR}"
 fi
+schroot -e -c $mysid
+rm -rf ${BDIR}
+rm -f ~/build/strace/inside-schroot-test.sh
 mv typescript typescript-$ARCH-$HOSTNAME-${DATETIME}.txt
 
 gzip -9 typescript-$ARCH-$HOSTNAME-${DATETIME}.txt