diff --git a/lib/anacondalog.pm b/lib/anacondalog.pm index 0562946c..2d8035b3 100644 --- a/lib/anacondalog.pm +++ b/lib/anacondalog.pm @@ -5,6 +5,13 @@ use testapi; sub post_fail_hook { my $self = shift; + + my $has_traceback = 0; + if (check_screen "anaconda_error", 10) { + assert_and_click "anaconda_report_btn"; # Generage Anaconda ABRT logs + $has_traceback = 1; + } + send_key "ctrl-alt-f2"; my $logged_in = 0; if (get_var("LIVE") && check_screen "text_console_login", 20) { @@ -29,9 +36,11 @@ sub post_fail_hook { upload_logs "/tmp/dnf.log"; # Upload all ABRT logs - type_string "cd /var/tmp/abrt && tar czvf abrt.tar.gz *"; - send_key "ret"; - upload_logs "/var/tmp/abrt/abrt.tar.gz"; + if ($has_traceback) { + type_string "cd /var/tmp && tar czvf var_tmp.tar.gz *"; + send_key "ret"; + upload_logs "/var/tmp/var_tmp.tar.gz"; + } # Upload Anaconda logs type_string "tar czvf /tmp/anaconda_tb.tar.gz /tmp/anaconda-tb-*"; diff --git a/needles/anaconda_error.json b/needles/anaconda_error.json new file mode 100644 index 00000000..6c328580 --- /dev/null +++ b/needles/anaconda_error.json @@ -0,0 +1,25 @@ +{ + "area": [ + { + "xpos": 275, + "ypos": 319, + "width": 217, + "height": 19, + "type": "match" + }, + { + "xpos": 577, + "ypos": 430, + "width": 89, + "height": 20, + "type": "match" + } + ], + "tags": [ + "ENV-DISTRI-fedora", + "ENV-FLAVOR-server", + "ENV-INSTLANG-en_US", + "anaconda_error" + ], + "properties": [] +} diff --git a/needles/anaconda_error.png b/needles/anaconda_error.png new file mode 100644 index 00000000..6633016b Binary files /dev/null and b/needles/anaconda_error.png differ diff --git a/needles/anaconda_report_btn.json b/needles/anaconda_report_btn.json new file mode 100644 index 00000000..eafcaadd --- /dev/null +++ b/needles/anaconda_report_btn.json @@ -0,0 +1,18 @@ +{ + "area": [ + { + "xpos": 577, + "ypos": 430, + "width": 89, + "height": 20, + "type": "match" + } + ], + "tags": [ + "ENV-DISTRI-fedora", + "ENV-FLAVOR-server", + "ENV-INSTLANG-en_US", + "anaconda_report_btn" + ], + "properties": [] +} diff --git a/needles/anaconda_report_btn.png b/needles/anaconda_report_btn.png new file mode 100644 index 00000000..6633016b Binary files /dev/null and b/needles/anaconda_report_btn.png differ