os-autoinst-distri-rocky-mi.../lib/anacondalog.pm

50 lines
1.2 KiB
Perl
Raw Normal View History

2015-02-13 14:08:29 +00:00
package anacondalog;
use base 'basetest';
use testapi;
sub post_fail_hook {
my $self = shift;
send_key "ctrl-alt-f2";
my $logged_in = 0;
if (get_var("LIVE") && check_screen "text_console_login", 20) {
# On live installs, we need to log in
type_string "root";
send_key "ret";
if (check_screen "root_logged_in", 10) {
$logged_in = 1;
}
}
elsif (check_screen "anaconda_console", 10) {
$logged_in = 1;
}
if ($logged_in == 1) {
upload_logs "/tmp/X.log";
2015-02-13 14:08:29 +00:00
upload_logs "/tmp/anaconda.log";
upload_logs "/tmp/packaging.log";
upload_logs "/tmp/storage.log";
upload_logs "/tmp/syslog";
upload_logs "/tmp/program.log";
2015-02-25 17:20:41 +00:00
upload_logs "/tmp/dnf.log";
# Upload all ABRT logs
type_string "cd /var/tmp/abrt && tar czvf abrt.tar.gz *";
2015-02-19 15:55:29 +00:00
send_key "ret";
upload_logs "/var/tmp/abrt/abrt.tar.gz";
2015-02-19 15:55:29 +00:00
# Upload Anaconda logs
2015-02-25 17:20:41 +00:00
type_string "tar czvf /tmp/anaconda_tb.tar.gz /tmp/anaconda-tb-*";
2015-02-19 15:55:29 +00:00
send_key "ret";
upload_logs "/tmp/anaconda_tb.tar.gz";
2015-02-13 14:08:29 +00:00
}
else {
save_screenshot;
}
2015-02-13 14:08:29 +00:00
}
1;
# vim: set sw=4 et: