From ee37c64a81505cef92488a57ab53d277ad0c0dce Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 25 Jul 2024 18:10:00 -0400 Subject: [PATCH] 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 --- xtask/src/xtask.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xtask/src/xtask.rs b/xtask/src/xtask.rs index f94ae5bd..5fb729ba 100644 --- a/xtask/src/xtask.rs +++ b/xtask/src/xtask.rs @@ -151,7 +151,11 @@ fn test_tmt(sh: &Shell) -> Result<()> { cmd!(sh, "cargo run -p tests-integration run-vm prepare-tmt").run()?; // cc https://pagure.io/testcloud/pull-request/174 cmd!(sh, "rm -vf /var/tmp/tmt/testcloud/images/disk.qcow2").run()?; - cmd!(sh, "tmt run plans -n integration-run").run()?; + if let Err(e) = cmd!(sh, "tmt run plans -n integration-run").run() { + // tmt annoyingly does not output errors by default + let _ = cmd!(sh, "tmt run -l report -vvv").run(); + return Err(e.into()); + } Ok(()) }