Skip to content

Commit

Permalink
[test] Fix test with new clang version
Browse files Browse the repository at this point in the history
A new Clang version produces a different report message and it breaks
the tests. So, another report is chosen for the test which has a more
stable message.
  • Loading branch information
bruntib committed Nov 13, 2024
1 parent 3320e9a commit 35227e6
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions web/tests/functional/diff_local_remote/test_diff_local_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -623,21 +623,23 @@ def test_diff_codeclimate_output(self):
self.assertTrue(issue["location"]["path"])
self.assertTrue(issue["location"]["lines"]["begin"])

malloc_issues = [i for i in issues if i["check_name"] == "unix.Malloc"]
self.assertEqual(malloc_issues, [{
div_zero_in_skip_h = [
i for i in issues if
i["fingerprint"] == "269d82a20d38f23bbf730a2cf1d1668b"]

self.assertEqual(div_zero_in_skip_h, [{
"type": "issue",
"check_name": "unix.Malloc",
"description": "Memory allocated by alloca() should not be "
"deallocated",
"check_name": "core.DivideZero",
"description": "Division by zero",
"categories": [
"Bug Risk"
],
"fingerprint": "c2132f78ef0e01bdb5eacf616048625f",
"severity": "minor",
"fingerprint": "269d82a20d38f23bbf730a2cf1d1668b",
"severity": "major",
"location": {
"path": "new_delete.cpp",
"path": "skip.h",
"lines": {
"begin": 31
"begin": 8
}
}}])

Expand Down

0 comments on commit 35227e6

Please sign in to comment.