summaryrefslogtreecommitdiff
path: root/.gitlab-ci/meson-junit-report.py
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-05-15 19:49:18 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-05-15 19:49:18 -0400
commit01bd6cfd1783f2c598b10939e0a59a489e720cf7 (patch)
treea6196149a08f4b29d4dc9145b0d77c7dbfe4c788 /.gitlab-ci/meson-junit-report.py
parent5870f1c90ade6c600b714f819aa5dd5db16e80e4 (diff)
downloadgtk+-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.py9
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']