From e45473103f71308803c5e780f218b39670dfdf1f Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Sat, 3 Dec 2022 11:17:17 -0800 Subject: [PATCH] Upload appropriate logs on ostree_build failure Also use get_var("TEST") for installer_build - no point trying to upload these logs for the other tests in the same flavor, they won't be there. Signed-off-by: Adam Williamson --- lib/installedtest.pm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/installedtest.pm b/lib/installedtest.pm index 2ed046ed..da0ca7cf 100644 --- a/lib/installedtest.pm +++ b/lib/installedtest.pm @@ -129,7 +129,7 @@ sub post_fail_hook { # Sometimes useful for diagnosing FreeIPA issues upload_logs "/etc/nsswitch.conf", failok => 1; - if (get_var("FLAVOR") eq "updates-everything-boot-iso") { + if (get_var("TEST") eq "installer_build") { # for installer creation test script_run "df -h"; upload_logs "/root/imgbuild/pylorax.log", failok => 1; @@ -149,6 +149,15 @@ sub post_fail_hook { upload_logs "anaconda.tar.gz"; } } + + if (get_var("TEST") eq "ostree_build") { + # for ostree and installer creation test + script_run "df -h"; + upload_logs "/tmp/ostree.log", failok => 1; + upload_logs "/var/tmp/imgbuild/pylorax.log", failok => 1; + upload_logs "/var/tmp/imgbuild/lorax.log", failok => 1; + upload_logs "/var/tmp/imgbuild/program.log", failok => 1; + } } # For update tests, let's do the update package info log stuff,