Run cargo test
on tidy itself.
This commit is contained in:
parent
4620f82a13
commit
59b80f598f
3 changed files with 36 additions and 1 deletions
|
@ -662,6 +662,7 @@ impl<'a> Builder<'a> {
|
||||||
crate::toolstate::ToolStateCheck,
|
crate::toolstate::ToolStateCheck,
|
||||||
test::ExpandYamlAnchors,
|
test::ExpandYamlAnchors,
|
||||||
test::Tidy,
|
test::Tidy,
|
||||||
|
test::TidySelfTest,
|
||||||
test::Ui,
|
test::Ui,
|
||||||
test::RunPassValgrind,
|
test::RunPassValgrind,
|
||||||
test::MirOpt,
|
test::MirOpt,
|
||||||
|
|
|
@ -1143,6 +1143,40 @@ help: to skip test's attempt to check tidiness, pass `--exclude src/tools/tidy`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Runs tidy's own tests.
|
||||||
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
||||||
|
pub struct TidySelfTest;
|
||||||
|
|
||||||
|
impl Step for TidySelfTest {
|
||||||
|
type Output = ();
|
||||||
|
const DEFAULT: bool = true;
|
||||||
|
const ONLY_HOSTS: bool = true;
|
||||||
|
|
||||||
|
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
|
||||||
|
run.alias("tidyselftest")
|
||||||
|
}
|
||||||
|
|
||||||
|
fn make_run(run: RunConfig<'_>) {
|
||||||
|
run.builder.ensure(TidySelfTest);
|
||||||
|
}
|
||||||
|
|
||||||
|
fn run(self, builder: &Builder<'_>) {
|
||||||
|
let bootstrap_host = builder.config.build;
|
||||||
|
let compiler = builder.compiler(0, bootstrap_host);
|
||||||
|
let cargo = tool::prepare_tool_cargo(
|
||||||
|
builder,
|
||||||
|
compiler,
|
||||||
|
Mode::ToolBootstrap,
|
||||||
|
bootstrap_host,
|
||||||
|
"test",
|
||||||
|
"src/tools/tidy",
|
||||||
|
SourceType::InTree,
|
||||||
|
&[],
|
||||||
|
);
|
||||||
|
try_run(builder, &mut cargo.into());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
|
||||||
pub struct ExpandYamlAnchors;
|
pub struct ExpandYamlAnchors;
|
||||||
|
|
||||||
|
|
|
@ -33,4 +33,4 @@ COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/
|
||||||
COPY host-x86_64/mingw-check/validate-error-codes.sh /scripts/
|
COPY host-x86_64/mingw-check/validate-error-codes.sh /scripts/
|
||||||
|
|
||||||
ENV RUN_CHECK_WITH_PARALLEL_QUERIES 1
|
ENV RUN_CHECK_WITH_PARALLEL_QUERIES 1
|
||||||
ENV SCRIPT python3 ../x.py test --stage 0 src/tools/tidy
|
ENV SCRIPT python3 ../x.py test --stage 0 src/tools/tidy tidyselftest
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue