Skip to content

Commit

Permalink
fixed #13365 - addons/test/util.py: got rid of non-portable commands (d…
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave authored Dec 5, 2024
1 parent 1a5743c commit 9fbc137
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion addons/test/misra_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 1 addition & 4 deletions addons/test/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 9fbc137

Please sign in to comment.