Commit 27456ed2 authored by Dmitrii Golovanov's avatar Dmitrii Golovanov Committed by Anas Nashif
Browse files

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: default avatarDmitrii Golovanov <dmitrii.golovanov@intel.com>
parent fc90c9f8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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)