Expand description
Access common paths and manipulate the filesystem
Re-exportsΒ§
use filetime::FileTime;πuse itertools::Itertools;πuse walkdir::WalkDir;πuse std::cell::RefCell;πuse std::fs;πuse std::io;πuse std::io::ErrorKind;πuse std::path::Path;πuse std::path::PathBuf;πuse std::process::Command;πuse std::sync::Mutex;πuse std::sync::OnceLock;πuse std::sync::atomic::AtomicUsize;πuse std::sync::atomic::Ordering;πuse crate::compare::assert_e2e;πuse crate::compare::match_contains;π
StructsΒ§
- Read
Only - Temporarily sets a file or directory as read only until this struct is dropped. Useful to make sure tests reset permissions if they fail.
- Test
IdGuard - See
init_root
ConstantsΒ§
StaticsΒ§
- CARGO_
INTEGRATION_ πTEST_ DIR - GLOBAL_
ROOT π
TraitsΒ§
- Cargo
Path Ext - Common path and file operations
FunctionsΒ§
- build_
dir_ πignored_ path_ patterns - The paths to ignore when
CargoPathExt::assert_build_dir_layoutis called - cargo_
home - Path to the current testβs
$CARGO_HOME - chmod_
readonly π - do_op π
- get_
lib_ extension - See
get_lib_filenamefor more details - get_
lib_ filename - Get the filename for a library.
- get_
lib_ prefix - See
get_lib_filenamefor more details - global_
root - Path to the parent directory of all test
roots - home
- Path to the current testβs
$HOME - init_
root - For test harnesses like
crate::cargo_test - log_dir
- Path to the current testβs
$CARGO_LOG - log_
file - Path to the current testβs
$CARGO_LOGfile - root
- Path to the testβs filesystem scratchpad
- set_
global_ πroot - set_
readonly π - sysroot
- Path to
rustcs sysroot - test_
dir - This takes the test location (std::file!() should be passed) and the test name
and outputs the location the test should be places in, inside of
target/tmp/cit