1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-21 13:33:08 +00:00

podman bats: tee the output to a log file and upload it

...this makes it much easier to see what's failing if it fails.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2024-07-17 18:22:53 -07:00
parent 30cceaf75e
commit 187e3486be
2 changed files with 9 additions and 1 deletions

View File

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

View File

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