diff --git a/lib/installedtest.pm b/lib/installedtest.pm index 1b7b2200..f4f165a3 100644 --- a/lib/installedtest.pm +++ b/lib/installedtest.pm @@ -159,6 +159,10 @@ sub post_fail_hook { upload_logs "/var/tmp/imgbuild/program.log", failok => 1; } + if (get_var("TEST") eq "podman") { + upload_logs "/tmp/podman-bats.txt", failok => 1; + } + if (get_var("ADVISORY_OR_TASK") && get_var("TEST") ne "install_default_update_netinst") { unless (get_var("TEST") eq "support_server" && get_var("VERSION") ne get_var("CURRREL")) { # For update tests, let's do the update package info log stuff, diff --git a/tests/podman.pm b/tests/podman.pm index 10b0dc35..c6a2314c 100644 --- a/tests/podman.pm +++ b/tests/podman.pm @@ -17,7 +17,11 @@ sub run { unless (get_var("CANNED")) { # run the upstream integration tests assert_script_run "dnf -y install podman podman-tests bats", 300; - assert_script_run "bats --filter-tags distro-integration /usr/share/podman/test/system", 600; + # needed so we exit 1 when the bats command fails + assert_script_run "set -o pipefail"; + assert_script_run "bats --filter-tags distro-integration /usr/share/podman/test/system | tee /tmp/podman-bats.txt", 600; + # restore default behaviour + assert_script_run "set +o pipefail"; } # check to see if you can pull an image from the registry assert_script_run "podman pull registry.fedoraproject.org/fedora:latest", 300;