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: bool
Build artifacts in release mode, with optimizations
ignore_rust_version: bool
Ignore rust-version
specification in packages
unit_graph: bool
Output build graph in JSON (unstable)
packages: Vec<String>
Package to build (see cargo help pkgid
)
workspace: bool
Test all packages in the workspace
exclude: Vec<String>
Exclude packages from the build
all: bool
Alias for workspace (deprecated)
lib: bool
Test only this package’s library
bin: Vec<String>
Test only the specified binary
bins: bool
Test all binaries
example: Vec<String>
Test only the specified example
examples: bool
Test all examples
test: Vec<String>
Test only the specified test target
tests: bool
Test all tests
bench: Vec<String>
Test only the specified bench target
benches: bool
Test all benches
all_targets: bool
Test all targets
doc: bool
Test only this library’s documentation
no_run: bool
Compile, but don’t run tests
no_fail_fast: bool
Run all tests regardless of failure
future_incompat_report: bool
Outputs 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.