pub struct Config {Show 17 fields
pub trailing_args: Vec<OsString>,
pub host: Option<String>,
pub target: Option<String>,
pub stderr_filters: Filter,
pub stdout_filters: Filter,
pub root_dir: PathBuf,
pub mode: Mode,
pub program: CommandBuilder,
pub cfgs: CommandBuilder,
pub output_conflict_handling: OutputConflictHandling,
pub path_filter: Vec<String>,
pub dependencies_crate_manifest_path: Option<PathBuf>,
pub dependency_builder: CommandBuilder,
pub quiet: bool,
pub num_test_threads: NonZeroUsize,
pub out_dir: Option<PathBuf>,
pub edition: Option<String>,
}
Expand description
Central datastructure containing all information to run the tests.
Fields§
§trailing_args: Vec<OsString>
Arguments passed to the binary that is executed.
These arguments are passed after the args inserted via //@compile-flags:
.
host: Option<String>
Host triple; usually will be auto-detected.
target: Option<String>
None
to run on the host, otherwise a target triple
stderr_filters: Filter
Filters applied to stderr output before processing it.
By default contains a filter for replacing backslashes with regular slashes.
On windows, contains a filter to replace \n
with \r\n
.
stdout_filters: Filter
Filters applied to stdout output before processing it.
On windows, contains a filter to replace \n
with \r\n
.
root_dir: PathBuf
The folder in which to start searching for .rs files
mode: Mode
The mode in which to run the tests.
program: CommandBuilder
The binary to actually execute.
cfgs: CommandBuilder
The command to run to obtain the cfgs that the output is supposed to
output_conflict_handling: OutputConflictHandling
What to do in case the stdout/stderr output differs from the expected one.
path_filter: Vec<String>
Only run tests with one of these strings in their path/name
dependencies_crate_manifest_path: Option<PathBuf>
Path to a Cargo.toml
that describes which dependencies the tests can access.
dependency_builder: CommandBuilder
The command to run can be changed from cargo
to any custom command to build the
dependencies in dependencies_crate_manifest_path
quiet: bool
Print one character per test instead of one line
num_test_threads: NonZeroUsize
How many threads to use for running tests. Defaults to number of cores
out_dir: Option<PathBuf>
Where to dump files like the binaries compiled from tests.
edition: Option<String>
The default edition to use on all tests
Implementations§
source§impl Config
impl Config
sourcepub fn path_stderr_filter(
&mut self,
path: &Path,
replacement: &'static impl AsRef<[u8]> + ?Sized
)
pub fn path_stderr_filter( &mut self, path: &Path, replacement: &'static impl AsRef<[u8]> + ?Sized )
Replace all occurrences of a path in stderr with a byte string.
sourcepub fn stderr_filter(
&mut self,
pattern: &str,
replacement: &'static impl AsRef<[u8]> + ?Sized
)
pub fn stderr_filter( &mut self, pattern: &str, replacement: &'static impl AsRef<[u8]> + ?Sized )
Replace all occurrences of a regex pattern in stderr with a byte string.
sourcepub fn stdout_filter(
&mut self,
pattern: &str,
replacement: &'static impl AsRef<[u8]> + ?Sized
)
pub fn stdout_filter( &mut self, pattern: &str, replacement: &'static impl AsRef<[u8]> + ?Sized )
Replace all occurrences of a regex pattern in stdout with a byte string.
sourcepub fn fill_host_and_target(&mut self) -> Result<()>
pub fn fill_host_and_target(&mut self) -> Result<()>
Make sure we have the host and target triples.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<D> OwoColorize for D
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where C: Color,
§fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
fn on_yellow<'a>(&'a self) -> BgColorDisplay<'a, Yellow, Self>
§fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
fn magenta<'a>(&'a self) -> FgColorDisplay<'a, Magenta, Self>
§fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_magenta<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
§fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
fn on_purple<'a>(&'a self) -> BgColorDisplay<'a, Magenta, Self>
§fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>
fn default_color<'a>(&'a self) -> FgColorDisplay<'a, Default, Self>
§fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>
fn on_default_color<'a>(&'a self) -> BgColorDisplay<'a, Default, Self>
§fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
fn bright_black<'a>(&'a self) -> FgColorDisplay<'a, BrightBlack, Self>
§fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
fn on_bright_black<'a>(&'a self) -> BgColorDisplay<'a, BrightBlack, Self>
§fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
fn bright_red<'a>(&'a self) -> FgColorDisplay<'a, BrightRed, Self>
§fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
fn on_bright_red<'a>(&'a self) -> BgColorDisplay<'a, BrightRed, Self>
§fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
fn bright_green<'a>(&'a self) -> FgColorDisplay<'a, BrightGreen, Self>
§fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
fn on_bright_green<'a>(&'a self) -> BgColorDisplay<'a, BrightGreen, Self>
§fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
fn bright_yellow<'a>(&'a self) -> FgColorDisplay<'a, BrightYellow, Self>
§fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
fn on_bright_yellow<'a>(&'a self) -> BgColorDisplay<'a, BrightYellow, Self>
§fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
fn bright_blue<'a>(&'a self) -> FgColorDisplay<'a, BrightBlue, Self>
§fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
fn on_bright_blue<'a>(&'a self) -> BgColorDisplay<'a, BrightBlue, Self>
§fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_magenta<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
§fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_magenta<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
§fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
fn bright_purple<'a>(&'a self) -> FgColorDisplay<'a, BrightMagenta, Self>
§fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
fn on_bright_purple<'a>(&'a self) -> BgColorDisplay<'a, BrightMagenta, Self>
§fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
fn bright_cyan<'a>(&'a self) -> FgColorDisplay<'a, BrightCyan, Self>
§fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
fn on_bright_cyan<'a>(&'a self) -> BgColorDisplay<'a, BrightCyan, Self>
§fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
fn bright_white<'a>(&'a self) -> FgColorDisplay<'a, BrightWhite, Self>
§fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
fn on_bright_white<'a>(&'a self) -> BgColorDisplay<'a, BrightWhite, Self>
§fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
fn blink_fast<'a>(&'a self) -> BlinkFastDisplay<'a, Self>
§fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>
fn strikethrough<'a>(&'a self) -> StrikeThroughDisplay<'a, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where Color: DynColor,
OwoColorize::fg
or
a color-specific method, such as OwoColorize::green
, Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where Color: DynColor,
OwoColorize::bg
or
a color-specific method, such as OwoColorize::on_yellow
, Read more