twister: blackbox: coverage: fix matching pattern
Fix the expected pattern randomly matched to coverage.json contents ordered differently at test_coverage_basedir(). Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
This commit is contained in:
parent
fc90c9f824
commit
27456ed2b5
|
@ -47,7 +47,7 @@ class TestCoverage:
|
|||
'coverage.log', 'coverage.json',
|
||||
'coverage'
|
||||
],
|
||||
r'{"files": \[], "gcovr/format_version": ".*"}'
|
||||
r'{"files": \[\], "gcovr/format_version": ".*"}'
|
||||
),
|
||||
]
|
||||
TESTDATA_4 = [
|
||||
|
@ -244,7 +244,7 @@ class TestCoverage:
|
|||
with open(path, "r") as json_file:
|
||||
json_content = json.load(json_file)
|
||||
pattern = re.compile(expected_content)
|
||||
assert pattern.match(json.dumps(json_content))
|
||||
assert pattern.match(json.dumps(json_content, sort_keys=True))
|
||||
if os.path.exists(base_dir):
|
||||
os.rmdir(base_dir)
|
||||
|
||||
|
|
Loading…
Reference in New Issue