summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2010-05-23 17:03:02 +0200
committerMichael Buesch <mb@bu3sch.de>2010-05-23 17:03:02 +0200
commit047e229c954567c9a6ab9eb46882ff8ccd93dd8b (patch)
tree0e93e7b5aaa2f059d76a9a9944c62915d675d8bd /tests
parentfe37365149de71a5620e5316837f602f0e56158e (diff)
downloadtoprammer-047e229c954567c9a6ab9eb46882ff8ccd93dd8b.tar.xz
toprammer-047e229c954567c9a6ab9eb46882ff8ccd93dd8b.zip
testsuite: Fix cleanup
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/run-tests.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/run-tests.sh b/tests/run-tests.sh
index 5179360..bca5592 100755
--- a/tests/run-tests.sh
+++ b/tests/run-tests.sh
@@ -8,8 +8,12 @@ basedir="$(dirname "$0")"
tmpdir="/tmp/toprammer-test-$$"
+cleanup_enabled=1
+
function cleanup
{
+ [ $cleanup_enabled -ne 0 ] || return
+ echo "Cleanup..."
rm -Rf "$tmpdir"
}
@@ -224,13 +228,16 @@ function do_run_test # $1=device, $2=testscript
while $(true); do
test_init
[ $? -eq 0 ] || break
+ cleanup_enabled=0
( test_run )
- if [ $? -ne 0 ]; then
+ local res=$?
+ cleanup_enabled=1
+ if [ $res -ne 0 ]; then
test_exit
ask "$current_test failed. RETRY?"
[ $? -eq 0 ] && continue
ask "Terminate testsuite?"
- [ $? -eq 0 ] && exit 1
+ [ $? -eq 0 ] && abort
break
fi
test_exit
bues.ch cgit interface