Files

29 lines
1.2 KiB
Bash
Raw Permalink Normal View History

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 -
# 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
dd/fail-ftruncate-fstat.sh # remove LD_PRELOAD
dd/stderr.sh # replace GNU/test binary by uutils/test
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
nproc/nproc-quota.sh # remove LD_PRELOAD
2026-08-16 21:12:42 +02:00
misc/empty-backup-suffix.sh
)
for f in "${backport[@]}"
do curl -L ${repo}/raw/refs/heads/master/tests/$f > tests/$f
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