Skip to content

Commit 0e98965

Browse files
pks-tgitster
authored andcommitted
gitlab-ci: upload Meson test logs as JUnit reports
When running tests, Meson knows to output both a test log as well as a JUnit test report that collates results. We don't currently upload these results in our GitLab CI at all, which makes it hard to see which tests ran, but also which of our tests may have failed. Upload these JUnit reports as artifacts to make this information more accessible. Note that we also do this for some jobs that don't use Meson and thus don't generate these reports in the first place. GitLab CI handles missing reports gracefully though, so there is no reason to special-case those jobs that don't use Meson. Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 82ad27e commit 0e98965

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.gitlab-ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ test:linux:
7070
artifacts:
7171
paths:
7272
- t/failed-test-artifacts
73+
reports:
74+
junit: build/meson-logs/testlog.junit.xml
7375
when: on_failure
7476

7577
test:osx:
@@ -110,6 +112,8 @@ test:osx:
110112
artifacts:
111113
paths:
112114
- t/failed-test-artifacts
115+
reports:
116+
junit: build/meson-logs/testlog.junit.xml
113117
when: on_failure
114118

115119
.windows_before_script: &windows_before_script
@@ -181,6 +185,9 @@ test:msvc-meson:
181185
script:
182186
- meson test -C build --no-rebuild --print-errorlogs --slice $Env:CI_NODE_INDEX/$Env:CI_NODE_TOTAL
183187
parallel: 10
188+
artifacts:
189+
reports:
190+
junit: build/meson-logs/testlog.junit.xml
184191

185192
test:fuzz-smoke-tests:
186193
image: ubuntu:latest

0 commit comments

Comments
 (0)