Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[naga xtask] Run validation jobs in parallel, using jobserver. #4902

Merged
merged 11 commits into from
Dec 27, 2023
Merged
Prev Previous commit
Next Next commit
[naga xtask] Produce output only when an error occurs.
  • Loading branch information
jimblandy committed Dec 25, 2023
commit d33df26f346a2a83c9fe8a53df7d0bb2658d800a
12 changes: 7 additions & 5 deletions naga/xtask/src/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 35,15 @@ impl EasyCommand {
pub fn success(&mut self) -> anyhow::Result<()> {
let Self { inner } = self;
log::debug!("running {inner:?}");
let status = inner
.status()
let output = inner
.output()
.with_context(|| format!("failed to run {self}"))?;
ensure!(
status.success(),
"{self} failed to run; exit code: {:?}",
status.code()
output.status.success(),
"{self} failed to run; exit code: {:?}\nstdout:\n{}\nstderr:\n{}",
output.status.code(),
String::from_utf8_lossy(&output.stdout),
String::from_utf8_lossy(&output.stderr),
);
Ok(())
}
Expand Down