From 53f0acea500c42376de44c4dcba4516e8af271fc Mon Sep 17 00:00:00 2001 From: Michel Normand Date: Wed, 15 Feb 2017 09:20:35 -0500 Subject: [PATCH] Add allowerasing for upgrade if failed without it Note: The dnf.log and dnf.rpm.log are already uploaded to help for investigation. Signed-off-by: Michel Normand --- tests/upgrade_run.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/upgrade_run.pm b/tests/upgrade_run.pm index 838bdfb7..9f7e12af 100644 --- a/tests/upgrade_run.pm +++ b/tests/upgrade_run.pm @@ -15,7 +15,12 @@ sub run { if ($release eq "rawhide") { $params .= " --nogpgcheck"; } - assert_script_run "dnf ${params} system-upgrade download", 6000; + + if (script_run "dnf ${params} system-upgrade download", 6000) { + record_soft_failure "dnf failed so retry with --allowerasing"; + $params .= " --allowerasing"; + assert_script_run "dnf ${params} system-upgrade download", 6000; + } upload_logs "/var/log/dnf.log"; upload_logs "/var/log/dnf.rpm.log";