From b135d49dfa8588bc364505f2a3729a9ef3eccb5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Csord=C3=A1s?= Date: Wed, 5 May 2021 11:18:00 +0200 Subject: [PATCH] [web][test] Ignore errors when removing workspace directories --- web/tests/functional/cli_config/__init__.py | 2 +- web/tests/functional/cmdline/__init__.py | 2 +- web/tests/functional/component/__init__.py | 2 +- web/tests/functional/cppcheck/__init__.py | 2 +- web/tests/functional/db_cleanup/__init__.py | 2 +- web/tests/functional/delete_runs/__init__.py | 2 +- web/tests/functional/detection_status/__init__.py | 2 +- web/tests/functional/diff_local/__init__.py | 2 +- web/tests/functional/diff_local_remote/__init__.py | 2 +- web/tests/functional/diff_remote/__init__.py | 2 +- web/tests/functional/export_import/__init__.py | 2 +- web/tests/functional/extended_report_data/__init__.py | 2 +- web/tests/functional/func_template/template__init__.py | 2 +- web/tests/functional/instance_manager/__init__.py | 2 +- web/tests/functional/products/__init__.py | 2 +- web/tests/functional/report_viewer_api/__init__.py | 2 +- web/tests/functional/review_status/__init__.py | 2 +- web/tests/functional/run_tag/__init__.py | 2 +- web/tests/functional/server_configuration/__init__.py | 2 +- web/tests/functional/skip/__init__.py | 2 +- web/tests/functional/source_change/__init__.py | 2 +- web/tests/functional/statistics/__init__.py | 2 +- web/tests/functional/store/__init__.py | 2 +- web/tests/functional/suppress/__init__.py | 2 +- web/tests/functional/update/__init__.py | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/web/tests/functional/cli_config/__init__.py b/web/tests/functional/cli_config/__init__.py index 95e8d8e030..cfa0f7e73d 100644 --- a/web/tests/functional/cli_config/__init__.py +++ b/web/tests/functional/cli_config/__init__.py @@ -68,4 +68,4 @@ def teardown_package(): codechecker.remove_test_package_product(TEST_WORKSPACE, check_env) print("Removing: " + TEST_WORKSPACE) - shutil.rmtree(TEST_WORKSPACE) + shutil.rmtree(TEST_WORKSPACE, ignore_errors=True) diff --git a/web/tests/functional/cmdline/__init__.py b/web/tests/functional/cmdline/__init__.py index 09c64b6be0..8e1c9e0086 100644 --- a/web/tests/functional/cmdline/__init__.py +++ b/web/tests/functional/cmdline/__init__.py @@ -113,4 +113,4 @@ def teardown_package(): codechecker.remove_test_package_product(TEST_WORKSPACE, check_env) print("Removing: " + TEST_WORKSPACE) - shutil.rmtree(TEST_WORKSPACE) + shutil.rmtree(TEST_WORKSPACE, ignore_errors=True) diff --git a/web/tests/functional/component/__init__.py b/web/tests/functional/component/__init__.py index 604e303f08..6013277e1e 100644 --- a/web/tests/functional/component/__init__.py +++ b/web/tests/functional/component/__init__.py @@ -102,4 +102,4 @@ def teardown_package(): codechecker.remove_test_package_product(TEST_WORKSPACE, check_env) print("Removing: " + TEST_WORKSPACE) - shutil.rmtree(TEST_WORKSPACE) + shutil.rmtree(TEST_WORKSPACE, ignore_errors=True) diff --git a/web/tests/functional/cppcheck/__init__.py b/web/tests/functional/cppcheck/__init__.py index bfa7db5b7d..ef660ef4e0 100644 --- a/web/tests/functional/cppcheck/__init__.py +++ b/web/tests/functional/cppcheck/__init__.py @@ -69,4 +69,4 @@ def teardown_package(): codechecker.remove_test_package_product(TEST_WORKSPACE, check_env) print("Removing: " + TEST_WORKSPACE) - shutil.rmtree(TEST_WORKSPACE) + shutil.rmtree(TEST_WORKSPACE, ignore_errors=True) diff --git a/web/tests/functional/db_cleanup/__init__.py b/web/tests/functional/db_cleanup/__init__.py index 8d6308f294..14b9152d89 100644 --- a/web/tests/functional/db_cleanup/__init__.py +++ b/web/tests/functional/db_cleanup/__init__.py @@ -49,4 +49,4 @@ def teardown_package(): global TEST_WORKSPACE print("Removing: " + TEST_WORKSPACE) - shutil.rmtree(TEST_WORKSPACE) + shutil.rmtree(TEST_WORKSPACE, ignore_errors=True) diff --git a/web/tests/functional/delete_runs/__init__.py b/web/tests/functional/delete_runs/__init__.py index b70155abc9..f9b09932d2 100644 --- a/web/tests/functional/delete_runs/__init__.py +++ b/web/tests/functional/delete_runs/__init__.py @@ -123,4 +123,4 @@ def teardown_package(): codechecker.remove_test_package_product(TEST_WORKSPACE, check_env) print("Removing: " + TEST_WORKSPACE) - shutil.rmtree(TEST_WORKSPACE) + shutil.rmtree(TEST_WORKSPACE, ignore_errors=True) diff --git a/web/tests/functional/detection_status/__init__.py b/web/tests/functional/detection_status/__init__.py index 397be2425e..9e50f4dec4 100644 --- a/web/tests/functional/detection_status/__init__.py +++ b/web/tests/functional/detection_status/__init__.py @@ -67,4 +67,4 @@ def teardown_package(): codechecker.remove_test_package_product(TEST_WORKSPACE, check_env) print("Removing: " + TEST_WORKSPACE) - shutil.rmtree(TEST_WORKSPACE) + shutil.rmtree(TEST_WORKSPACE, ignore_errors=True) diff --git a/web/tests/functional/diff_local/__init__.py b/web/tests/functional/diff_local/__init__.py index d6d96e3c38..6f25860026 100644 --- a/web/tests/functional/diff_local/__init__.py +++ b/web/tests/functional/diff_local/__init__.py @@ -111,4 +111,4 @@ def teardown_package(): global TEST_WORKSPACE print("Removing: " + TEST_WORKSPACE) - shutil.rmtree(TEST_WORKSPACE) + shutil.rmtree(TEST_WORKSPACE, ignore_errors=True) diff --git a/web/tests/functional/diff_local_remote/__init__.py b/web/tests/functional/diff_local_remote/__init__.py index 20e23786fe..586412ba0b 100644 --- a/web/tests/functional/diff_local_remote/__init__.py +++ b/web/tests/functional/diff_local_remote/__init__.py @@ -146,4 +146,4 @@ def teardown_package(): codechecker.remove_test_package_product(TEST_WORKSPACE, check_env) print("Removing: " + TEST_WORKSPACE) - shutil.rmtree(TEST_WORKSPACE) + shutil.rmtree(TEST_WORKSPACE, ignore_errors=True) diff --git a/web/tests/functional/diff_remote/__init__.py b/web/tests/functional/diff_remote/__init__.py index b185d8ab21..02cfdd9481 100644 --- a/web/tests/functional/diff_remote/__init__.py +++ b/web/tests/functional/diff_remote/__init__.py @@ -206,4 +206,4 @@ def teardown_package(): codechecker.remove_test_package_product(TEST_WORKSPACE, check_env) print("Removing: " + TEST_WORKSPACE) - shutil.rmtree(TEST_WORKSPACE) + shutil.rmtree(TEST_WORKSPACE, ignore_errors=True) diff --git a/web/tests/functional/export_import/__init__.py b/web/tests/functional/export_import/__init__.py index cd98318362..614f745362 100644 --- a/web/tests/functional/export_import/__init__.py +++ b/web/tests/functional/export_import/__init__.py @@ -117,4 +117,4 @@ def teardown_package(): codechecker.remove_test_package_product(TEST_WORKSPACE, check_env) print("Removing: " + TEST_WORKSPACE) - shutil.rmtree(TEST_WORKSPACE) + shutil.rmtree(TEST_WORKSPACE, ignore_errors=True) diff --git a/web/tests/functional/extended_report_data/__init__.py b/web/tests/functional/extended_report_data/__init__.py index db2125745f..455aeaba0b 100644 --- a/web/tests/functional/extended_report_data/__init__.py +++ b/web/tests/functional/extended_report_data/__init__.py @@ -94,4 +94,4 @@ def teardown_package(): codechecker.remove_test_package_product(TEST_WORKSPACE, check_env) print("Removing: " + TEST_WORKSPACE) - # shutil.rmtree(TEST_WORKSPACE) + # shutil.rmtree(TEST_WORKSPACE, ignore_errors=True) diff --git a/web/tests/functional/func_template/template__init__.py b/web/tests/functional/func_template/template__init__.py index 9708495166..a5a57d283c 100644 --- a/web/tests/functional/func_template/template__init__.py +++ b/web/tests/functional/func_template/template__init__.py @@ -126,4 +126,4 @@ def teardown_package(): codechecker.remove_test_package_product(TEST_WORKSPACE, check_env) print("Removing: " + TEST_WORKSPACE) - shutil.rmtree(TEST_WORKSPACE) + shutil.rmtree(TEST_WORKSPACE, ignore_errors=True) diff --git a/web/tests/functional/instance_manager/__init__.py b/web/tests/functional/instance_manager/__init__.py index 48652a1665..40c5abef46 100644 --- a/web/tests/functional/instance_manager/__init__.py +++ b/web/tests/functional/instance_manager/__init__.py @@ -89,4 +89,4 @@ def teardown_package(): global TEST_WORKSPACE print("Removing: " + TEST_WORKSPACE) - shutil.rmtree(TEST_WORKSPACE) + shutil.rmtree(TEST_WORKSPACE, ignore_errors=True) diff --git a/web/tests/functional/products/__init__.py b/web/tests/functional/products/__init__.py index 12bf3175e9..faed51c159 100644 --- a/web/tests/functional/products/__init__.py +++ b/web/tests/functional/products/__init__.py @@ -107,4 +107,4 @@ def teardown_package(): codechecker.remove_test_package_product(TEST_WORKSPACE) print("Removing: " + TEST_WORKSPACE) - shutil.rmtree(TEST_WORKSPACE) + shutil.rmtree(TEST_WORKSPACE, ignore_errors=True) diff --git a/web/tests/functional/report_viewer_api/__init__.py b/web/tests/functional/report_viewer_api/__init__.py index bb7a235ab0..2abd642333 100644 --- a/web/tests/functional/report_viewer_api/__init__.py +++ b/web/tests/functional/report_viewer_api/__init__.py @@ -142,4 +142,4 @@ def teardown_package(): codechecker.remove_test_package_product(TEST_WORKSPACE, check_env) print("Removing: " + TEST_WORKSPACE) - shutil.rmtree(TEST_WORKSPACE) + shutil.rmtree(TEST_WORKSPACE, ignore_errors=True) diff --git a/web/tests/functional/review_status/__init__.py b/web/tests/functional/review_status/__init__.py index d98b8b3f08..3d38776ca2 100644 --- a/web/tests/functional/review_status/__init__.py +++ b/web/tests/functional/review_status/__init__.py @@ -98,4 +98,4 @@ def teardown_package(): codechecker.remove_test_package_product(TEST_WORKSPACE, check_env) print("Removing: " + TEST_WORKSPACE) - shutil.rmtree(TEST_WORKSPACE) + shutil.rmtree(TEST_WORKSPACE, ignore_errors=True) diff --git a/web/tests/functional/run_tag/__init__.py b/web/tests/functional/run_tag/__init__.py index 3a3221f59e..c00b5bf3d6 100644 --- a/web/tests/functional/run_tag/__init__.py +++ b/web/tests/functional/run_tag/__init__.py @@ -66,4 +66,4 @@ def teardown_package(): codechecker.remove_test_package_product(TEST_WORKSPACE, check_env) print("Removing: " + TEST_WORKSPACE) - shutil.rmtree(TEST_WORKSPACE) + shutil.rmtree(TEST_WORKSPACE, ignore_errors=True) diff --git a/web/tests/functional/server_configuration/__init__.py b/web/tests/functional/server_configuration/__init__.py index 3368466d10..6d22595260 100644 --- a/web/tests/functional/server_configuration/__init__.py +++ b/web/tests/functional/server_configuration/__init__.py @@ -76,4 +76,4 @@ def teardown_package(): codechecker.remove_test_package_product(TEST_WORKSPACE, check_env) print("Removing: " + TEST_WORKSPACE) - shutil.rmtree(TEST_WORKSPACE) + shutil.rmtree(TEST_WORKSPACE, ignore_errors=True) diff --git a/web/tests/functional/skip/__init__.py b/web/tests/functional/skip/__init__.py index c8701a7f5c..4a00f237ca 100644 --- a/web/tests/functional/skip/__init__.py +++ b/web/tests/functional/skip/__init__.py @@ -123,7 +123,7 @@ def teardown_package(): codechecker.remove_test_package_product(TEST_WORKSPACE, check_env) print("Removing: " + TEST_WORKSPACE) - shutil.rmtree(TEST_WORKSPACE) + shutil.rmtree(TEST_WORKSPACE, ignore_errors=True) def _generate_skip_list_file(skip_list_file): diff --git a/web/tests/functional/source_change/__init__.py b/web/tests/functional/source_change/__init__.py index f4af823f7d..cb7d4e7d07 100644 --- a/web/tests/functional/source_change/__init__.py +++ b/web/tests/functional/source_change/__init__.py @@ -100,4 +100,4 @@ def teardown_package(): codechecker.remove_test_package_product(TEST_WORKSPACE, check_env) print("Removing: " + TEST_WORKSPACE) - shutil.rmtree(TEST_WORKSPACE) + shutil.rmtree(TEST_WORKSPACE, ignore_errors=True) diff --git a/web/tests/functional/statistics/__init__.py b/web/tests/functional/statistics/__init__.py index 270cb573c6..772d7fe98c 100644 --- a/web/tests/functional/statistics/__init__.py +++ b/web/tests/functional/statistics/__init__.py @@ -87,4 +87,4 @@ def teardown_package(): global TEST_WORKSPACE print("Removing: " + TEST_WORKSPACE) - shutil.rmtree(TEST_WORKSPACE) + shutil.rmtree(TEST_WORKSPACE, ignore_errors=True) diff --git a/web/tests/functional/store/__init__.py b/web/tests/functional/store/__init__.py index e1f0fc9046..ca515bda78 100644 --- a/web/tests/functional/store/__init__.py +++ b/web/tests/functional/store/__init__.py @@ -74,4 +74,4 @@ def teardown_package(): codechecker.remove_test_package_product(TEST_WORKSPACE, check_env) print("Removing: " + TEST_WORKSPACE) - shutil.rmtree(TEST_WORKSPACE) + shutil.rmtree(TEST_WORKSPACE, ignore_errors=True) diff --git a/web/tests/functional/suppress/__init__.py b/web/tests/functional/suppress/__init__.py index 1a082df92f..69d8027097 100644 --- a/web/tests/functional/suppress/__init__.py +++ b/web/tests/functional/suppress/__init__.py @@ -102,7 +102,7 @@ def teardown_package(): codechecker.remove_test_package_product(TEST_WORKSPACE, check_env) print("Removing: " + TEST_WORKSPACE) - shutil.rmtree(TEST_WORKSPACE) + shutil.rmtree(TEST_WORKSPACE, ignore_errors=True) def _generate_suppress_file(suppress_file): diff --git a/web/tests/functional/update/__init__.py b/web/tests/functional/update/__init__.py index 61fe0e4269..1d62679a29 100644 --- a/web/tests/functional/update/__init__.py +++ b/web/tests/functional/update/__init__.py @@ -94,4 +94,4 @@ def teardown_package(): codechecker.remove_test_package_product(TEST_WORKSPACE, check_env) print("Removing: " + TEST_WORKSPACE) - shutil.rmtree(TEST_WORKSPACE) + shutil.rmtree(TEST_WORKSPACE, ignore_errors=True)