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 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):