pub struct Crate {
build_compiler: Compiler,
target: TargetSelection,
mode: Mode,
crates: Vec<String>,
}
Expand description
Runs cargo test
for standard library crates.
(Also used internally to run cargo test
for compiler crates.)
FIXME(Zalathar): Try to split this into two separate steps: a user-visible step for testing standard library crates, and an internal step used for both library crates and compiler crates.
Fields§
§build_compiler: Compiler
The compiler that will build libstd or rustc in test mode.
target: TargetSelection
§mode: Mode
§crates: Vec<String>
Trait Implementations§
Source§impl Step for Crate
impl Step for Crate
Source§fn run(self, builder: &Builder<'_>)
fn run(self, builder: &Builder<'_>)
Runs all unit tests plus documentation tests for a given crate defined
by a Cargo.toml
(single manifest)
This is what runs tests for crates like the standard library, compiler, etc.
It essentially is the driver for running cargo test
.
Currently this runs all tests for a DAG by passing a bunch of -p foo
arguments, and those arguments are discovered from cargo metadata
.
Source§const DEFAULT: bool = true
const DEFAULT: bool = true
describe
macro in Builder::get_step_descriptions
. Read moreSource§fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_>
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_>
Step
should be run when given specific paths (e.g., x build $path
).Source§fn make_run(run: RunConfig<'_>)
fn make_run(run: RunConfig<'_>)
Step
handler when not triggered indirectly by other Step
s using Builder::ensure
.
For example, ./x.py test bootstrap
runs this for test::Bootstrap
. Similarly, ./x.py test
runs it for every step
that is listed by the describe
macro in Builder::get_step_descriptions
.Source§const IS_HOST: bool = false
const IS_HOST: bool = false
run.target
passed to the make_run
function of
this Step will be determined based on the --host
flag.
If this value is false, then they will be determined based on the --target
flag. Read moreSource§fn metadata(&self) -> Option<StepMetadata>
fn metadata(&self) -> Option<StepMetadata>
impl Eq for Crate
impl StructuralPartialEq for Crate
Auto Trait Implementations§
impl Freeze for Crate
impl RefUnwindSafe for Crate
impl Send for Crate
impl Sync for Crate
impl Unpin for Crate
impl UnwindSafe for Crate
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Pointable for T
impl<T> Pointable for T
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 104 bytes