Merge pull request #116 from tcooper/release_ident_9
FIX: release_identification for Rocky Linux 9
This commit is contained in:
commit
d67db07990
23
lib/utils.pm
23
lib/utils.pm
@ -5,9 +5,10 @@ use strict;
|
||||
use base 'Exporter';
|
||||
use Exporter;
|
||||
|
||||
use feature "switch";
|
||||
use lockapi;
|
||||
use testapi;
|
||||
our @EXPORT = qw/run_with_error_check type_safely type_very_safely desktop_vt boot_to_login_screen console_login console_switch_layout desktop_switch_layout console_loadkeys_us do_bootloader boot_decrypt check_release menu_launch_type repo_setup setup_workaround_repo cleanup_workaround_repo console_initial_setup handle_welcome_screen gnome_initial_setup anaconda_create_user check_desktop download_modularity_tests quit_firefox advisory_get_installed_packages advisory_check_nonmatching_packages start_with_launcher quit_with_shortcut lo_dismiss_tip disable_firefox_studies select_rescue_mode copy_devcdrom_as_isofile get_release_number check_left_bar check_top_bar check_prerelease check_version spell_version_number _assert_and_click is_branched rec_log click_unwanted_notifications repos_mirrorlist register_application get_registered_applications solidify_wallpaper/;
|
||||
our @EXPORT = qw/run_with_error_check type_safely type_very_safely desktop_vt boot_to_login_screen console_login console_switch_layout desktop_switch_layout console_loadkeys_us do_bootloader boot_decrypt check_release menu_launch_type repo_setup setup_workaround_repo cleanup_workaround_repo console_initial_setup handle_welcome_screen gnome_initial_setup anaconda_create_user check_desktop download_modularity_tests quit_firefox advisory_get_installed_packages advisory_check_nonmatching_packages start_with_launcher quit_with_shortcut lo_dismiss_tip disable_firefox_studies select_rescue_mode copy_devcdrom_as_isofile get_release_number get_code_name check_left_bar check_top_bar check_prerelease check_version spell_version_number _assert_and_click is_branched rec_log click_unwanted_notifications repos_mirrorlist register_application get_registered_applications solidify_wallpaper/;
|
||||
|
||||
# We introduce this global variable to hold the list of applications that have
|
||||
# registered during the apps_startstop_test when they have sucessfully run.
|
||||
@ -62,6 +63,22 @@ sub get_release_number {
|
||||
return $version
|
||||
}
|
||||
|
||||
sub get_code_name {
|
||||
my $code_name = 'Green Obsidian';
|
||||
my $version = get_var('VERSION');
|
||||
my $ver_major = substr($version, 0, index($version, q/./));
|
||||
|
||||
given($ver_major){
|
||||
when ('9') { $code_name = 'Blue Onyx'; }
|
||||
when ('10') { $code_name = 'Smoky Quartz'; }
|
||||
when ('11') { $code_name = 'Lavender Calcite'; }
|
||||
default{
|
||||
$code_name = 'Green Obsidian';
|
||||
}
|
||||
}
|
||||
return $code_name;
|
||||
}
|
||||
|
||||
# Figure out what tty the desktop is on, switch to it. Assumes we're
|
||||
# at a root console
|
||||
sub desktop_vt {
|
||||
@ -1360,8 +1377,8 @@ sub register_application {
|
||||
}
|
||||
|
||||
# The KDE desktop tests are very difficult to maintain, because the transparency
|
||||
# of the menu requires a lot of different needles to cover the elements.
|
||||
# Therefore it is useful to change the background to a solid colour.
|
||||
# of the menu requires a lot of different needles to cover the elements.
|
||||
# Therefore it is useful to change the background to a solid colour.
|
||||
# Since many needles have been already created with a black background
|
||||
# we will keep it that way. The following code has been taken from the
|
||||
# KDE startstop tests but it is good to have it here, because it will be
|
||||
|
@ -0,0 +1,17 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"height": 31,
|
||||
"type": "match",
|
||||
"ypos": 621,
|
||||
"xpos": 33,
|
||||
"width": 35
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"ENV-DISTRI-rocky",
|
||||
"LANGUAGE-english",
|
||||
"anaconda_custom_part_add"
|
||||
]
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 43 KiB |
16
needles/anaconda/partitioning/rocky-fs_ext4-20220627.json
Normal file
16
needles/anaconda/partitioning/rocky-fs_ext4-20220627.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"area": [
|
||||
{
|
||||
"width": 45,
|
||||
"xpos": 775,
|
||||
"ypos": 472,
|
||||
"type": "match",
|
||||
"height": 19
|
||||
}
|
||||
],
|
||||
"properties": [],
|
||||
"tags": [
|
||||
"ENV-DISTRI-rocky",
|
||||
"anaconda_part_fs_ext4"
|
||||
]
|
||||
}
|
BIN
needles/anaconda/partitioning/rocky-fs_ext4-20220627.png
Normal file
BIN
needles/anaconda/partitioning/rocky-fs_ext4-20220627.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 54 KiB |
@ -39,18 +39,22 @@ sub run {
|
||||
# $NAME is "Rocky Linux" not just "Rocky"
|
||||
my $fullname = $name . " Linux";
|
||||
|
||||
my $version_id = get_var("VERSION"); # Should be the version number.
|
||||
my ($ver_major, $ver_minor) = split /\./, $version_id;
|
||||
my $varstr = spell_version_number($version_id);
|
||||
my $target = lc($ver_major);
|
||||
my $version_id = get_var("VERSION"); # Should be the version number.
|
||||
my $ver_major = substr($version_id, 0, index($version_id, q/./));
|
||||
my $ver_minor = substr($version_id, index($version_id, q/./), length($version_id));
|
||||
my $target = lc($ver_major);
|
||||
if ( $ver_major = '9' ) {
|
||||
$target = lc($version_id);
|
||||
}
|
||||
|
||||
my $reltag = script_output 'rpm -q rocky-release --qf "%{RELEASE}\n"';
|
||||
my ($relver, $eltag) = split /\./, $reltag;
|
||||
my $reltag = script_output 'rpm -q rocky-release --qf "%{RELEASE}\n"';
|
||||
my $relver = substr($reltag, 0, rindex($reltag, q/./));
|
||||
my $eltag = substr($reltag, rindex($reltag, q/./)+1, length($reltag));
|
||||
|
||||
my $code_name = get_var("CODENAME", 'Green Obsidian');
|
||||
my $code_name = get_code_name();
|
||||
my $version = "$version_id ($code_name)";
|
||||
my $platform_id = "platform:$eltag";
|
||||
my $pretty = "$fullname $version_id ($code_name)";
|
||||
my $pretty = "$fullname $version_id ($code_name)";
|
||||
|
||||
#Now. we can start testing the real values from the installed system.
|
||||
my @fails = ();
|
||||
@ -65,7 +69,7 @@ sub run {
|
||||
rec_log "VERSION should be $version and is $strip", $strip eq $version, $failref;
|
||||
|
||||
# Test for version_id
|
||||
$strip = strip_marks($content{'VERSION_ID'});
|
||||
$strip = strip_marks($content{'VERSION_ID'});
|
||||
rec_log "VERSION_ID should be $version_id and is $strip", $strip eq $version_id, $failref;
|
||||
|
||||
# Test for platform_id
|
||||
@ -78,10 +82,14 @@ sub run {
|
||||
|
||||
# Test for Rocky Support Product
|
||||
$strip = strip_marks($content{'ROCKY_SUPPORT_PRODUCT'});
|
||||
rec_log "ROCKY_SUPPORT_PRODUCT should be $name and is $strip", $strip eq $fullname, $failref;
|
||||
if ( $ver_major = '9' ) {
|
||||
$fullname = qq/$fullname $ver_major/;
|
||||
$fullname =~ s/ /-/g;
|
||||
}
|
||||
rec_log "ROCKY_SUPPORT_PRODUCT should be $fullname and is $strip", $strip eq $fullname, $failref;
|
||||
|
||||
# Test for Rocky Support Product Version
|
||||
$strip = strip_marks($content{ROCKY_SUPPORT_PRODUCT_VERSION});
|
||||
$strip = strip_marks($content{ROCKY_SUPPORT_PRODUCT_VERSION});
|
||||
rec_log "ROCKY_SUPPORT_PRODUCT_VERSION should be $target and is $strip", $strip eq $target, $failref;
|
||||
|
||||
# VERSION_ID should be 8.4 and is "8.4"
|
||||
@ -89,10 +97,6 @@ sub run {
|
||||
# ROCKY_SUPPORT_PRODUCT should be Rocky and is Rocky Linux
|
||||
# ROCKY_SUPPORT_PRODUCT_VERSION should be and is 8 at /var/lib/openqa/share/tests/rocky/tests/os_release.pm line 95.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Check for fails, count them, collect their messages and die if something was found.
|
||||
my $failcount = scalar @fails;
|
||||
script_run "echo \"There were $failcount failures in total.\" >> /tmp/os-release.log";
|
||||
|
@ -20,7 +20,7 @@ sub run {
|
||||
# Version as defined in the VERSION variable.
|
||||
my $expectver = get_var('VERSION');
|
||||
# Code Name as defined in the CODENAME variable or default.
|
||||
my $code_name = get_var('CODENAME', "Green Obsidian");
|
||||
my $code_name = get_code_name();
|
||||
# Create the expected content of the release file
|
||||
# and compare it with its real counterpart.
|
||||
my $expected = "Rocky Linux release $expectver ($code_name)";
|
||||
|
Loading…
Reference in New Issue
Block a user