Struct libtest_with::Arguments
source · pub struct Arguments {Show 16 fields
pub include_ignored: bool,
pub ignored: bool,
pub test: bool,
pub bench: bool,
pub list: bool,
pub nocapture: bool,
pub show_output: bool,
pub unstable_flags: Option<UnstableFlags>,
pub exact: bool,
pub quiet: bool,
pub test_threads: Option<usize>,
pub logfile: Option<String>,
pub skip: Vec<String>,
pub color: Option<ColorSetting>,
pub format: Option<FormatSetting>,
pub filter: Option<String>,
}Expand description
Command line arguments.
This type represents everything the user can specify via CLI args. The main
method is from_args which reads the global
std::env::args() and parses them into this type.
libtest-mimic supports a subset of all args/flags supported by the
official test harness. There are also some other minor CLI differences, but
the main use cases should work exactly like with the built-in harness.
Fields§
§include_ignored: boolRun ignored and non-ignored tests.
ignored: boolRun only ignored tests.
test: boolRun tests, but not benchmarks.
bench: boolRun benchmarks, but not tests.
list: boolOnly list all tests and benchmarks.
nocapture: boolNo-op, ignored (libtest-mimic always runs in no-capture mode)
show_output: boolNo-op, ignored. libtest-mimic does not currently capture stdout.
unstable_flags: Option<UnstableFlags>No-op, ignored. Flag only exists for CLI compatibility with libtest.
exact: boolIf set, filters are matched exactly rather than by substring.
quiet: boolIf set, display only one character per test instead of one line. Especially useful for huge test suites.
This is an alias for --format=terse. If this is set, format is
None.
test_threads: Option<usize>Number of threads used for parallel testing.
logfile: Option<String>Path of the logfile. If specified, everything will be written into the file instead of stdout.
skip: Vec<String>A list of filters. Tests whose names contain parts of any of these filters are skipped.
color: Option<ColorSetting>Specifies whether or not to color the output.
format: Option<FormatSetting>Specifies the format of the output.
filter: Option<String>Filter string. Only tests which contain this string are run.
Implementations§
Trait Implementations§
source§impl Args for Arguments
impl Args for Arguments
source§fn group_id() -> Option<Id>
fn group_id() -> Option<Id>
ArgGroup::id][crate::ArgGroup::id] for this set of argumentssource§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
source§impl FromArgMatches for Arguments
impl FromArgMatches for Arguments
source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches ) -> Result<Self, Error>
source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches ) -> Result<(), Error>
ArgMatches to self.source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches ) -> Result<(), Error>
ArgMatches to self.