Add Rust Analyzer check tests

This commit is contained in:
Jakub Beránek 2025-07-02 09:05:47 +02:00
parent 029304e4a6
commit c17da9ebc2
No known key found for this signature in database
GPG key ID: 909CD0D26483516B
2 changed files with 18 additions and 0 deletions

View file

@ -385,6 +385,10 @@ impl Step for RustAnalyzer {
let _guard = builder.msg_check("rust-analyzer artifacts", target, None);
run_cargo(builder, cargo, builder.config.free_args.clone(), &stamp, vec![], true, false);
}
fn metadata(&self) -> Option<StepMetadata> {
Some(StepMetadata::check("rust-analyzer", self.target))
}
}
/// Compiletest is implicitly "checked" when it gets built in order to run tests,

View file

@ -1441,6 +1441,20 @@ mod snapshot {
");
}
#[test]
fn check_rust_analyzer() {
let ctx = TestCtx::new();
insta::assert_snapshot!(
ctx.config("check")
.path("rust-analyzer")
.render_steps(), @r"
[check] std <host>
[build] llvm <host>
[check] rustc <host>
[check] rust-analyzer <host>
");
}
#[test]
fn test_exclude() {
let ctx = TestCtx::new();