2025-12-14 00:29:46 +09:00
|
|
|
#!/bin/bash -e
|
2026-04-23 15:38:58 +09:00
|
|
|
ver="9.11"
|
2025-12-14 00:29:46 +09:00
|
|
|
repo=https://github.com/coreutils/coreutils
|
|
|
|
|
curl -L "${repo}/releases/download/v${ver}/coreutils-${ver}.tar.xz" | tar --strip-components=1 -xJf -
|
|
|
|
|
|
2026-02-08 02:11:26 +09:00
|
|
|
# TODO stop backporting tests from master at GNU coreutils > $ver
|
2026-04-23 15:38:58 +09:00
|
|
|
backport=(
|
2026-07-14 04:18:50 +09:00
|
|
|
cat/splice.sh # split tests
|
2026-08-21 09:31:23 +09:00
|
|
|
dd/fail-ftruncate-fstat.sh # remove LD_PRELOAD
|
2026-08-31 22:16:12 +09:00
|
|
|
dd/stderr.sh # replace GNU/test binary by uutils/test
|
2026-08-28 01:28:07 +09:00
|
|
|
misc/close-stdout.sh # fix hardcoded pathes to GNU executables
|
2026-08-13 12:12:26 +02:00
|
|
|
misc/uname-labeled.sh # uname -A/--all-labeled, added after $ver
|
2026-07-04 17:31:06 +09:00
|
|
|
nproc/nproc-quota.sh # remove LD_PRELOAD
|
2026-08-16 21:12:42 +02:00
|
|
|
misc/empty-backup-suffix.sh
|
2026-03-25 16:24:32 +09:00
|
|
|
)
|
2026-08-07 20:20:32 +09:00
|
|
|
for f in "${backport[@]}"
|
2026-03-25 16:24:32 +09:00
|
|
|
do curl -L ${repo}/raw/refs/heads/master/tests/$f > tests/$f
|
2026-08-07 20:20:32 +09:00
|
|
|
done
|
2026-08-13 12:12:26 +02:00
|
|
|
|
|
|
|
|
# A test that does not exist in $ver at all is absent from its test list, so
|
|
|
|
|
# `make check` would silently never run it. Register those in both the automake
|
|
|
|
|
# input and the generated Makefile.in: configure derives Makefile from the
|
|
|
|
|
# latter, and build-gnu.sh deliberately keeps automake from re-running.
|
|
|
|
|
for f in "${backport[@]}"; do
|
|
|
|
|
grep -qF "tests/$f" tests/local.mk ||
|
|
|
|
|
sed -i "s|^all_tests =.*|&\n tests/$f\t\t\t\t\\\\|" tests/local.mk
|
|
|
|
|
grep -qF "tests/$f" Makefile.in ||
|
|
|
|
|
sed -i "s|^all_tests =.*|&\n tests/$f\t\t\t\t\\\\|" Makefile.in
|
|
|
|
|
done
|