diff options
author | Pablo Saavedra <[email protected]> | 2020-05-13 20:48:32 +0200 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-05-18 17:27:42 +0000 |
commit | e85dc9a240601a201ec662f1a17bbdbea2965bfd (patch) | |
tree | 487cf93aff38698153964dac0b2a4639b4d924c9 /.gitlab-ci/tracie | |
parent | 550a4f77648f68bc48df34ce9d39dc3df1461f13 (diff) |
ci: Split test_tracie_skips_traces_without_checksum in separate cases
test_tracie_skips_traces_without_checksum does the logic previous to
the commit 8546d1dd789b58bd0aff5ca0a231efb35c09c1ac. The traces.yml includes
several traces, only the one without checksum is ignored by tracie.
As a complementary action, this change adds an new test
(test_tracie_only_traces_without_checksum) to verify the behavior for
cases where the traces.yml only contains traces without checksum.
Finally, test_tracie_skips_traces_without_checksum is renamed as
test_tracie_traces_with_and_without_checksum
Signed-off-by: Pablo Saavedra <[email protected]>
Reviewed-by: Andres Gomez <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4916>
Diffstat (limited to '.gitlab-ci/tracie')
-rw-r--r-- | .gitlab-ci/tracie/tests/test.py | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/.gitlab-ci/tracie/tests/test.py b/.gitlab-ci/tracie/tests/test.py index f8c55cae985..40b1a45d3f5 100644 --- a/.gitlab-ci/tracie/tests/test.py +++ b/.gitlab-ci/tracie/tests/test.py @@ -129,7 +129,24 @@ def test_tracie_fails_on_image_mismatch(): assert check_results_yaml_content(RESULTS_YAML, expectations) -def test_tracie_skips_traces_without_checksum(): +def test_tracie_traces_with_and_without_checksum(): + filename = "./tests/traces.yml" + content = read_from(filename) + content += ''' - path: trace1/red.testtrace + expectations: + - device: bla + checksum: 000000000000000''' + write_to(content, filename) + + # red.testtrace should be skipped, since it doesn't + # have any checksums for our device + filename = "./traces-db/trace1/red.testtrace" + content = "ff0000ff" + write_to(content, filename) + assert run_tracie() + + +def test_tracie_only_traces_without_checksum(): filename = "./tests/traces.yml" content = '''traces: - path: trace1/red.testtrace |