Skip to content

Commit 102ffd6

Browse files
authored
GnuTests: Cache getlimits to skip make
1 parent 2fb21d2 commit 102ffd6

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

.github/workflows/GnuTests.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: GnuTests
22

33
# spell-checker:ignore (abbrev/names) CodeCov gnulib GnuTests Swatinem
44
# spell-checker:ignore (jargon) submodules devel
5-
# spell-checker:ignore (libs/utils) autopoint chksum getenforce gperf lcov libexpect limactl pyinotify setenforce shopt texinfo valgrind libattr libcap taiki-e
5+
# spell-checker:ignore (libs/utils) autopoint chksum getenforce getlimits gperf lcov libexpect limactl pyinotify setenforce shopt texinfo valgrind libattr libcap taiki-e
66
# spell-checker:ignore (options) Ccodegen Coverflow Cpanic Zpanic
77
# spell-checker:ignore (people) Dawid Dziurla * dawidd dtolnay
88
# spell-checker:ignore (vars) FILESET SUBDIRS XPASS
@@ -74,11 +74,13 @@ jobs:
7474
git config submodule.gnulib.url https://github.com/coreutils/gnulib.git
7575
git submodule update --init --recursive --depth 1
7676
working-directory: gnu
77-
- name: Restore config.cache
77+
- name: Restore files for faster configure and skipping make
7878
uses: actions/cache@v4
7979
id: cache-config-gnu
8080
with:
81-
path: gnu/config.cache
81+
path: |
82+
gnu/config.cache
83+
gnu/src/getlimits
8284
key: ${{ runner.os }}-gnu-config-${{ env.REPO_GNU_REF }}-${{ hashFiles('gnu/configure') }}
8385
restore-keys: |
8486
${{ runner.os }}-gnu-config-${{ env.REPO_GNU_REF }}-
@@ -125,11 +127,13 @@ jobs:
125127
cd 'uutils'
126128
env PROFILE=release-small bash util/build-gnu.sh
127129
128-
- name: Save config.cache
130+
- name: Save files for faster configure and skipping make
129131
uses: actions/cache/save@v4
130132
if: always() && steps.cache-config-gnu.outputs.cache-hit != 'true'
131133
with:
132-
path: gnu/config.cache
134+
path: |
135+
gnu/config.cache
136+
gnu/src/getlimits
133137
key: ${{ runner.os }}-gnu-config-${{ env.REPO_GNU_REF }}-${{ hashFiles('gnu/configure') }}
134138

135139
### Run tests as user

util/build-gnu.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,9 @@ else
141141
"${SED}" -i 's|^"\$@|'"${SYSTEM_TIMEOUT}"' 600 "\$@|' build-aux/test-driver
142142
# Use a better diff
143143
"${SED}" -i 's|diff -c|diff -u|g' tests/Coreutils.pm
144-
"${MAKE}" -j "$("${NPROC}")"
144+
# Allow to omit make by reusing getlimits
145+
test -f src/getlimits || "${MAKE}" -j "$("${NPROC}")"
146+
cp -f src/getlimits "${UU_BUILD_DIR}"
145147

146148
# Handle generated factor tests
147149
t_first=00
@@ -223,8 +225,6 @@ sed -i -e "s|---dis ||g" tests/tail/overlay-headers.sh
223225
# Do not FAIL, just do a regular ERROR
224226
"${SED}" -i -e "s|framework_failure_ 'no inotify_add_watch';|fail=1;|" tests/tail/inotify-rotate-resources.sh
225227

226-
test -f "${UU_BUILD_DIR}/getlimits" || cp src/getlimits "${UU_BUILD_DIR}"
227-
228228
# pr produces very long log and this command isn't super interesting
229229
# SKIP for now
230230
"${SED}" -i -e "s|my \$prog = 'pr';$|my \$prog = 'pr';CuSkip::skip \"\$prog: SKIP for producing too long logs\";|" tests/pr/pr-tests.pl

0 commit comments

Comments
 (0)