Skip to content

Commit

Permalink
Merge branch 'os-autoinst:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
mpagot authored Sep 6, 2024
2 parents 4f06bdc + 492817b commit 69de1e7
Show file tree
Hide file tree
Showing 13 changed files with 129 additions and 16 deletions.
Binary file added data/imagemagick/lizard.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions lib/Distribution/Opensuse/AgamaDevel.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ use parent 'susedistribution';
use Yam::Agama::Pom::GrubMenuPage;
use Yam::Agama::Pom::GrubEntryEditionPage;
use Yam::Agama::Pom::AgamaUpAndRunningPage;
use Yam::Agama::Pom::RebootPage;

use Utils::Architectures;

Expand All @@ -33,4 +34,8 @@ sub get_agama_up_an_running {
return Yam::Agama::Pom::AgamaUpAndRunningPage->new();
}

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

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

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

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

use testapi;

sub new {
my ($class, $args) = @_;
return bless {
tag_installation_complete => 'agama-install-finished',
tag_reboot_button => 'reboot'
}, $class;
}

sub expect_is_shown {
my ($self, %args) = @_;
assert_screen($self->{tag_installation_complete}, $args{timeout});
}

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

1;
1 change: 1 addition & 0 deletions schedule/functional/extra_tests_textmode.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ conditional_schedule:
- console/systemd_rpm_macros
- console/vsftpd
- console/year_2038_detection
- console/libjpeg_turbo
schedule:
- installation/bootloader_start
- boot/boot_to_desktop
Expand Down
1 change: 1 addition & 0 deletions schedule/functional/extra_tests_textmode_phub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ schedule:
- console/add_phub_extension
- '{{wpa_supplicant}}'
- console/vmstat
- console/libjpeg_turbo
- console/ansible
- console/coredump_collect # For coredumps during the suite. Please put near end.
- console/zypper_log_packages # Records packages installed in the suite. Please put at end.
Expand Down
1 change: 1 addition & 0 deletions schedule/qam/15-SP6/mau-extratests-phub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ schedule:
- console/consoletest_setup
- console/add_phub_extension
- '{{sle15_x86_64}}'
- console/libjpeg_turbo
# - console/python_flake8 Removed due to bsc#1209609
- console/vmstat
- '{{arch_specific15_sp4}}'
Expand Down
19 changes: 19 additions & 0 deletions schedule/security/vendor_affirmation_validation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: vendor_affirmation_validation
description: >
This is for vendor affirmation
schedule:
- installation/bootloader_start
- security/boot_disk
- fips/fips_setup
- fips/openssl/openssl_fips_hash
- fips/openssl/openssl_1_1_fips_hash
- fips/gnutls/gnutls_base_check
- console/import_gpg_keys
- console/gpg
- fips/mozilla_nss/nss_smoke
- '{{ica}}'
conditional_schedule:
ica:
ARCH:
s390x:
- fips/libica
4 changes: 4 additions & 0 deletions schedule/yam/agama.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ schedule:
- yam/agama/boot_agama
- yam/agama/patch_agama_tests
- yam/agama/agama
- installation/grub_test
- installation/first_boot
- yam/validate/validate_product
- yam/validate/validate_user
3 changes: 2 additions & 1 deletion schedule/yast/sle/flows/default_s390x_zvm_textmode.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ bootloader:
- installation/bootloader_start
setup_libyui:
- installation/setup_libyui
access_beta: []
access_beta:
- installation/access_beta_distribution
license_agreement:
- installation/licensing/accept_license
configure_dasd_disks:
Expand Down
2 changes: 2 additions & 0 deletions test_data/yam/agama_tumbleweed.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
os_release_name: openSUSE Tumbleweed
54 changes: 54 additions & 0 deletions tests/console/libjpeg_turbo.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# SUSE's openQA tests
#
# Copyright 2024 SUSE LLC
# SPDX-License-Identifier: FSFAP
#
# Package: libjpeg_turbo
# Summary: Check libjpeg_turbo version
# - Test should test on sle15sp6, see https://jira.suse.com/browse/PED-4889
# - Check libjpeg-turbo version is higher than 2.1.1
# - Do functional check with jpegtran command
# Maintainer: QE Core <[email protected]>

use base "consoletest";
use strict;
use warnings;
use testapi;
use serial_terminal 'select_serial_terminal';
use version_utils;
use utils qw(zypper_call upload_y2logs);
use registration qw(add_suseconnect_product is_phub_ready);

sub run {
select_serial_terminal;

# Package 'libjpeg-turbo' requires PackageHub is available
return if (!is_phub_ready() && is_sle);

# Install libjpeg-turbo package
zypper_call("install libjpeg-turbo");
my $install_version = script_output('rpm -q libjpeg-turbo --qf %{version}');
record_info("libjpeg-turbo version", $install_version);
die("libjpeg-turbo version was not updated") if (package_version_cmp($install_version, '2.1.1') <= 0);

# Use jpegtran command to rotate image
zypper_call("install ImageMagick");
my $image = 'lizard.jpeg';
assert_script_run "wget --quiet " . data_url("imagemagick/$image");
my $size = script_output("identify -format %wx%h $image");
record_info('Old width x height: ', $size);
my $image_rot = 'lizard_rot.jpeg';
# Rotate an image 90 degrees clockwise, discarding any unrotatable edge pixels
assert_script_run("jpegtran -rot 90 -trim $image > $image_rot");
my $rot_size = script_output("identify -format %wx%h $image_rot");
record_info('New width x height: ', $rot_size);
die("Rotate image failed") if ($size == $rot_size);
}

sub post_fail_hook {
my ($self) = shift;
upload_y2logs;
$self->SUPER::post_fail_hook;
}

1;
16 changes: 3 additions & 13 deletions tests/yam/agama/agama.pm
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,20 @@ use testapi;

use testapi qw(
assert_script_run
assert_screen
get_required_var
enter_cmd
select_console
);

sub run {
my $self = shift;
my $test = get_required_var('AGAMA_TEST');
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);
script_run("dmesg --console-on");

select_console 'displaymanager';
save_screenshot();

assert_screen('agama-install-finished', 10);
assert_and_click('reboot');
}

sub post_run_hook {
my ($self) = shift;
$self->SUPER::post_run_hook;
select_console('installation');
$reboot_page->reboot();
}

1;
6 changes: 4 additions & 2 deletions tests/yam/agama/auto.pm
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ use warnings;
use testapi;

sub run {
assert_screen('agama-install-finished', 1200);
assert_and_click('reboot');
my $reboot_page = $testapi::distri->get_reboot_page();

$reboot_page->expect_is_shown(timeout => 1200);
$reboot_page->reboot();

# For agama test, it is too short time to match the grub2, so we create
# a new needle to avoid too much needles loaded.
Expand Down

0 comments on commit 69de1e7

Please sign in to comment.