From 1b1e64095d1403408c19714669c70db59b3999c6 Mon Sep 17 00:00:00 2001 From: firewave Date: Tue, 3 Dec 2024 13:10:28 +0100 Subject: [PATCH 1/2] fixed #13365 - addons/test/util.py: got rid of non-portable commands --- addons/test/util.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/addons/test/util.py b/addons/test/util.py index 8f0d003d798..0f99534edc6 100644 --- a/addons/test/util.py +++ b/addons/test/util.py @@ -25,13 +25,10 @@ def dump_create(fpath, *argv): p.communicate() if p.returncode != 0: raise OSError("cppcheck returns error code: %d" % p.returncode) - with subprocess.Popen(["sync"]) as p: - p.communicate() def dump_remove(fpath): - with subprocess.Popen(["rm", "-f", fpath + ".dump"]) as p: - p.communicate() + os.remove(fpath + ".dump") def convert_json_output(raw_json_strings): From 417f130529c69a9853e929405d202abc94fa3e97 Mon Sep 17 00:00:00 2001 From: firewave Date: Thu, 5 Dec 2024 01:32:11 +0100 Subject: [PATCH 2/2] misra_test.py: removed unnecessary `dump_remove()` call from `test_rules_suppression()` --- addons/test/misra_test.py | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/test/misra_test.py b/addons/test/misra_test.py index 9ab1975677c..b1c44893c57 100644 --- a/addons/test/misra_test.py +++ b/addons/test/misra_test.py @@ -116,7 +116,6 @@ def test_rules_suppression(checker, capsys): for src in test_sources: re_suppressed= r"\[%s\:[0-9]+\]" % src - dump_remove(src) dump_create(src, "--suppressions-list=addons/test/misra/suppressions.txt","--inline-suppr") checker.parseDump(src + ".dump") captured = capsys.readouterr().err