1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-12-24 11:13:09 +00:00

Initial ELN update test support (installer build)

This should make the installer image build test work for ELN,
so we can try doing some update tests on ELN.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2024-09-04 12:06:49 -07:00
parent 201fddcb72
commit 468523c546
2 changed files with 18 additions and 5 deletions

View File

@ -478,6 +478,7 @@ sub get_workarounds {
"40" => [],
"41" => [],
"42" => [],
"eln" => [],
);
my $advortasks = $workarounds{$version};
return @$advortasks;
@ -590,7 +591,7 @@ sub setup_repos {
return unless (@was);
}
# if we got this far, we're definitely downloading *something*
script_run "dnf -y install createrepo_c bodhi-client koji", 300;
script_run "dnf -y install createrepo_c koji", 300;
get_setup_repos_script;
my $wastring = join(',', @was);
my $udstring;
@ -700,6 +701,9 @@ sub _repo_setup_updates {
if (get_var("VERSION") eq get_var("RAWREL") && get_var("TEST") ne "support_server") {
assert_script_run 'printf "[koji-rawhide]\nname=koji-rawhide\nbaseurl=https://kojipkgs.fedoraproject.org/repos/rawhide/latest/' . $arch . '/\ncost=2000\nenabled=1\ngpgcheck=0\n" > /etc/yum.repos.d/koji-rawhide.repo';
}
if (lc(get_var("VERSION")) eq "eln" && get_var("TEST") ne "support_server") {
assert_script_run 'printf "[koji-eln]\nname=koji-eln\nbaseurl=https://kojipkgs.fedoraproject.org/repos/eln-build/latest/' . $arch . '/\ncost=2000\nenabled=1\ngpgcheck=0\n" > /etc/yum.repos.d/koji-eln.repo';
}
if (get_var("CANNED")) {
# install and use en_US.UTF-8 locale for consistent sort
# ordering
@ -725,7 +729,7 @@ sub _repo_setup_updates {
# above (and their deps, which dnf will include automatically),
# just in case they're in the update under test; otherwise we
# get a bogus failure for the package not being updated
script_run "dnf -y remove bodhi-client createrepo_c koji", 600 if (get_var("INSTALL") && !get_var("CANNED"));
script_run "dnf -y remove createrepo_c koji", 600 if (get_var("INSTALL") && !get_var("CANNED"));
}
# exit the toolbox on CANNED
if (get_var("CANNED")) {

View File

@ -8,7 +8,9 @@ sub run {
my $version = get_var("VERSION");
my $currrel = get_var("CURRREL");
my $rawrel = get_var("RAWREL");
my $repo = $version eq $rawrel ? "fedora-rawhide.repo" : "fedora.repo";
my $repo = "fedora.repo";
$repo = "fedora-rawhide.repo" if ($version eq $rawrel);
$repo = "fedora-eln.repo" if (lc($version) eq "eln");
my $advortask = get_var("ADVISORY_OR_TASK");
my $arch = get_var("ARCH");
# python3-dnf is for updvercheck.py
@ -22,12 +24,19 @@ sub run {
assert_script_run "pushd /root/imgbuild";
assert_script_run "setenforce Permissive";
# Fedora pungi config always sets rootfs size to 3GiB since F32
my $cmd = "lorax -p Fedora -v ${version} -r ${version} --repo=/etc/yum.repos.d/${repo} --rootfs-size 3 --squashfs-only";
unless ($version > $currrel) {
my $cmd = "lorax -p Fedora -v ${version} -r ${version} --repo=/etc/yum.repos.d/${repo} --rootfs-size 3";
unless ($version > $currrel || lc($version) eq "eln") {
$cmd .= " --isfinal --repo=/etc/yum.repos.d/fedora-updates.repo";
}
if (lc($version) eq "eln") {
$cmd .= " --variant=BaseOS --nomacboot --volid=Fedora-eln-BaseOS-${arch}"
}
else {
$cmd .= " --variant=Everything --volid=Fedora-E-dvd-${arch}"
}
$cmd .= " --repo=/etc/yum.repos.d/workarounds.repo" if (get_workarounds);
$cmd .= " --repo=/etc/yum.repos.d/koji-rawhide.repo" if ($version eq $rawrel);
$cmd .= " --repo=/etc/yum.repos.d/koji-eln.repo" if (lc($version) eq "eln");
$cmd .= " --repo=/etc/yum.repos.d/advisory.repo" unless (get_var("TAG") || get_var("COPR"));
$cmd .= " --repo=/etc/yum.repos.d/openqa-testtag.repo" if (get_var("TAG") || get_var("COPR"));
$cmd .= " ./results";