Struct cargo_options::Test
source · pub struct Test {Show 25 fields
pub common: CommonOptions,
pub manifest_path: Option<PathBuf>,
pub release: bool,
pub ignore_rust_version: bool,
pub unit_graph: bool,
pub packages: Vec<String>,
pub workspace: bool,
pub exclude: Vec<String>,
pub all: bool,
pub lib: bool,
pub bin: Vec<String>,
pub bins: bool,
pub example: Vec<String>,
pub examples: bool,
pub test: Vec<String>,
pub tests: bool,
pub bench: Vec<String>,
pub benches: bool,
pub all_targets: bool,
pub doc: bool,
pub no_run: bool,
pub no_fail_fast: bool,
pub future_incompat_report: bool,
pub test_name: Option<String>,
pub args: Vec<String>,
}Expand description
Execute all unit and integration tests and build examples of a local package
Fields§
§common: CommonOptions§manifest_path: Option<PathBuf>Path to Cargo.toml
release: boolBuild artifacts in release mode, with optimizations
ignore_rust_version: boolIgnore rust-version specification in packages
unit_graph: boolOutput build graph in JSON (unstable)
packages: Vec<String>Package to build (see cargo help pkgid)
workspace: boolTest all packages in the workspace
exclude: Vec<String>Exclude packages from the build
all: boolAlias for workspace (deprecated)
lib: boolTest only this package’s library
bin: Vec<String>Test only the specified binary
bins: boolTest all binaries
example: Vec<String>Test only the specified example
examples: boolTest all examples
test: Vec<String>Test only the specified test target
tests: boolTest all tests
bench: Vec<String>Test only the specified bench target
benches: boolTest all benches
all_targets: boolTest all targets
doc: boolTest only this library’s documentation
no_run: boolCompile, but don’t run tests
no_fail_fast: boolRun all tests regardless of failure
future_incompat_report: boolOutputs a future incompatibility report at the end of the build (unstable)
test_name: Option<String>If specified, only run tests containing this string in their names
args: Vec<String>Arguments for the test binary
Implementations§
Methods from Deref<Target = CommonOptions>§
Trait Implementations§
source§impl CommandFactory for Test
impl CommandFactory for Test
source§impl FromArgMatches for Test
impl FromArgMatches for Test
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.source§impl Parser for Test
impl Parser for Test
source§fn try_parse() -> Result<Self, Error<RichFormatter>>
fn try_parse() -> Result<Self, Error<RichFormatter>>
std::env::args_os(), return Err on error.