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 <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2022-12-03 11:17:17 -08:00
parent 37412b95a8
commit e45473103f
1 changed files with 10 additions and 1 deletions

View File

@ -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,