1
0
mirror of https://github.com/uutils/coreutils synced 2024-07-05 17:08:59 +00:00

uucore: Start testing uucore

Before this change we never ran tests on uucore itself
meaning that is was not possible to test
functions of the shared core, only their usage
in the different binaries

This change adds running uucore to our ci, which will increase coverage for the few doctests that exist

and is extracted from #1988 where first tests for uucore will be introduced
This commit is contained in:
ReggaeMuffin 2021-04-05 16:16:00 +01:00
parent bd8b129d9a
commit 3bfb1afe5c
No known key found for this signature in database
GPG Key ID: B7A56D7FE881B7C5
2 changed files with 17 additions and 1 deletions

View File

@ -150,7 +150,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: test
args: --features "feat_os_unix"
args: --features "feat_os_unix" -p uucore -p coreutils
env:
RUSTFLAGS: '-Awarnings'
@ -536,6 +536,17 @@ jobs:
CARGO_UTILITY_LIST_OPTIONS="$(for u in ${UTILITY_LIST}; do echo "-puu_${u}"; done;)"
echo set-output name=UTILITY_LIST::${UTILITY_LIST}
echo ::set-output name=CARGO_UTILITY_LIST_OPTIONS::${CARGO_UTILITY_LIST_OPTIONS}
- name: Test uucore
uses: actions-rs/cargo@v1
with:
command: test
args: ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} --no-fail-fast -p uucore
env:
CARGO_INCREMENTAL: '0'
RUSTC_WRAPPER: ''
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort'
RUSTDOCFLAGS: '-Cpanic=abort'
# RUSTUP_TOOLCHAIN: ${{ steps.vars.outputs.TOOLCHAIN }}
- name: Test
uses: actions-rs/cargo@v1
with:

View File

@ -226,6 +226,11 @@ If you would prefer to test a select few utilities:
$ cargo test --features "chmod mv tail" --no-default-features
```
If you also want to test the core utilities:
```bash
$ cargo test -p uucore -p coreutils
```
To debug:
```bash
$ gdb --args target/debug/coreutils ls