Skip to content

Commit a0afd4f

Browse files
committed
Merge branch 'jk/ci-windows-meson-test-fix' into next
"Windows+meson" job at the GitHub Actions CI was hard to debug, as it did not show and save failed test artifacts, which has been corrected. * jk/ci-windows-meson-test-fix: ci(windows-meson-test): handle options and output like other test jobs unit-test: ignore --no-chain-lint
2 parents 3a34152 + 17bd110 commit a0afd4f

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

.github/workflows/main.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,17 @@ jobs:
298298
path: build
299299
- name: Test
300300
shell: pwsh
301-
run: meson test -C build --no-rebuild --print-errorlogs --slice "$(1+${{ matrix.nr }})/10"
301+
run: ci/run-test-slice-meson.sh build ${{matrix.nr}} 10
302+
- name: print test failures
303+
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
304+
shell: bash
305+
run: ci/print-test-failures.sh
306+
- name: Upload failed tests' directories
307+
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
308+
uses: actions/upload-artifact@v4
309+
with:
310+
name: failed-tests-windows-meson-${{ matrix.nr }}
311+
path: ${{env.FAILED_TEST_ARTIFACTS}}
302312

303313
regular:
304314
name: ${{matrix.vector.jobname}} (${{matrix.vector.pool}})

ci/run-test-slice-meson.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/sh
2+
3+
# We must load the build options so we know where to find
4+
# things like TEST_OUTPUT_DIRECTORY. This has to come before
5+
# loading lib.sh, though, because it may clobber some CI lib
6+
# variables like our custom GIT_TEST_OPTS.
7+
. "$1"/GIT-BUILD-OPTIONS
8+
. ${0%/*}/lib.sh
9+
10+
group "Run tests" \
11+
meson test -C "$1" --no-rebuild --print-errorlogs \
12+
--test-args="$GIT_TEST_OPTS" --slice "$((1+$2))/$3" ||
13+
handle_failed_tests

t/unit-tests/unit-test.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ int cmd_main(int argc, const char **argv)
2929
OPT_NOOP_NOARG('d', "debug"),
3030
OPT_NOOP_NOARG(0, "github-workflow-markup"),
3131
OPT_NOOP_NOARG(0, "no-bin-wrappers"),
32+
OPT_NOOP_ARG(0, "no-chain-lint"),
3233
OPT_NOOP_ARG(0, "root"),
3334
OPT_NOOP_ARG(0, "stress"),
3435
OPT_NOOP_NOARG(0, "tee"),

0 commit comments

Comments
 (0)