mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-11-22 05:53:09 +00:00
Fix os_release checks for name change to "Fedora Linux"
A couple of the checks here need updating now we're calling it "Fedora Linux" not just "Fedora". Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
1cf779fa20
commit
0668357dd7
@ -59,6 +59,9 @@ sub run {
|
|||||||
$cannedtag = (split /-/, $build)[-1];
|
$cannedtag = (split /-/, $build)[-1];
|
||||||
}
|
}
|
||||||
my $name = ucfirst($id);
|
my $name = ucfirst($id);
|
||||||
|
# from F35 onwards, $NAME is "Fedora Linux" not just "Fedora"
|
||||||
|
my $relnum = get_release_number;
|
||||||
|
my $fullname = $relnum > 34 ? $name . " Linux" : $name;
|
||||||
my $rawrel = get_var("RAWREL", '');
|
my $rawrel = get_var("RAWREL", '');
|
||||||
my $version_id = get_var("VERSION"); # Should be the version number or Rawhide.
|
my $version_id = get_var("VERSION"); # Should be the version number or Rawhide.
|
||||||
# IoT has a branch that acts more or less like Rawhide, but has
|
# IoT has a branch that acts more or less like Rawhide, but has
|
||||||
@ -115,10 +118,10 @@ sub run {
|
|||||||
$version = "$cannedtag ($varstr)";
|
$version = "$cannedtag ($varstr)";
|
||||||
}
|
}
|
||||||
my $platform_id = "platform:f$version_id";
|
my $platform_id = "platform:f$version_id";
|
||||||
my $pretty = "$name $version_id ($varstr)";
|
my $pretty = "$fullname $version_id ($varstr)";
|
||||||
# Same problem is when testing the PRETTY_NAME.
|
# Same problem is when testing the PRETTY_NAME.
|
||||||
if (get_var("CANNED")) {
|
if (get_var("CANNED")) {
|
||||||
$pretty = "$name $cannedtag ($varstr)";
|
$pretty = "$fullname $cannedtag ($varstr)";
|
||||||
# ...and FCOS uses a different format, sigh
|
# ...and FCOS uses a different format, sigh
|
||||||
if ($build =~ /^Fedora-CoreOS/) {
|
if ($build =~ /^Fedora-CoreOS/) {
|
||||||
$pretty = "Fedora CoreOS $cannedtag";
|
$pretty = "Fedora CoreOS $cannedtag";
|
||||||
@ -130,10 +133,11 @@ sub run {
|
|||||||
my $failref =\@fails;
|
my $failref =\@fails;
|
||||||
|
|
||||||
# Test for name
|
# Test for name
|
||||||
rec_log "NAME should be $name and is $content{'NAME'}", $content{'NAME'} eq $name, $failref;
|
my $strip = strip_marks($content{'NAME'});
|
||||||
|
rec_log "NAME should be $fullname and is $strip", $strip eq $fullname, $failref;
|
||||||
|
|
||||||
# Test for version.
|
# Test for version.
|
||||||
my $strip = strip_marks($content{'VERSION'});
|
$strip = strip_marks($content{'VERSION'});
|
||||||
rec_log "VERSION should be $version and is $strip", $strip eq $version, $failref;
|
rec_log "VERSION should be $version and is $strip", $strip eq $version, $failref;
|
||||||
|
|
||||||
# Test for version_id
|
# Test for version_id
|
||||||
|
Loading…
Reference in New Issue
Block a user