require cargo check pass in testsuite

This commit is contained in:
nora 2023-04-18 08:13:52 +02:00
parent 0ccd55fa0f
commit a7881a426b

View file

@ -1,3 +1,5 @@
use anyhow::bail;
fn main() -> anyhow::Result<()> {
if std::env::var("MINIMIZE_LINTS").as_deref() == Ok("1") {
std::process::Command::new("cargo")
@ -14,5 +16,17 @@ fn main() -> anyhow::Result<()> {
let proj_dir = std::env::current_dir().expect("current dir not found");
testsuite::ensure_roots_kept(&proj_dir, roots)
testsuite::ensure_roots_kept(&proj_dir, roots)?;
let check = std::process::Command::new("cargo")
.arg("check")
.spawn()
.unwrap()
.wait()
.unwrap();
if !check.success() {
bail!("cargo check failed");
}
Ok(())
}