Open
Conversation
Replaces assert_cmd/predicates/pretty_assertions/serial_test with uutests and ctor in dev-dependencies. Closes uutils#537. - Port tests/find_cmd_tests.rs → tests/test_find.rs (uutests API) - Port tests/xargs_tests.rs → tests/test_xargs.rs (uutests API) - Centralize UUTESTS_BINARY_PATH init via #[ctor::ctor] in tests/common/mod.rs Implementation notes: - Use TestScenario::cmd(BINARY_PATH) rather than ucmd(): find/xargs are dedicated binaries, not multi-call, so ucmd() would prepend the utility name as a spurious first argument - Set CWD to CARGO_MANIFEST_DIR in find's ucmd() so relative test_data/ paths resolve correctly regardless of where cargo runs - delete_on_dot_dir sets the child process CWD via UCommand::current_dir() instead of mutating the process-wide CWD, removing the need for serial_test and all #[serial(working_dir)] attributes Also fixes find_samefile, find_fprinter, and find_fprintf, which were writing temporary files directly into test_data/. They now use isolated temp directories, eliminating a source of test pollution when running in parallel.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #645 +/- ##
=======================================
Coverage 91.76% 91.76%
=======================================
Files 31 31
Lines 6203 6203
Branches 328 328
=======================================
Hits 5692 5692
Misses 390 390
Partials 121 121 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces assert_cmd/predicates/pretty_assertions/serial_test with uutests and ctor in dev-dependencies.
Closes #537.
Implementation notes:
Also fixes find_samefile, find_fprinter, and find_fprintf, which were writing temporary files directly into test_data/. They now use isolated temp directories, eliminating a source of test pollution when running in parallel.