1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-21 21:43:08 +00:00

Fix the os_release.pm and fedora_release.pm.

It seems that the IoT fix was not limited to the IoT
subvariant only, which caused wierd behaviour when
the version was set to Rawhide when it should not be.
This fixes it.
This commit is contained in:
Lukáš Růžička 2022-02-09 16:55:45 +01:00
parent d112944526
commit 182bfdaa55
2 changed files with 8 additions and 3 deletions

View File

@ -19,7 +19,9 @@ sub run {
# IoT has a branch that acts more or less like Rawhide, but has
# its version as the Rawhide release number, not 'Rawhide'. This
# handles that
$tospell = 'Rawhide' if ($tospell eq $rawrel);
if (get_var("SUBVARIANT") eq "IoT") {
$tospell = 'Rawhide' if ($tospell eq $rawrel);
}
# this is the Rawhide release number, which we expect to see.
$expectver = $rawrel if ($expectver eq "Rawhide");
# Create a spelt form of the version number.
@ -27,7 +29,8 @@ sub run {
# Create the expected content of the release file
# and compare it with its real counterpart.
my $expected = "Fedora release $expectver ($speltnum)";
validate_script_output 'cat /etc/fedora-release', sub { $_ eq $expected };
diag("The fedora-release content to validate: $expected");
validate_script_output("cat /etc/fedora-release", qr/$expected/);
}
sub test_flags {

View File

@ -67,7 +67,9 @@ sub run {
# IoT has a branch that acts more or less like Rawhide, but has
# its version as the Rawhide release number, not 'Rawhide'. This
# handles that
$version_id = 'Rawhide' if ($version_id eq $rawrel);
if (get_var("SUBVARIANT") eq "IoT") {
$version_id = 'Rawhide' if ($version_id eq $rawrel);
}
my $varstr = spell_version_number($version_id);
my $target = lc($version_id);
$version_id = $rawrel if ($version_id eq "Rawhide");