gnu/ci: allow to run a single gnu test (and document it)

This commit is contained in:
Sylvestre Ledru 2021-06-02 21:21:12 +02:00
parent 0105531b7f
commit e7f5916864
3 changed files with 12 additions and 1 deletions

View file

@ -18,6 +18,7 @@ search the issues to make sure no one else is working on it.
## Best practices
1. Follow what GNU is doing in term of options and behavior.
1. If possible, look at the GNU test suite execution in the CI and make the test work if failing.
1. Use clap for argument management.
1. Make sure that the code coverage is covering all of the cases, including errors.
1. The code must be clippy-warning-free and rustfmt-compliant.

View file

@ -327,8 +327,12 @@ To run locally:
```bash
$ bash util/build-gnu.sh
$ bash util/run-gnu-test.sh
# To run a single test:
$ bash util/run-gnu-test.sh tests/touch/not-owner.sh # for example
```
Note that it relies on individual utilities (not the multicall binary).
## Contribute
To contribute to uutils, please see [CONTRIBUTING](CONTRIBUTING.md).

View file

@ -6,4 +6,10 @@ GNULIB_DIR="${PWD}/gnulib"
pushd gnu
export RUST_BACKTRACE=1
timeout -sKILL 2h make -j "$(nproc)" check SUBDIRS=. RUN_EXPENSIVE_TESTS=yes RUN_VERY_EXPENSIVE_TESTS=yes VERBOSE=no || : # Kill after 4 hours in case something gets stuck in make
if test -n "$1"; then
# if set, run only the test passed
export RUN_TEST="TESTS=$1"
fi
timeout -sKILL 2h make -j "$(nproc)" check $RUN_TEST SUBDIRS=. RUN_EXPENSIVE_TESTS=yes RUN_VERY_EXPENSIVE_TESTS=yes VERBOSE=no || : # Kill after 4 hours in case something gets stuck in make