From eb6dc6e6b02a1352deb27792a79e91f7aea1ee18 Mon Sep 17 00:00:00 2001 From: elsid Date: Tue, 25 Jun 2024 00:48:43 +0200 Subject: [PATCH] Keep generated files on integration tests failure --- scripts/integration_tests.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/integration_tests.py b/scripts/integration_tests.py index 698c129d33..9e04ff52df 100755 --- a/scripts/integration_tests.py +++ b/scripts/integration_tests.py @@ -129,6 +129,7 @@ for entry in tests_dir.glob("test_*"): if entry.is_dir(): if not runTest(entry.name): status = -1 -shutil.rmtree(config_dir, ignore_errors=True) -shutil.rmtree(userdata_dir, ignore_errors=True) +if status == 0: + shutil.rmtree(config_dir, ignore_errors=True) + shutil.rmtree(userdata_dir, ignore_errors=True) exit(status)