From 8164cdf7a85bb16388f2f0d9b38db1d29643a89f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Luis=20Fern=C3=A1ndez=20Aguilera?= Date: Thu, 19 Sep 2024 10:09:33 +0200 Subject: [PATCH] Integrate the web automation script for agama in openQA MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Integrate the web automation script for agama in openQA Squashed commit of the following: commit 7ec104441f49ac3bbcc8691c7480b24d3dee5a50 Author: José Luis Fernández Aguilera Date: Thu Sep 19 09:58:25 2024 +0200 Tidying the code commit df980affe19cb896c417196d9ea871977d377c81 Author: José Luis Fernández Aguilera Date: Thu Sep 19 09:37:58 2024 +0200 Fix typo in class definition commit e744da42b70385c650906f2f758bd97cb421c471 Author: José Luis Fernández Aguilera Date: Thu Sep 19 09:26:49 2024 +0200 Import RebootTextmodePage commit b9b8a778f8fd9a77a35edd2d977fbbaa0c2d0d08 Author: José Luis Fernández Aguilera Date: Thu Sep 19 09:13:40 2024 +0200 Added Reboot textmode page commit 0c88d15499166803e766baecda11259e80c97934 Author: José Luis Fernández Aguilera Date: Wed Sep 18 16:27:14 2024 +0200 Tidying the code commit 4740dff6fd12210421ee398a025c7823e0e963f7 Author: José Luis Fernández Aguilera Date: Wed Sep 18 14:03:07 2024 +0200 Moved reboot of s390x to POM commit a2f00c6ebbf7932a8ec2a1acc62e69fd5891fc25 Author: José Luis Fernández Aguilera Date: Tue Sep 17 10:26:52 2024 +0200 Changed DASD configuration commit a81f01168b021c4f8b75c1ea7635fac2aa4fe581 Author: José Luis Fernández Aguilera Date: Mon Sep 16 17:21:27 2024 +0200 Fix agama test command typo commit 42939b8a3b17577fbae730dcb23639a927bb9fb7 Author: José Luis Fernández Aguilera Date: Mon Sep 16 17:00:56 2024 +0200 Using new params format commit 2dbc0a0db59b0197bbbb0a13d9716b87d156e915 Merge: 26dc8826b 83afc42f4 Author: José Luis Fernández Aguilera Date: Mon Sep 16 16:55:51 2024 +0200 Merge branch 'master' into 165830-integrate-s390x commit 26dc8826bd8d6baa0d90671f20b29a5f159993d4 Merge: 85756a19c 84996fbdd Author: José Luis Fernández Aguilera Date: Fri Sep 13 11:34:20 2024 +0200 Merge branch 'master' into 165830-integrate-s390x commit 85756a19c21b81ec93329de55c925eeb9d45c323 Author: José Luis Fernández Aguilera Date: Thu Sep 12 16:33:53 2024 +0200 Moved reboot of s390x commit 770d36b5f9c435ef3e0bb3c79f6c908d19576018 Author: José Luis Fernández Aguilera Date: Thu Sep 12 15:25:56 2024 +0200 Added handle reboot for s390x commit d3080d1f83b6939e9c617eba48cea6a7d0017ccf Author: José Luis Fernández Aguilera Date: Thu Sep 12 13:27:35 2024 +0200 Fix typo commit 875213b82828c2a635fbc3565bcb37ffb983c40c Author: José Luis Fernández Aguilera Date: Thu Sep 12 13:23:12 2024 +0200 Added s390x Agama schedule commit 0edf226ec9059e627db61d68f6e8735364c312a8 Author: José Luis Fernández Aguilera Date: Thu Sep 12 11:33:07 2024 +0200 Added a way to delay with variable commit 676de624ef1d4db576dcd3fe6955e0458705a1b9 Author: José Luis Fernández Aguilera Date: Wed Sep 11 17:55:47 2024 +0200 Added slowmo to puppeteer test commit d8108822c692179b6ff5f2a6712f05631a40f1b2 Author: José Luis Fernández Aguilera Date: Wed Sep 11 16:48:39 2024 +0200 Added sleep commit 61b9f00561e1a5b09fd408980b94d1d4eceb8a25 Author: José Luis Fernández Aguilera Date: Wed Sep 11 16:19:22 2024 +0200 Removed sleep commit 6c0ed2d36e3c551a0d8dfba913c57ebf9164d46d Author: José Luis Fernández Aguilera Date: Wed Sep 11 15:53:22 2024 +0200 Added sleep commit 6322748556e61d0deac246168aad5eac2fc5ebd1 Author: José Luis Fernández Aguilera Date: Wed Sep 11 12:52:16 2024 +0200 Removed sleep commit 04b3b461f3f62f71ba5c71cc1c5aa81f0ddc8b8a Author: José Luis Fernández Aguilera Date: Wed Sep 11 12:39:46 2024 +0200 Added required library in agama script commit 7ca415651def341bf5e4b5114f370613ba8162e9 Author: José Luis Fernández Aguilera Date: Wed Sep 11 12:27:54 2024 +0200 Added way to reboot s390x commit b47711ddc1d55d2aa4f9349165439a9005895ab6 Author: José Luis Fernández Aguilera Date: Wed Sep 11 10:25:27 2024 +0200 Added sleep for debugging commit 5359fc927699edfa4672f1cfcb4e025e5c5250f1 Author: José Luis Fernández Aguilera Date: Tue Sep 10 18:19:20 2024 +0200 Integrate the web automation script for agama in openQA Removed unused lib --- lib/Distribution/Opensuse/AgamaDevel.pm | 9 ++++++++- lib/Yam/Agama/Pom/RebootPage.pm | 1 + lib/Yam/Agama/Pom/RebootTextmodePage.pm | 25 +++++++++++++++++++++++++ schedule/yam/agama_s390x.yaml | 13 +++++++++++++ tests/yam/agama/agama.pm | 4 ++-- 5 files changed, 49 insertions(+), 3 deletions(-) create mode 100644 lib/Yam/Agama/Pom/RebootTextmodePage.pm create mode 100644 schedule/yam/agama_s390x.yaml diff --git a/lib/Distribution/Opensuse/AgamaDevel.pm b/lib/Distribution/Opensuse/AgamaDevel.pm index 4f15bdb563cd..36784aa79334 100644 --- a/lib/Distribution/Opensuse/AgamaDevel.pm +++ b/lib/Distribution/Opensuse/AgamaDevel.pm @@ -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; @@ -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; diff --git a/lib/Yam/Agama/Pom/RebootPage.pm b/lib/Yam/Agama/Pom/RebootPage.pm index 3ef9faed4255..9976cc22de22 100644 --- a/lib/Yam/Agama/Pom/RebootPage.pm +++ b/lib/Yam/Agama/Pom/RebootPage.pm @@ -27,6 +27,7 @@ sub expect_is_shown { sub reboot { my ($self) = @_; + select_console('installation'); assert_and_click($self->{tag_reboot_button}); } diff --git a/lib/Yam/Agama/Pom/RebootTextmodePage.pm b/lib/Yam/Agama/Pom/RebootTextmodePage.pm new file mode 100644 index 000000000000..16cadcbf110f --- /dev/null +++ b/lib/Yam/Agama/Pom/RebootTextmodePage.pm @@ -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) + +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; diff --git a/schedule/yam/agama_s390x.yaml b/schedule/yam/agama_s390x.yaml new file mode 100644 index 000000000000..c05b69532165 --- /dev/null +++ b/schedule/yam/agama_s390x.yaml @@ -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 diff --git a/tests/yam/agama/agama.pm b/tests/yam/agama/agama.pm index 38beb32b1cdb..a48817c4cc6d 100644 --- a/tests/yam/agama/agama.pm +++ b/tests/yam/agama/agama.pm @@ -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(); }