Skip to content

Commit eb223ba

Browse files
authored
Merge pull request #9216 from sylvestre/9.9
update gnu ref to 9.9 + improve the script
2 parents 6cf5b06 + 7371b5b commit eb223ba

File tree

3 files changed

+24
-5
lines changed

3 files changed

+24
-5
lines changed

.github/workflows/GnuTests.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ env:
2929
TEST_ROOT_FULL_SUMMARY_FILE: 'gnu-root-full-result.json'
3030
TEST_SELINUX_FULL_SUMMARY_FILE: 'selinux-gnu-full-result.json'
3131
TEST_SELINUX_ROOT_FULL_SUMMARY_FILE: 'selinux-root-gnu-full-result.json'
32-
REPO_GNU_REF: "v9.8"
3332

3433
jobs:
3534
native:
@@ -42,6 +41,16 @@ jobs:
4241
with:
4342
path: 'uutils'
4443
persist-credentials: false
44+
- name: Extract GNU version from build-gnu.sh
45+
id: gnu-version
46+
run: |
47+
GNU_VERSION=$(grep '^release_tag_GNU=' uutils/util/build-gnu.sh | cut -d'"' -f2)
48+
if [ -z "$GNU_VERSION" ]; then
49+
echo "Error: Failed to extract GNU version from build-gnu.sh"
50+
exit 1
51+
fi
52+
echo "REPO_GNU_REF=${GNU_VERSION}" >> $GITHUB_ENV
53+
echo "Extracted GNU version: ${GNU_VERSION}"
4554
- uses: dtolnay/rust-toolchain@master
4655
with:
4756
toolchain: stable
@@ -164,6 +173,16 @@ jobs:
164173
with:
165174
path: 'uutils'
166175
persist-credentials: false
176+
- name: Extract GNU version from build-gnu.sh
177+
id: gnu-version-selinux
178+
run: |
179+
GNU_VERSION=$(grep '^release_tag_GNU=' uutils/util/build-gnu.sh | cut -d'"' -f2)
180+
if [ -z "$GNU_VERSION" ]; then
181+
echo "Error: Failed to extract GNU version from build-gnu.sh"
182+
exit 1
183+
fi
184+
echo "REPO_GNU_REF=${GNU_VERSION}" >> $GITHUB_ENV
185+
echo "Extracted GNU version: ${GNU_VERSION}"
167186
- uses: dtolnay/rust-toolchain@master
168187
with:
169188
toolchain: stable

util/build-gnu.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ fi
7070

7171
###
7272

73-
release_tag_GNU="v9.8"
73+
release_tag_GNU="v9.9"
7474

7575
# check if the GNU coreutils has been cloned, if not print instructions
7676
# note: the ${path_GNU} might already exist, so we check for the .git directory
@@ -309,10 +309,10 @@ sed -i -e "s/ginstall: creating directory/install: creating directory/g" tests/i
309309
# GNU doesn't support padding < -LONG_MAX
310310
# disable this test case
311311
# Use GNU sed because option -z is not available on BSD sed
312-
"${SED}" -i -Ez "s/\n([^\n#]*pad-3\.2[^\n]*)\n([^\n]*)\n([^\n]*)/\n# uutils\/numfmt supports padding = LONG_MIN\n#\1\n#\2\n#\3/" tests/misc/numfmt.pl
312+
"${SED}" -i -Ez "s/\n([^\n#]*pad-3\.2[^\n]*)\n([^\n]*)\n([^\n]*)/\n# uutils\/numfmt supports padding = LONG_MIN\n#\1\n#\2\n#\3/" tests/numfmt/numfmt.pl
313313

314314
# Update the GNU error message to match the one generated by clap
315-
sed -i -e "s/\$prog: multiple field specifications/error: the argument '--field <FIELDS>' cannot be used multiple times\n\nUsage: numfmt [OPTION]... [NUMBER]...\n\nFor more information, try '--help'./g" tests/misc/numfmt.pl
315+
sed -i -e "s/\$prog: multiple field specifications/error: the argument '--field <FIELDS>' cannot be used multiple times\n\nUsage: numfmt [OPTION]... [NUMBER]...\n\nFor more information, try '--help'./g" tests/numfmt/numfmt.pl
316316
sed -i -e "s/Try 'mv --help' for more information/For more information, try '--help'/g" -e "s/mv: missing file operand/error: the following required arguments were not provided:\n <files>...\n\nUsage: mv [OPTION]... [-T] SOURCE DEST\n mv [OPTION]... SOURCE... DIRECTORY\n mv [OPTION]... -t DIRECTORY SOURCE...\n/g" -e "s/mv: missing destination file operand after 'no-file'/error: The argument '<files>...' requires at least 2 values, but only 1 was provided\n\nUsage: mv [OPTION]... [-T] SOURCE DEST\n mv [OPTION]... SOURCE... DIRECTORY\n mv [OPTION]... -t DIRECTORY SOURCE...\n/g" tests/mv/diag.sh
317317

318318
# our error message is better

util/why-error.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ This file documents why some tests are failing:
2626
* gnu/tests/misc/close-stdout.sh
2727
* gnu/tests/misc/comm.pl
2828
* gnu/tests/misc/nohup.sh
29-
* gnu/tests/misc/numfmt.pl - https://github.com/uutils/coreutils/issues/7219 / https://github.com/uutils/coreutils/issues/7221
29+
* gnu/tests/numfmt/numfmt.pl - https://github.com/uutils/coreutils/issues/7219 / https://github.com/uutils/coreutils/issues/7221
3030
* gnu/tests/misc/stdbuf.sh - https://github.com/uutils/coreutils/issues/7072
3131
* gnu/tests/misc/tee.sh - https://github.com/uutils/coreutils/issues/7073
3232
* gnu/tests/misc/time-style.sh

0 commit comments

Comments
 (0)