Skip to content

Commit 48b4029

Browse files
committed
tests: Run tmt report on failure
It's annoying to have to go dig through the logs when something fails. We do have the tmt logs in CI, but again, more clicks. Signed-off-by: Colin Walters <[email protected]>
1 parent a557143 commit 48b4029

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

xtask/src/xtask.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,11 @@ fn test_tmt(sh: &Shell) -> Result<()> {
151151
cmd!(sh, "cargo run -p tests-integration run-vm prepare-tmt").run()?;
152152
// cc https://pagure.io/testcloud/pull-request/174
153153
cmd!(sh, "rm -vf /var/tmp/tmt/testcloud/images/disk.qcow2").run()?;
154-
cmd!(sh, "tmt run plans -n integration-run").run()?;
154+
if let Err(e) = cmd!(sh, "tmt run plans -n integration-run").run() {
155+
// tmt annoyingly does not output errors by default
156+
let _ = cmd!(sh, "tmt run -l report -vvv").run();
157+
return Err(e.into());
158+
}
155159
Ok(())
156160
}
157161

0 commit comments

Comments
 (0)