diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-05-15 19:49:18 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-05-15 19:49:18 -0400 |
commit | 01bd6cfd1783f2c598b10939e0a59a489e720cf7 (patch) | |
tree | a6196149a08f4b29d4dc9145b0d77c7dbfe4c788 /.gitlab-ci/meson-junit-report.py | |
parent | 5870f1c90ade6c600b714f819aa5dd5db16e80e4 (diff) | |
download | gtk+-01bd6cfd1783f2c598b10939e0a59a489e720cf7.tar.gz |
ci: Add the backend to the reports
We want the test names in the junit xml to be
unique across all the tests in a job, so we need
to include the backend in the test name.
And we also want to see the used backend in
the html report.
Diffstat (limited to '.gitlab-ci/meson-junit-report.py')
-rwxr-xr-x | .gitlab-ci/meson-junit-report.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/.gitlab-ci/meson-junit-report.py b/.gitlab-ci/meson-junit-report.py index dd0b13897c..532305cdca 100755 --- a/.gitlab-ci/meson-junit-report.py +++ b/.gitlab-ci/meson-junit-report.py @@ -19,6 +19,9 @@ aparser = argparse.ArgumentParser(description='Turns a Meson test log into a JUn aparser.add_argument('--project-name', metavar='NAME', help='The project name', default='unknown') +aparser.add_argument('--backend', metavar='NAME', + help='The used backend', + default='unknown') aparser.add_argument('--job-id', metavar='ID', help='The job ID for the report', default='Unknown') @@ -92,18 +95,18 @@ for name, units in suites.items(): for unit in successes: testcase = ET.SubElement(testsuite, 'testcase') testcase.set('classname', '{}/{}'.format(args.project_name, unit['suite'])) - testcase.set('name', unit['name']) + testcase.set('name', '{}/{}'.format(args.backend, unit['name'])) testcase.set('time', str(unit['duration'])) for unit in failures: testcase = ET.SubElement(testsuite, 'testcase') testcase.set('classname', '{}/{}'.format(args.project_name, unit['suite'])) - testcase.set('name', unit['name']) + testcase.set('name', '{}/{}'.format(args.backend, unit['name'])) testcase.set('time', str(unit['duration'])) failure = ET.SubElement(testcase, 'failure') failure.set('classname', '{}/{}'.format(args.project_name, unit['suite'])) - failure.set('name', unit['name']) + testcase.set('name', '{}/{}'.format(args.backend, unit['name'])) failure.set('type', 'error') failure.text = unit['stdout'] |