Skip to content

Commit

Permalink
Merge pull request os-autoinst#20199 from okynos/165830-integrate-s390x
Browse files Browse the repository at this point in the history
Integrate the web automation script for agama in openQA
  • Loading branch information
jknphy authored Sep 19, 2024
2 parents 304e4ab + 8164cdf commit 9ba710f
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 3 deletions.
9 changes: 8 additions & 1 deletion lib/Distribution/Opensuse/AgamaDevel.pm
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ use Yam::Agama::Pom::GrubMenuPage;
use Yam::Agama::Pom::GrubEntryEditionPage;
use Yam::Agama::Pom::AgamaUpAndRunningPage;
use Yam::Agama::Pom::RebootPage;
use Yam::Agama::Pom::RebootTextmodePage;

use Utils::Architectures;

Expand All @@ -35,7 +36,13 @@ sub get_agama_up_an_running {
}

sub get_reboot_page {
return Yam::Agama::Pom::RebootPage->new();
if (is_s390x()) {
return Yam::Agama::Pom::RebootTextmodePage->new();
}
else {
return Yam::Agama::Pom::RebootPage->new();
}

}

1;
1 change: 1 addition & 0 deletions lib/Yam/Agama/Pom/RebootPage.pm
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ sub expect_is_shown {

sub reboot {
my ($self) = @_;
select_console('installation');
assert_and_click($self->{tag_reboot_button});
}

Expand Down
25 changes: 25 additions & 0 deletions lib/Yam/Agama/Pom/RebootTextmodePage.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# SUSE's openQA tests
#
# Copyright 2024 SUSE LLC
# SPDX-License-Identifier: FSFAP

# Summary: Handles installation reboot screen for textmode display.
# Maintainer: QE YaST and Migration (QE Yam) <qe-yam at suse de>

package Yam::Agama::Pom::RebootTextmodePage;
use strict;
use warnings;

use testapi;

sub new {
my ($class, $args) = @_;
return bless {}, $class;
}

sub reboot {
my ($self) = @_;
enter_cmd 'reboot';
}

1;
13 changes: 13 additions & 0 deletions schedule/yam/agama_s390x.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: agama
description: >
Perform interactive installation with agama.
schedule:
- yam/agama/boot_agama
- 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_user
4 changes: 2 additions & 2 deletions tests/yam/agama/agama.pm
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ use testapi qw(
sub run {
my $self = shift;
my $test = get_required_var('AGAMA_TEST');
my $configure_dasd = get_var('CONFIGURE_DASD');
my $reboot_page = $testapi::distri->get_reboot_page();

script_run("dmesg --console-off");
assert_script_run("/usr/share/agama/system-tests/" . $test . ".cjs", timeout => 1200);
assert_script_run("CONFIGURE_DASD=$configure_dasd /usr/share/agama/system-tests/" . $test . ".cjs", timeout => 1200);
script_run("dmesg --console-on");

select_console('installation');
$reboot_page->reboot();
}

Expand Down

0 comments on commit 9ba710f

Please sign in to comment.