diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2020-02-13 13:56:33 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2020-02-13 14:55:39 +0000 |
commit | 2b1e273c53ffe0701df6876225d11297d0e9987f (patch) | |
tree | a7e4c7a236e5b17ba678a6e340b23835969c9218 /.gitlab-ci | |
parent | 1a4d1f899404c0e82269bef279c2b17e2330fd9c (diff) | |
download | gtk+-2b1e273c53ffe0701df6876225d11297d0e9987f.tar.gz |
ci: Use result instead of exit code in the JUnit report
We have a result code coming from Meson which is more accurate than just
looking at the exit code of the unit.
Diffstat (limited to '.gitlab-ci')
-rwxr-xr-x | .gitlab-ci/meson-junit-report.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/.gitlab-ci/meson-junit-report.py b/.gitlab-ci/meson-junit-report.py index 248ef6e2b1..f63c82eb36 100755 --- a/.gitlab-ci/meson-junit-report.py +++ b/.gitlab-ci/meson-junit-report.py @@ -51,6 +51,7 @@ for line in args.infile: duration = data['duration'] return_code = data['returncode'] + result = data['result'] log = data['stdout'] unit = { @@ -58,6 +59,7 @@ for line in args.infile: 'name': unit_name, 'duration': duration, 'returncode': return_code, + 'result': result, 'stdout': log, } @@ -68,12 +70,12 @@ for name, units in suites.items(): print('Processing suite {} (units: {})'.format(name, len(units))) def if_failed(unit): - if unit['returncode'] != 0: + if unit['result'] in ['FAIL', 'UNEXPECTEDPASS', 'TIMEOUT']: return True return False def if_succeded(unit): - if unit['returncode'] == 0: + if unit['result'] in ['OK', 'EXPECTEDFAIL', 'SKIP']: return True return False |