Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests/common/util.rs: add cfg(feature = "env") #6044

Merged
merged 1 commit into from
Mar 3, 2024

Conversation

cakebaker
Copy link
Contributor

The recent merge of #5869 has an unwanted side effect: running the tests for a single tool shows some failures unrelated to the tool:

$ cargo test --features "nl" --no-default-features

[snipped]

failures:

---- common::util::tests::test_simulation_of_terminal_false stdout ----
run: /home/dho/projects/coreutils/target/debug/coreutils env sh is_atty.sh
thread 'common::util::tests::test_simulation_of_terminal_false' panicked at tests/common/util.rs:3590:65:
Command was expected to succeed. Exit code: 1.
stdout = env: function/utility not found

 stderr = 

[snipped]

failures:
    common::util::tests::test_simulation_of_terminal_false
    common::util::tests::test_simulation_of_terminal_pty_pipes_into_data_and_sends_eot_automatically
    common::util::tests::test_simulation_of_terminal_pty_sends_eot_automatically
    common::util::tests::test_simulation_of_terminal_pty_write_in_data_and_sends_eot_automatically
    common::util::tests::test_simulation_of_terminal_size_information
    common::util::tests::test_simulation_of_terminal_true

This PR fixes the issue by adding #[cfg(feature = "env")] to the failing tests.

Copy link

github-actions bot commented Mar 3, 2024

GNU testsuite comparison:

Congrats! The gnu test tests/mv/backup-dir is no longer failing!

@tertsdiepraam
Copy link
Member

We really need that CI with the individual utils, don't we...

@tertsdiepraam tertsdiepraam merged commit 80bc8a7 into uutils:main Mar 3, 2024
59 of 62 checks passed
@cakebaker cakebaker deleted the fix_tests_common_utils branch March 4, 2024 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants