Skip to content

Commit

Permalink
Boot Agama s390x svirt from hd
Browse files Browse the repository at this point in the history
  • Loading branch information
jknphy committed Jan 27, 2025
1 parent c7ce797 commit ce86f01
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
5 changes: 2 additions & 3 deletions lib/Yam/Agama/Pom/RebootTextmodePage.pm
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
package Yam::Agama::Pom::RebootTextmodePage;
use strict;
use warnings;

use testapi;
use power_action_utils 'power_action';

sub new {
my ($class, $args) = @_;
Expand All @@ -19,7 +18,7 @@ sub new {

sub reboot {
my ($self) = @_;
enter_cmd 'reboot';
power_action('reboot', keepconsole => 1, first_reboot => 1);
}

1;
1 change: 0 additions & 1 deletion schedule/yam/agama_remote_s390x.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ schedule:
- yam/agama/patch_agama_tests
- yam/agama/agama
- boot/reconnect_mgmt_console
- installation/grub_test
- installation/first_boot
- yam/validate/validate_product
- yam/validate/validate_first_user
14 changes: 13 additions & 1 deletion tests/yam/agama/agama.pm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ use testapi qw(
record_soft_failure
parse_extra_log
upload_logs
select_console
console
);
use Utils::Architectures qw(is_s390x);
use Utils::Backends qw(is_svirt);

sub run {
my $self = shift;
Expand All @@ -30,9 +34,9 @@ sub run {
my $tap = "tap.txt";
my $reporters = "--test-reporter=spec --test-reporter=tap --test-reporter-destination=/tmp/$spec --test-reporter-destination=/tmp/$tap";
my $node_cmd = "node --enable-source-maps $reporters /usr/share/agama/system-tests/${test}.js $test_options";
record_info("node cmd", $node_cmd);

script_run("dmesg --console-off");
record_info("node cmd", $node_cmd);
my $ret = script_run($node_cmd, timeout => 2400);
script_run("dmesg --console-on");

Expand All @@ -43,7 +47,15 @@ sub run {
my $content = script_output("cat /tmp/$spec /tmp/$tap");
diag($content);
croak("command \n'$node_cmd'\n failed") unless $ret == 0;

$self->upload_agama_logs();

# make sure we will boot from hard disk next time
if (is_s390x && is_svirt) {
select_console 'installation';
my $svirt = console('svirt')->change_domain_element(os => boot => {dev => 'hd'});
}

$reboot_page->reboot();
}

Expand Down

0 comments on commit ce86f01

Please sign in to comment.