summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-10-10 12:51:46 -0700
committerJunio C Hamano <gitster@pobox.com>2025-10-10 12:51:46 -0700
commitffa7a4331af576be0e5d51969837f89824a14c7f (patch)
tree791e0db3d0de5010d3153a13a478f4c6c3afe12f
parent60f3f52f17cceefa5299709b189ce6fe2d181e7b (diff)
parent3c4925c3f5dbafec2c0c9b3b7ac7d9086618a18f (diff)
Merge branch 'ps/gitlab-ci-windows-improvements'
GitLab CI improvements. * ps/gitlab-ci-windows-improvements: t8020: fix test failure due to indeterministic tag sorting gitlab-ci: upload Meson test logs as JUnit reports gitlab-ci: drop workaround for Python certificate store on Windows gitlab-ci: ignore failures to disable realtime monitoring gitlab-ci: dedup instructions to disable realtime monitoring
-rw-r--r--.gitlab-ci.yml29
-rwxr-xr-xt/t8020-last-modified.sh34
2 files changed, 36 insertions, 27 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 230868b79b..f7d57d1ee9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -70,6 +70,8 @@ test:linux:
artifacts:
paths:
- t/failed-test-artifacts
+ reports:
+ junit: build/meson-logs/testlog.junit.xml
when: on_failure
test:osx:
@@ -110,8 +112,16 @@ test:osx:
artifacts:
paths:
- t/failed-test-artifacts
+ reports:
+ junit: build/meson-logs/testlog.junit.xml
when: on_failure
+.windows_before_script: &windows_before_script
+ # Disabling realtime monitoring fails on some of the runners, but it
+ # significantly speeds up test execution in the case where it works. We thus
+ # try our luck, but ignore any failures.
+ - Set-MpPreference -DisableRealtimeMonitoring $true; $true
+
build:mingw64:
stage: build
tags:
@@ -119,7 +129,7 @@ build:mingw64:
variables:
NO_PERL: 1
before_script:
- - Set-MpPreference -DisableRealtimeMonitoring $true
+ - *windows_before_script
- ./ci/install-sdk.ps1 -directory "git-sdk"
script:
- git-sdk/usr/bin/bash.exe -l -c 'ci/make-test-artifacts.sh artifacts'
@@ -136,7 +146,7 @@ test:mingw64:
- job: "build:mingw64"
artifacts: true
before_script:
- - Set-MpPreference -DisableRealtimeMonitoring $true
+ - *windows_before_script
- git-sdk/usr/bin/bash.exe -l -c 'tar xf artifacts/artifacts.tar.gz'
- New-Item -Path .git/info -ItemType Directory
- New-Item .git/info/exclude -ItemType File -Value "/git-sdk"
@@ -150,18 +160,10 @@ test:mingw64:
tags:
- saas-windows-medium-amd64
before_script:
- - Set-MpPreference -DisableRealtimeMonitoring $true
- - choco install -y git meson ninja openssl
+ - *windows_before_script
+ - choco install -y git meson ninja
- Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1
- refreshenv
- # The certificate store for Python on Windows is broken and fails to fetch
- # certificates, see https://bugs.python.org/issue36011. This seems to
- # mostly be an issue with how the GitLab image is set up as it is a
- # non-issue on GitHub Actions. Work around the issue by importing
- # cetrificates manually.
- - Invoke-WebRequest https://curl.haxx.se/ca/cacert.pem -OutFile cacert.pem
- - openssl pkcs12 -export -nokeys -in cacert.pem -out certs.pfx -passout "pass:"
- - Import-PfxCertificate -CertStoreLocation Cert:\LocalMachine\Root -FilePath certs.pfx
build:msvc-meson:
extends: .msvc-meson
@@ -183,6 +185,9 @@ test:msvc-meson:
script:
- meson test -C build --no-rebuild --print-errorlogs --slice $Env:CI_NODE_INDEX/$Env:CI_NODE_TOTAL
parallel: 10
+ artifacts:
+ reports:
+ junit: build/meson-logs/testlog.junit.xml
test:fuzz-smoke-tests:
image: ubuntu:latest
diff --git a/t/t8020-last-modified.sh b/t/t8020-last-modified.sh
index e13aad1439..61f00bc15c 100755
--- a/t/t8020-last-modified.sh
+++ b/t/t8020-last-modified.sh
@@ -33,7 +33,6 @@ check_last_modified() {
done &&
cat >expect &&
- test_when_finished "rm -f tmp.*" &&
git ${indir:+-C "$indir"} last-modified "$@" >tmp.1 &&
git name-rev --annotate-stdin --name-only --tags \
<tmp.1 >tmp.2 &&
@@ -128,20 +127,25 @@ test_expect_success 'only last-modified files in the current tree' '
EOF
'
-test_expect_success 'last-modified with subdir and criss-cross merge' '
- git checkout -b branch-k1 1 &&
- mkdir -p a k &&
- test_commit k1 a/file2 &&
- git checkout -b branch-k2 &&
- test_commit k2 k/file2 &&
- git checkout branch-k1 &&
- test_merge km2 branch-k2 &&
- test_merge km3 3 &&
- check_last_modified <<-\EOF
- km3 a
- k2 k
- 1 file
- EOF
+test_expect_success 'subdirectory modified via merge' '
+ test_when_finished rm -rf repo &&
+ git init repo &&
+ (
+ cd repo &&
+ test_commit base &&
+ git switch --create left &&
+ mkdir subdir &&
+ test_commit left subdir/left &&
+ git switch --create right base &&
+ mkdir subdir &&
+ test_commit right subdir/right &&
+ git switch - &&
+ test_merge merge right &&
+ check_last_modified <<-\EOF
+ merge subdir
+ base base.t
+ EOF
+ )
'
test_expect_success 'cross merge boundaries in blaming' '