Repository navigation
feat: run GNU testsuite - #517
Conversation
|
This is useful info, but having this check fail on every commit is suboptimal. Should the failures be compared to a list of expected failures? Is there a finer-grained way to control the tests run? |
|
@jmr Thank you for your review!
I agree. uutils/coreutils repository has a similar CI. I can implement a similar approach here if that sounds good to you. |
FWIW (nothing), SGTM. I hope some form of this can get merged. It already pointed out missing features (#528). Now, if we could get some PRs reviewed/merged... |
|
@jmr Hi, I updated this PR to compare the test result againt the reference. So, we won't see the check fail on every commit. I'd appreciate if you could review it. Thanks. |
| "$GNU_PROJECT_DIR/tests/run.sh" \ | ||
| --builddir="$PROJECT_DIR/.test-helpers" \ | ||
| "$@" \ | ||
| cal dmesg hexdump lscpu lslocks lsmem |
There was a problem hiding this comment.
can we make this list dynamic ?
There was a problem hiding this comment.
Could use:
UTILS=($(ls "$PROJECT_DIR/src/uu/"))
...
"${UTILS[@]}"
Same for gen-test-helper.sh.
Something fancier will be needed for setarch/i386/....
There was a problem hiding this comment.
There was a problem hiding this comment.
Updated my PR to address this comment.
| @@ -0,0 +1,68 @@ | |||
|
|
|||
| name: Run GNU Test | |||
There was a problem hiding this comment.
Why not make it more like https://github.com/uutils/coreutils/blob/main/.github/workflows/GnuTests.yml? That uses concurrency groups, sets permissions, etc.
Check expected pass/fail file into repo.
There was a problem hiding this comment.
I wanted to keep the implementation minimal as a first step. Is there any specific features to merge this PR?
run-tests.sh runs the util-linux test suite on the utilities listed by gen-test-helper.sh, which derived them from the directory names under src/uu/. That assumes every crate directory is a utility built into the binary and that each utility is named after its directory. Neither holds in general: a build may enable only some features, and a crate can provide several utility names (e.g. setarch and its i386/linux32/... aliases), as noted in the review of #517. Use the multicall binary's new --list flag instead, so the list matches what was actually built. run-tests.sh already builds the binary before calling gen-test-helper.sh; fail with a clear message if it's missing. For the current tree, the resulting utility list is unchanged.
Fix #5
Added CI to run GNU testsuite for this project