2018-08-31 20:34:12 +00:00
|
|
|
use base "installedtest";
|
|
|
|
use strict;
|
|
|
|
use testapi;
|
|
|
|
use utils;
|
|
|
|
|
|
|
|
sub run {
|
|
|
|
my $self = shift;
|
|
|
|
my $version = get_var("VERSION");
|
2020-05-07 22:42:08 +00:00
|
|
|
my $currrel = get_var("CURRREL");
|
2022-04-26 17:41:23 +00:00
|
|
|
my $rawrel = get_var("RAWREL");
|
|
|
|
my $repo = $version eq $rawrel ? "fedora-rawhide.repo" : "fedora.repo";
|
2019-01-29 09:06:16 +00:00
|
|
|
my $advortask = get_var("ADVISORY_OR_TASK");
|
2018-08-31 20:34:12 +00:00
|
|
|
my $arch = get_var("ARCH");
|
2023-09-06 23:43:36 +00:00
|
|
|
my $packages = "lorax";
|
|
|
|
$packages .= " hfsplus-tools" if ($arch eq "ppc64le");
|
|
|
|
assert_script_run "dnf -y install $packages", 120;
|
2018-08-31 20:34:12 +00:00
|
|
|
# this 'temporary file cleanup' thing can actually wipe bits of
|
|
|
|
# the lorax install root while lorax is still running...
|
|
|
|
assert_script_run "systemctl stop systemd-tmpfiles-clean.timer";
|
|
|
|
assert_script_run "mkdir -p /root/imgbuild";
|
|
|
|
assert_script_run "pushd /root/imgbuild";
|
|
|
|
assert_script_run "setenforce Permissive";
|
2021-02-09 19:19:43 +00:00
|
|
|
# Fedora pungi config always sets rootfs size to 3GiB since F32
|
2022-12-07 22:03:19 +00:00
|
|
|
my $cmd = "lorax -p Fedora -v ${version} -r ${version} --repo=/etc/yum.repos.d/${repo} --rootfs-size 3 --squashfs-only";
|
2020-05-07 22:42:08 +00:00
|
|
|
unless ($version > $currrel) {
|
2018-08-31 20:34:12 +00:00
|
|
|
$cmd .= " --isfinal --repo=/etc/yum.repos.d/fedora-updates.repo";
|
|
|
|
}
|
2024-01-06 00:22:01 +00:00
|
|
|
$cmd .= " --repo=/etc/yum.repos.d/workarounds.repo" if (get_workarounds);
|
2022-12-10 17:25:29 +00:00
|
|
|
$cmd .= " --repo=/etc/yum.repos.d/koji-rawhide.repo" if ($version eq $rawrel);
|
Revert to having tests, not the scheduler, download packages (#108)
This effectively reverts 97618193 - but had to be done manually
and adjusted to maintain support for testing side tags and for
testing multiple tasks, since those features were added since
the update ISO change.
The 'scheduler injects ISOs of packages into the tests' approach
was intended to speed things up, especially for large updates,
and it did, but it had a few drawbacks. It means restarting
older tests from the web UI doesn't work as the ISOs get garbage
collected (you have to re-schedule in this case). And it has the
rather large problem that you can now only schedule tests from
the openQA server (or at least a machine with the openQA asset
share mounted), because the package download and ISO creation
just happen wherever the scheduler is running and assume that
the openQA asset share that will be used by the tests is at
/var/lib/openqa/share in that filesystem.
That's too big of a drawback to continue with this approach, IMO,
so this reverts back to the old way of doing things, with a bit
of refactoring to clean up the flow a little, and with support
for testing side tags and multiple tasks maintained.
As a follow-up I'm going to see if I can replace
_download_packages with a much more efficient downloader script
to mitigate the time this process takes on each test, especially
for large updates.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2024-01-05 19:41:50 +00:00
|
|
|
$cmd .= " --repo=/etc/yum.repos.d/advisory.repo" unless (get_var("TAG"));
|
2023-07-04 20:13:15 +00:00
|
|
|
$cmd .= " --repo=/etc/yum.repos.d/openqa-testtag.repo" if (get_var("TAG"));
|
2022-12-10 17:25:29 +00:00
|
|
|
$cmd .= " ./results";
|
2022-05-06 21:05:41 +00:00
|
|
|
assert_script_run $cmd, 2400;
|
2020-09-15 21:54:44 +00:00
|
|
|
# good to have the log around for checks
|
2022-07-28 20:32:57 +00:00
|
|
|
upload_logs "pylorax.log", failok => 1;
|
2019-01-29 09:06:16 +00:00
|
|
|
assert_script_run "mv results/images/boot.iso ./${advortask}-netinst-${arch}.iso";
|
2023-09-07 00:24:35 +00:00
|
|
|
upload_asset "./${advortask}-netinst-${arch}.iso";
|
2018-08-31 20:34:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
sub test_flags {
|
2022-07-28 20:32:57 +00:00
|
|
|
return {fatal => 1};
|
2018-08-31 20:34:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
1;
|
|
|
|
|
|
|
|
# vim: set sw=4 et:
|