Skip to content

Commit d2543cd

Browse files
authored
Merge branch 'main' into cp-refactor-copy-direntry
2 parents a78755f + f8c9de7 commit d2543cd

20 files changed

+2210
-1591
lines changed

.github/workflows/GnuTests.yml

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,13 @@ jobs:
3434
outputs repo_default_branch repo_GNU_ref repo_reference_branch
3535
#
3636
SUITE_LOG_FILE="${path_GNU_tests}/test-suite.log"
37+
ROOT_SUITE_LOG_FILE="${path_GNU_tests}/test-suite-root.log"
3738
TEST_LOGS_GLOB="${path_GNU_tests}/**/*.log" ## note: not usable at bash CLI; [why] double globstar not enabled by default b/c MacOS includes only bash v3 which doesn't have double globstar support
3839
TEST_FILESET_PREFIX='test-fileset-IDs.sha1#'
3940
TEST_FILESET_SUFFIX='.txt'
4041
TEST_SUMMARY_FILE='gnu-result.json'
4142
TEST_FULL_SUMMARY_FILE='gnu-full-result.json'
42-
outputs SUITE_LOG_FILE TEST_FILESET_PREFIX TEST_FILESET_SUFFIX TEST_LOGS_GLOB TEST_SUMMARY_FILE TEST_FULL_SUMMARY_FILE
43+
outputs SUITE_LOG_FILE ROOT_SUITE_LOG_FILE TEST_FILESET_PREFIX TEST_FILESET_SUFFIX TEST_LOGS_GLOB TEST_SUMMARY_FILE TEST_FULL_SUMMARY_FILE
4344
- name: Checkout code (uutil)
4445
uses: actions/checkout@v3
4546
with:
@@ -82,8 +83,13 @@ jobs:
8283
## Some tests fail with 'cannot change locale (en_US.ISO-8859-1): No such file or directory'
8384
## Some others need a French locale
8485
sudo locale-gen
85-
sudo locale-gen fr_FR
86-
sudo locale-gen fr_FR.UTF-8
86+
sudo locale-gen --keep-existing fr_FR
87+
sudo locale-gen --keep-existing fr_FR.UTF-8
88+
sudo locale-gen --keep-existing sv_SE
89+
sudo locale-gen --keep-existing sv_SE.UTF-8
90+
sudo locale-gen --keep-existing en_US
91+
sudo locale-gen --keep-existing ru_RU.KOI8-R
92+
8793
sudo update-locale
8894
echo "After:"
8995
locale -a
@@ -99,6 +105,12 @@ jobs:
99105
path_GNU='${{ steps.vars.outputs.path_GNU }}'
100106
path_UUTILS='${{ steps.vars.outputs.path_UUTILS }}'
101107
bash "${path_UUTILS}/util/run-gnu-test.sh"
108+
- name: Run GNU root tests
109+
shell: bash
110+
run: |
111+
path_GNU='${{ steps.vars.outputs.path_GNU }}'
112+
path_UUTILS='${{ steps.vars.outputs.path_UUTILS }}'
113+
bash "${path_UUTILS}/util/run-gnu-test.sh" run-root
102114
- name: Extract testing info into JSON
103115
shell: bash
104116
run : |
@@ -108,18 +120,17 @@ jobs:
108120
id: summary
109121
shell: bash
110122
run: |
123+
path_UUTILS='${{ steps.vars.outputs.path_UUTILS }}'
111124
## Extract/summarize testing info
112125
outputs() { step_id="summary"; for var in "$@" ; do echo steps.${step_id}.outputs.${var}="${!var}"; echo ::set-output name=${var}::${!var}; done; }
113126
#
114127
SUITE_LOG_FILE='${{ steps.vars.outputs.SUITE_LOG_FILE }}'
128+
ROOT_SUITE_LOG_FILE='${{ steps.vars.outputs.ROOT_SUITE_LOG_FILE }}'
129+
ls -al ${SUITE_LOG_FILE} ${ROOT_SUITE_LOG_FILE}
130+
115131
if test -f "${SUITE_LOG_FILE}"
116132
then
117-
TOTAL=$(sed -n "s/.*# TOTAL: \(.*\)/\1/p" "${SUITE_LOG_FILE}" | tr -d '\r' | head -n1)
118-
PASS=$(sed -n "s/.*# PASS: \(.*\)/\1/p" "${SUITE_LOG_FILE}" | tr -d '\r' | head -n1)
119-
SKIP=$(sed -n "s/.*# SKIP: \(.*\)/\1/p" "${SUITE_LOG_FILE}" | tr -d '\r' | head -n1)
120-
FAIL=$(sed -n "s/.*# FAIL: \(.*\)/\1/p" "${SUITE_LOG_FILE}" | tr -d '\r' | head -n1)
121-
XPASS=$(sed -n "s/.*# XPASS: \(.*\)/\1/p" "${SUITE_LOG_FILE}" | tr -d '\r' | head -n1)
122-
ERROR=$(sed -n "s/.*# ERROR: \(.*\)/\1/p" "${SUITE_LOG_FILE}" | tr -d '\r' | head -n1)
133+
source ${path_UUTILS}/util/analyze-gnu-results.sh ${SUITE_LOG_FILE} ${ROOT_SUITE_LOG_FILE}
123134
if [[ "$TOTAL" -eq 0 || "$TOTAL" -eq 1 ]]; then
124135
echo "::error ::Failed to parse test results from '${SUITE_LOG_FILE}'; failing early"
125136
exit 1
@@ -257,8 +268,8 @@ jobs:
257268
## Some tests fail with 'cannot change locale (en_US.ISO-8859-1): No such file or directory'
258269
## Some others need a French locale
259270
sudo locale-gen
260-
sudo locale-gen fr_FR
261-
sudo locale-gen fr_FR.UTF-8
271+
sudo locale-gen --keep-existing fr_FR
272+
sudo locale-gen --keep-existing fr_FR.UTF-8
262273
sudo update-locale
263274
echo "After:"
264275
locale -a

