Skip to main content

Module scoped_run

Module scoped_run 

Source
Expand description

Collection of helpers that try to maintain certain properties while running a test closure.

Re-exportsยง

use std::path::Path; ๐Ÿ”’
use crate::fs; ๐Ÿ”’
use crate::path_helpers::cwd; ๐Ÿ”’
use crate::targets::is_windows; ๐Ÿ”’

Functionsยง

run_in_tmpdir
This function is designed for running commands in a temporary directory that is cleared after the function ends.
test_while_readonly
Ensure that the path P is read-only while the test runs, and restore original permissions at the end so compiletest can clean up. This will panic on Windows if the path is a directory (as it would otherwise do nothing)