summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/main.yml12
-rwxr-xr-xci/run-test-slice-meson.sh13
-rw-r--r--t/unit-tests/unit-test.c1
3 files changed, 25 insertions, 1 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 816d5a34c4..27ebf2c8cc 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -298,7 +298,17 @@ jobs:
path: build
- name: Test
shell: pwsh
- run: meson test -C build --no-rebuild --print-errorlogs --slice "$(1+${{ matrix.nr }})/10"
+ run: ci/run-test-slice-meson.sh build ${{matrix.nr}} 10
+ - name: print test failures
+ if: failure() && env.FAILED_TEST_ARTIFACTS != ''
+ shell: bash
+ run: ci/print-test-failures.sh
+ - name: Upload failed tests' directories
+ if: failure() && env.FAILED_TEST_ARTIFACTS != ''
+ uses: actions/upload-artifact@v4
+ with:
+ name: failed-tests-windows-meson-${{ matrix.nr }}
+ path: ${{env.FAILED_TEST_ARTIFACTS}}
regular:
name: ${{matrix.vector.jobname}} (${{matrix.vector.pool}})
diff --git a/ci/run-test-slice-meson.sh b/ci/run-test-slice-meson.sh
new file mode 100755
index 0000000000..961c94fba0
--- /dev/null
+++ b/ci/run-test-slice-meson.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# We must load the build options so we know where to find
+# things like TEST_OUTPUT_DIRECTORY. This has to come before
+# loading lib.sh, though, because it may clobber some CI lib
+# variables like our custom GIT_TEST_OPTS.
+. "$1"/GIT-BUILD-OPTIONS
+. ${0%/*}/lib.sh
+
+group "Run tests" \
+ meson test -C "$1" --no-rebuild --print-errorlogs \
+ --test-args="$GIT_TEST_OPTS" --slice "$((1+$2))/$3" ||
+handle_failed_tests
diff --git a/t/unit-tests/unit-test.c b/t/unit-tests/unit-test.c
index 5af645048a..752fb38fb3 100644
--- a/t/unit-tests/unit-test.c
+++ b/t/unit-tests/unit-test.c
@@ -29,6 +29,7 @@ int cmd_main(int argc, const char **argv)
OPT_NOOP_NOARG('d', "debug"),
OPT_NOOP_NOARG(0, "github-workflow-markup"),
OPT_NOOP_NOARG(0, "no-bin-wrappers"),
+ OPT_NOOP_ARG(0, "no-chain-lint"),
OPT_NOOP_ARG(0, "root"),
OPT_NOOP_ARG(0, "stress"),
OPT_NOOP_NOARG(0, "tee"),