diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3793a0968..47793977e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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. diff --git a/README.md b/README.md index 8ab4c6128..fde01d64a 100644 --- a/README.md +++ b/README.md @@ -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). diff --git a/util/run-gnu-test.sh b/util/run-gnu-test.sh index 044c6c140..9d51a983e 100644 --- a/util/run-gnu-test.sh +++ b/util/run-gnu-test.sh @@ -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