1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

Remove keep_env from the test framework

This commit is contained in:
Miles Liu 2023-03-24 10:52:02 +08:00
parent cc77a952f5
commit 81a4e8fb7d
No known key found for this signature in database
GPG key ID: 4DB9B32F9B24A7A9
10 changed files with 36 additions and 81 deletions

View file

@ -29,6 +29,10 @@ use std::fs as std_fs;
use std::thread::sleep;
use std::time::Duration;
#[cfg(any(target_os = "linux", target_os = "android"))]
#[cfg(feature = "truncate")]
use crate::common::util::PATH;
static TEST_EXISTING_FILE: &str = "existing_file.txt";
static TEST_HELLO_WORLD_SOURCE: &str = "hello_world.txt";
static TEST_HELLO_WORLD_SOURCE_SYMLINK: &str = "hello_world.txt.link";
@ -1687,7 +1691,7 @@ fn test_cp_reflink_always_override() {
if !scene
.cmd("env")
.keep_env()
.env("PATH", PATH)
.args(&["mkfs.btrfs", "--rootdir", ROOTDIR, DISK])
.run()
.succeeded()
@ -1700,7 +1704,7 @@ fn test_cp_reflink_always_override() {
let mount = scene
.cmd("sudo")
.keep_env()
.env("PATH", PATH)
.args(&["-E", "--non-interactive", "mount", DISK, MOUNTPOINT])
.run();
@ -1727,7 +1731,7 @@ fn test_cp_reflink_always_override() {
scene
.cmd("sudo")
.keep_env()
.env("PATH", PATH)
.args(&["-E", "--non-interactive", "umount", MOUNTPOINT])
.succeeds();
}