Cargo.lock

Lines changed: 50 additions & 50 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

DEVELOPER_INSTRUCTIONS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Running GNU tests
2121
At the end you should have uutils, gnu and gnulib checked out next to each other.
2222

2323
- Run `cd uutils && ./util/build-gnu.sh && cd ..` to get everything ready (this may take a while)
24-
- Finally, you can run tests with `bash uutils/util/run-gnu-test.sh <test>`. Instead of `<test>` insert the test you want to run, e.g. `tests/misc/wc-proc.sh`.
24+
- Finally, you can run tests with `bash uutils/util/run-gnu-test.sh <tests>`. Instead of `<tests>` insert the tests you want to run, e.g. `tests/misc/wc-proc.sh`.
2525

2626

2727
Code Coverage Report Generation

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,8 @@ $ bash util/build-gnu.sh
369369
$ bash util/run-gnu-test.sh
370370
# To run a single test:
371371
$ bash util/run-gnu-test.sh tests/touch/not-owner.sh # for example
372+
# To run several tests:
373+
$ bash util/run-gnu-test.sh tests/touch/not-owner.sh tests/rm/no-give-up.sh # for example
372374
# If this is a perl (.pl) test, to run in debug:
373375
$ DEBUG=1 bash util/run-gnu-test.sh tests/misc/sm3sum.pl
374376
```

src/uu/hashsum/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ edition = "2021"
1515
path = "src/hashsum.rs"
1616

1717
[dependencies]
18-
digest = "0.10.1"
18+
digest = "0.10.5"
1919
clap = { version = "3.2", features = ["wrap_help", "cargo"] }
2020
hex = "0.4.3"
2121
memchr = "2"

src/uu/ls/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ clap = { version = "3.2", features = ["wrap_help", "cargo", "env"] }
2020
unicode-width = "0.1.8"
2121
number_prefix = "0.4"
2222
term_grid = "0.1.5"
23-
terminal_size = "0.1"
23+
terminal_size = "0.2.1"
2424
glob = "0.3.0"
2525
lscolors = { version = "0.12.0", features = ["ansi_term"] }
2626
uucore = { version=">=0.0.15", package="uucore", path="../../uucore", features = ["entries", "fs"] }

0 commit comments

Comments
 (0)