mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
Update CONTRIBUTING.md: Add nextest usage examples
This commit is contained in:
parent
037aaf0a36
commit
18d5e9a3bb
1 changed files with 19 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
||||||
<!-- spell-checker:ignore reimplementing toybox RUNTEST -->
|
<!-- spell-checker:ignore reimplementing toybox RUNTEST CARGOFLAGS nextest -->
|
||||||
|
|
||||||
# Contributing to coreutils
|
# Contributing to coreutils
|
||||||
|
|
||||||
|
@ -137,6 +137,14 @@ If you also want to test the core utilities:
|
||||||
cargo test -p uucore -p coreutils
|
cargo test -p uucore -p coreutils
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Running the complete test suite might take a while. We use [nextest](https://nexte.st/index.html) in
|
||||||
|
the CI and you might want to try it out locally. It can speed up the execution time of the whole
|
||||||
|
test run significantly if the cpu has multiple cores.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
cargo nextest run --features unix --no-fail-fast
|
||||||
|
```
|
||||||
|
|
||||||
To debug:
|
To debug:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
|
@ -171,6 +179,15 @@ To include tests for unimplemented behavior:
|
||||||
make UTILS='UTILITY_1 UTILITY_2' SPEC=y test
|
make UTILS='UTILITY_1 UTILITY_2' SPEC=y test
|
||||||
```
|
```
|
||||||
|
|
||||||
|
To run tests with `nextest` just use the nextest target. Note you'll need to
|
||||||
|
[install](https://nexte.st/book/installation.html) `nextest` first. The `nextest` target accepts the
|
||||||
|
same arguments like the default `test` target, so it's possible to pass arguments to `nextest run`
|
||||||
|
via `CARGOFLAGS`:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
make CARGOFLAGS='--no-fail-fast' UTILS='UTILITY_1 UTILITY_2' nextest
|
||||||
|
```
|
||||||
|
|
||||||
### Run Busybox Tests
|
### Run Busybox Tests
|
||||||
|
|
||||||
This testing functionality is only available on *nix operating systems and
|
This testing functionality is only available on *nix operating systems and
|
||||||
|
@ -326,7 +343,6 @@ if changes are not reflected in the report then run `cargo clean` and run the ab
|
||||||
If you are using stable version of Rust that doesn't enable code coverage instrumentation by default
|
If you are using stable version of Rust that doesn't enable code coverage instrumentation by default
|
||||||
then add `-Z-Zinstrument-coverage` flag to `RUSTFLAGS` env variable specified above.
|
then add `-Z-Zinstrument-coverage` flag to `RUSTFLAGS` env variable specified above.
|
||||||
|
|
||||||
|
|
||||||
## Other implementations
|
## Other implementations
|
||||||
|
|
||||||
The Coreutils have different implementations, with different levels of completions:
|
The Coreutils have different implementations, with different levels of completions:
|
||||||
|
@ -342,7 +358,6 @@ The Coreutils have different implementations, with different levels of completio
|
||||||
However, when reimplementing the tools/options in Rust, don't read their source codes
|
However, when reimplementing the tools/options in Rust, don't read their source codes
|
||||||
when they are using reciprocal licenses (ex: GNU GPL, GNU LGPL, etc).
|
when they are using reciprocal licenses (ex: GNU GPL, GNU LGPL, etc).
|
||||||
|
|
||||||
|
|
||||||
## Licensing
|
## Licensing
|
||||||
|
|
||||||
uutils is distributed under the terms of the MIT License; see the `LICENSE` file
|
uutils is distributed under the terms of the MIT License; see the `LICENSE` file
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue