From b1fca3f72251cc17a8f1a369d04594827bf02262 Mon Sep 17 00:00:00 2001 From: Jochen Sprickerhof Date: Fri, 25 Nov 2022 11:32:15 +0100 Subject: [PATCH] run-tests: always cleanup testfiles --- tests/run-tests | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/tests/run-tests b/tests/run-tests index 82af2148..306c54dc 100755 --- a/tests/run-tests +++ b/tests/run-tests @@ -80,6 +80,17 @@ exit(c.get('apksigner') is None) " } +err_handler() { +# remove this to prevent git conflicts and complaining + rm -rf "$WORKSPACE"/fdroidserver.egg-info/ + rm -rf "$WORKSPACE"/.testfiles/run-tests.* + rm -rf "$WORKSPACE"/.testfiles/test_* + rm -f "$WORKSPACE"/.testfiles/tmp.* + rmdir --ignore-fail-on-non-empty "$WORKSPACE"/.testfiles +} + +trap err_handler INT EXIT + #------------------------------------------------------------------------------# # "main" @@ -1427,9 +1438,4 @@ grep "CurrentVersionCode: 1" metadata/fake.yml unset GIT_ALLOW_PROTOCOL -#------------------------------------------------------------------------------# - -# remove this to prevent git conflicts and complaining -rm -rf $WORKSPACE/fdroidserver.egg-info/ - echo SUCCESS