Merge branch 'ps/ci-misc-updates'

CI updates (containerization, dropping stale ones, etc.).

* ps/ci-misc-updates:
  ci: remove stale code for Azure Pipelines
  ci: use latest Ubuntu release
  ci: stop special-casing for Ubuntu 16.04
  gitlab-ci: add linux32 job testing against i386
  gitlab-ci: remove the "linux-old" job
  github: simplify computation of the job's distro
  github: convert all Linux jobs to be containerized
  github: adapt containerized jobs to be rootless
  t7422: fix flaky test caused by buffered stdout
  t0060: fix EBUSY in MinGW when setting up runtime prefix
This commit is contained in:
Junio C Hamano
2025-02-06 14:56:44 -08:00
7 changed files with 95 additions and 90 deletions

View File

@ -592,17 +592,19 @@ test_lazy_prereq CAN_EXEC_IN_PWD '
./git rev-parse
'
test_expect_success !VALGRIND,RUNTIME_PREFIX,CAN_EXEC_IN_PWD 'setup runtime prefix' '
mkdir -p pretend/bin &&
cp "$GIT_EXEC_PATH"/git$X pretend/bin/
'
test_expect_success !VALGRIND,RUNTIME_PREFIX,CAN_EXEC_IN_PWD 'RUNTIME_PREFIX works' '
mkdir -p pretend/bin pretend/libexec/git-core &&
mkdir -p pretend/libexec/git-core &&
echo "echo HERE" | write_script pretend/libexec/git-core/git-here &&
cp "$GIT_EXEC_PATH"/git$X pretend/bin/ &&
GIT_EXEC_PATH= ./pretend/bin/git here >actual &&
echo HERE >expect &&
test_cmp expect actual'
test_expect_success !VALGRIND,RUNTIME_PREFIX,CAN_EXEC_IN_PWD '%(prefix)/ works' '
mkdir -p pretend/bin &&
cp "$GIT_EXEC_PATH"/git$X pretend/bin/ &&
git config yes.path "%(prefix)/yes" &&
GIT_EXEC_PATH= ./pretend/bin/git config --path yes.path >actual &&
echo "$(pwd)/pretend/yes" >expect &&

View File

@ -167,10 +167,45 @@ do
done
test_expect_success !MINGW 'git submodule status --recursive propagates SIGPIPE' '
{ git submodule status --recursive 2>err; echo $?>status; } |
grep -q X/S &&
test_must_be_empty err &&
test_match_signal 13 "$(cat status)"
# The test setup is somewhat involved because triggering a SIGPIPE is
# racy with buffered pipes. To avoid the raciness we thus need to make
# sure that the subprocess in question fills the buffers completely,
# which requires a couple thousand submodules in total.
test_when_finished "rm -rf submodule repo" &&
git init submodule &&
(
cd submodule &&
test_commit initial &&
COMMIT=$(git rev-parse HEAD) &&
for i in $(test_seq 2000)
do
printf "[submodule \"sm-$i\"]\npath = recursive-submodule-path-$i\n" "$i" ||
return 1
done >gitmodules &&
BLOB=$(git hash-object -w --stdin <gitmodules) &&
printf "100644 blob $BLOB\t.gitmodules\n" >tree &&
for i in $(test_seq 2000)
do
printf "160000 commit $COMMIT\trecursive-submodule-path-%d\n" "$i" ||
return 1
done >>tree &&
TREE=$(git mktree <tree) &&
COMMIT=$(git commit-tree "$TREE") &&
git reset --hard "$COMMIT"
) &&
git init repo &&
(
cd repo &&
GIT_ALLOW_PROTOCOL=file git submodule add "$(pwd)"/../submodule &&
{ git submodule status --recursive 2>err; echo $?>status; } |
grep -q recursive-submodule-path-1 &&
test_must_be_empty err &&
test_match_signal 13 "$(cat status)"
)
'
test_done