diff --git a/tests/by-util/test_more.rs b/tests/by-util/test_more.rs index 1fc51d068d..ed57691e15 100644 --- a/tests/by-util/test_more.rs +++ b/tests/by-util/test_more.rs @@ -3,6 +3,8 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. +#![cfg(all(unix, not(target_os = "redox")))] + #[cfg(unix)] use std::fs::File; #[cfg(unix)] diff --git a/tests/by-util/test_nohup.rs b/tests/by-util/test_nohup.rs index 778cbb3af1..98ff0dd9fb 100644 --- a/tests/by-util/test_nohup.rs +++ b/tests/by-util/test_nohup.rs @@ -9,7 +9,7 @@ use std::thread::sleep; use uutests::new_ucmd; #[cfg(unix)] -use uutests::{at_and_ucmd, util::TestScenario, util_name}; +use uutests::{util::TestScenario, util_name}; // General observation: nohup.out will not be created in tests run by cargo test // because stdin/stdout is not attached to a TTY. @@ -38,6 +38,8 @@ fn test_nohup_exit_codes() { target_os = "openbsd" ))] fn test_nohup_multiple_args_and_flags() { + use uutests::at_and_ucmd; + let (at, mut ucmd) = at_and_ucmd!(); ucmd.args(&["touch", "-t", "1006161200", "file1", "file2"]) diff --git a/tests/by-util/test_stty.rs b/tests/by-util/test_stty.rs index 157758db90..2161074d9b 100644 --- a/tests/by-util/test_stty.rs +++ b/tests/by-util/test_stty.rs @@ -5,7 +5,7 @@ // spell-checker:ignore parenb parmrk ixany iuclc onlcr ofdel icanon noflsh econl igpar ispeed ospeed NCCS nonhex gstty notachar cbreak evenp oddp CSIZE -#![cfg(unix)] +#![cfg(all(unix, not(target_os = "redox")))] use uutests::util::{expected_result, pty_path}; use uutests::{at_and_ts, new_ucmd, unwrap_or_return};