[PATCH v2 0/7] Some assorted fixes for GitLab CI
Hi,
I recently had the pleasure of debugging a couple of failing MSVC+Windows jobs in GitLab CI, which hasn't been quite fun because we didn't know to print error logs, and neither did we upload the failed test artifacts. This patch series is the result of this frustration and fixes a couple of smaller issues in the context of our CI:
- I noticed that test slicing is slightly wrong because of a
difference between zero- and one-based indices, which causes us to
skip the first test on GitLab. - I deduplicated how we run Meson tests so that both GitLab and GitHub
use the same "run-test-slice-meson.sh" script.- I add logic to handle failing tests via "print-test-failures.sh".
The result can be found at [1]. Note that tests are failing, but those failures are fixed in a separate patch series via [2]. In any case, I guess those test failures also serve as a good demonstration how the failing tests show up now.
Changes in v3:
- Correct a second invocation of "ci/run-test-slice.sh". I missed this
invocation, and because this job doesn't run by default I didn't
spot that it broke.
- Link to v1: https://lore.kernel.org/r/20260211-b4-pks-ci-meson-improvements-v1-0-cb167cc80b86@pks.imChanges in v2:
- Fix syntax in GitHub workflow.
- Add another patch on top that fixes win+Meson tests in GitHub. Those
tests didn't execute at all, even before this patch series.
- This uncovers another bug in how we set up MERGE_TOOLS_DIR, so this
results in another commit.
- I've now tested also tested the changes on GitHub [3].
- Link to v1: https://lore.kernel.org/r/20260209-b4-pks-ci-msvc-iconv-fixes-v1-0-1e3167cd8828@pks.imThanks!
Patrick
[1]: https://gitlab.com/gitlab-org/git/-/merge_requests/497 [2]: <20260209-b4-pks-ci-msvc-iconv-fixes-v1-0-1e3167cd8828@pks.im> [3]: https://github.com/git/git/pull/2195
---
Patrick Steinhardt (7):
ci: handle failures of test-slice helper
ci: don't skip smallest test slice in GitLab
meson: fix MERGE_TOOL_DIR with "--no-bin-wrappers"
github: fix Meson tests not executing at all
ci: make test slicing consistent across Meson/Make
gitlab-ci: use "run-test-slice-meson.sh"
gitlab-ci: handle failed tests on MSVC+Meson job.github/workflows/main.yml | 8 ++++---- .gitlab-ci.yml | 17 +++++++++++++++-- ci/run-test-slice-meson.sh | 2 +- ci/run-test-slice.sh | 6 +++--- t/helper/test-path-utils.c | 18 ++++++++++++------ t/meson.build | 1 + 6 files changed, 36 insertions(+), 16 deletions(-)
Range-diff versus v1:
1: b5ad91e1bc = 1: b55e0b145f ci: handle failures of test-slice helper
2: 5bed073cfc ! 2: fbdd1df05d ci: don't skip smallest test slice in GitLab
@@ Commit message
As the indices are now one-based it means that GitLab's CI is fixed.
The GitHub workflow is updated accordingly.
+ Helped-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Patrick Steinhardt <ps@pks.im>
## .github/workflows/main.yml ##
@@ .github/workflows/main.yml: jobs:
- name: test
shell: bash
- run: . /etc/profile && ci/run-test-slice.sh ${{matrix.nr}} 10
++ run: . /etc/profile && ci/run-test-slice.sh $((${{matrix.nr}} + 1)) 10
+ - name: print test failures
+ if: failure() && env.FAILED_TEST_ARTIFACTS != ''
+ shell: bash
+@@ .github/workflows/main.yml: jobs:
+ shell: bash
+ env:
+ NO_SVN_TESTS: 1
+- run: . /etc/profile && ci/run-test-slice.sh ${{matrix.nr}} 10
+ run: . /etc/profile && ci/run-test-slice.sh $((${{matrix.nr}} + 1)) 10
- name: print test failures
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
3: 6b061b829d = 3: a5e411aade meson: fix MERGE_TOOL_DIR with "--no-bin-wrappers"
4: 828147d641 = 4: b7d868fc53 github: fix Meson tests not executing at all
5: 05458adc6f = 5: c9690b10a8 ci: make test slicing consistent across Meson/Make
6: 49df181d3d = 6: bee3a9d944 gitlab-ci: use "run-test-slice-meson.sh"
7: e7e9504c16 = 7: ea1e1a4d87 gitlab-ci: handle failed tests on MSVC+Meson job--- base-commit: 3e0db84c88c57e70ac8be8c196dfa92c5d656fbc change-id: 20260209-b4-pks-ci-meson-improvements-93d8a1ffdd27