mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2025-06-05 14:21:34 +00:00
Unify buildroot repo handling and base it on a variable
This is intended to address the problem that we don't use the buildroot repo for Branched between branching and u-t activation, which often causes problems when newly-created updates depend on builds that recently went stable. So instead of having logic in the tests that sets up the buildroot repo only if the release is Rawhide (or ELN), we'll do the decision about whether to set it up in the scheduler (which decides based on info from Bodhi), and just have the 'set up the repo' steps in the tests. Let's also use the same code and repo name for ELN and non-ELN so we don't have pointless divergence there. Depends on the matching fedora_openqa change, of course - without that, no test will use the buildroot repo. Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
0b0bf1fcf6
commit
d63c327b16
@ -43,9 +43,10 @@ sub mock_setup {
|
|||||||
$repos .= '[openqa-testtag]\nname=Tag test repo\nbaseurl=' . get_var("UPDATE_OR_TAG_REPO") . '\nenabled=1\nmetadata_expire=3600\ngpgcheck=0\npriority=1\n' if ($tag || $copr);
|
$repos .= '[openqa-testtag]\nname=Tag test repo\nbaseurl=' . get_var("UPDATE_OR_TAG_REPO") . '\nenabled=1\nmetadata_expire=3600\ngpgcheck=0\npriority=1\n' if ($tag || $copr);
|
||||||
# and the workaround repo
|
# and the workaround repo
|
||||||
$repos .= '\n[workarounds]\nname=Workarounds repo\nbaseurl=file:///mnt/workarounds_repo\nenabled=1\nmetadata_expire=3600\ngpgcheck=0\n' if ($workarounds);
|
$repos .= '\n[workarounds]\nname=Workarounds repo\nbaseurl=file:///mnt/workarounds_repo\nenabled=1\nmetadata_expire=3600\ngpgcheck=0\n' if ($workarounds);
|
||||||
# also the buildroot repo, for Rawhide
|
# also the buildroot repo if applicable
|
||||||
if ($version eq $rawrel) {
|
my $brrepo = get_var("BUILDROOT_REPO");
|
||||||
$repos .= '\n[koji-rawhide]\nname=Buildroot repo\nbaseurl=https://kojipkgs.fedoraproject.org/repos/f' . $version . '-build/latest/\$basearch/\nenabled=1\nmetadata_expire=3600\ngpgcheck=0\nskip_if_unavailable=1\n';
|
if ($brrepo) {
|
||||||
|
$repos .= '\n[buildroot]\nname=Buildroot repo\nbaseurl=https://kojipkgs.fedoraproject.org/repos/' . $brrepo . '/latest/\$basearch/\nenabled=1\nmetadata_expire=3600\ngpgcheck=0\nskip_if_unavailable=1\n';
|
||||||
}
|
}
|
||||||
$repos .= '\"\"\"';
|
$repos .= '\"\"\"';
|
||||||
assert_script_run 'printf "' . $repos . '" >> /etc/mock/openqa.cfg';
|
assert_script_run 'printf "' . $repos . '" >> /etc/mock/openqa.cfg';
|
||||||
|
12
lib/utils.pm
12
lib/utils.pm
@ -708,13 +708,11 @@ sub _repo_setup_updates {
|
|||||||
repos_mirrorlist();
|
repos_mirrorlist();
|
||||||
# Disable updates-testing so other bad updates don't break us
|
# Disable updates-testing so other bad updates don't break us
|
||||||
disable_updates_repos(both => 0) if ($version > $currrel);
|
disable_updates_repos(both => 0) if ($version > $currrel);
|
||||||
# use the buildroot repo on Rawhide: see e.g.
|
# use the buildroot repo on Rawhide and Branched pre-ut-activation:
|
||||||
# https://pagure.io/fedora-ci/general/issue/376 for why
|
# see e.g. https://pagure.io/fedora-ci/general/issue/376 for why
|
||||||
if ($version eq get_var("RAWREL") && get_var("TEST") ne "support_server") {
|
my $brrepo = get_var("BUILDROOT_REPO");
|
||||||
assert_script_run 'printf "[koji-rawhide]\nname=koji-rawhide\nbaseurl=https://kojipkgs.fedoraproject.org/repos/f' . $version . '-build/latest/' . $arch . '/\ncost=2000\nenabled=1\ngpgcheck=0\n" > /etc/yum.repos.d/koji-rawhide.repo';
|
if ($brrepo && get_var("TEST") ne "support_server") {
|
||||||
}
|
assert_script_run 'printf "[buildroot]\nname=buildroot\nbaseurl=https://kojipkgs.fedoraproject.org/repos/' . $brrepo . '/latest/' . $arch . '/\ncost=2000\nenabled=1\ngpgcheck=0\n" > /etc/yum.repos.d/buildroot.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")) {
|
if (get_var("CANNED")) {
|
||||||
# install and use en_US.UTF-8 locale for consistent sort
|
# install and use en_US.UTF-8 locale for consistent sort
|
||||||
|
@ -58,10 +58,10 @@ sub run {
|
|||||||
if (get_var("ADVISORY_OR_TASK")) {
|
if (get_var("ADVISORY_OR_TASK")) {
|
||||||
# add workaround repo if there is one
|
# add workaround repo if there is one
|
||||||
$params .= "inst.addrepo=workarounds,nfs://172.16.2.110:/mnt/workarounds_repo " if (get_workarounds);
|
$params .= "inst.addrepo=workarounds,nfs://172.16.2.110:/mnt/workarounds_repo " if (get_workarounds);
|
||||||
# add tag repo if we're on rawhide
|
# add buildroot repo if applicable
|
||||||
my $version = get_var("VERSION");
|
my $brrepo = get_var("BUILDROOT_REPO");
|
||||||
if ($version eq get_var("RAWREL")) {
|
if ($brrepo) {
|
||||||
$params .= "inst.addrepo=koji-rawhide,https://kojipkgs.fedoraproject.org/repos/f${version}-build/latest/${arch} ";
|
$params .= "inst.addrepo=buildroot,https://kojipkgs.fedoraproject.org/repos/${brrepo}/latest/${arch} ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (get_var("ANACONDA_TEXT")) {
|
if (get_var("ANACONDA_TEXT")) {
|
||||||
|
@ -8,6 +8,7 @@ sub run {
|
|||||||
my $version = get_var("VERSION");
|
my $version = get_var("VERSION");
|
||||||
my $currrel = get_var("CURRREL");
|
my $currrel = get_var("CURRREL");
|
||||||
my $rawrel = get_var("RAWREL");
|
my $rawrel = get_var("RAWREL");
|
||||||
|
my $brrepo = get_var("BUILDROOT_REPO");
|
||||||
my $repo = "fedora.repo";
|
my $repo = "fedora.repo";
|
||||||
$repo = "fedora-rawhide.repo" if ($version eq $rawrel);
|
$repo = "fedora-rawhide.repo" if ($version eq $rawrel);
|
||||||
$repo = "fedora-eln.repo" if (lc($version) eq "eln");
|
$repo = "fedora-eln.repo" if (lc($version) eq "eln");
|
||||||
@ -35,8 +36,7 @@ sub run {
|
|||||||
$cmd .= " --variant=Everything --volid=Fedora-E-dvd-${arch}";
|
$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/workarounds.repo" if (get_workarounds);
|
||||||
$cmd .= " --repo=/etc/yum.repos.d/koji-rawhide.repo" if ($version eq $rawrel);
|
$cmd .= " --repo=/etc/yum.repos.d/buildroot.repo" if ($brrepo);
|
||||||
$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/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 .= " --repo=/etc/yum.repos.d/openqa-testtag.repo" if (get_var("TAG") || get_var("COPR"));
|
||||||
$cmd .= " ./results";
|
$cmd .= " ./results";
|
||||||
|
@ -9,6 +9,7 @@ sub run {
|
|||||||
my $version = get_var("VERSION");
|
my $version = get_var("VERSION");
|
||||||
my $advortask = get_var("ADVISORY_OR_TASK");
|
my $advortask = get_var("ADVISORY_OR_TASK");
|
||||||
my $rawrel = get_var("RAWREL");
|
my $rawrel = get_var("RAWREL");
|
||||||
|
my $brrepo = get_var("BUILDROOT_REPO");
|
||||||
my $branch;
|
my $branch;
|
||||||
my $repoxml;
|
my $repoxml;
|
||||||
my $releasever;
|
my $releasever;
|
||||||
@ -53,8 +54,8 @@ sub run {
|
|||||||
assert_script_run 'printf "$(head -n -1 ' . $repoxml . ')\n <repository type=\"rpm-md\" alias=\"openqa-testtag\" sourcetype=\"baseurl\">\n <source path=\"' . get_var("UPDATE_OR_TAG_REPO") . '\"/>\n </repository>\n</image>\n" > ' . $repoxml if ($tag || $copr);
|
assert_script_run 'printf "$(head -n -1 ' . $repoxml . ')\n <repository type=\"rpm-md\" alias=\"openqa-testtag\" sourcetype=\"baseurl\">\n <source path=\"' . get_var("UPDATE_OR_TAG_REPO") . '\"/>\n </repository>\n</image>\n" > ' . $repoxml if ($tag || $copr);
|
||||||
# and the workarounds repo
|
# and the workarounds repo
|
||||||
assert_script_run 'printf "$(head -n -1 ' . $repoxml . ')\n <repository type=\"rpm-md\" alias=\"workarounds\" sourcetype=\"baseurl\">\n <source path=\"file:///mnt/workarounds_repo\"/>\n </repository>\n</image>\n" > ' . $repoxml if ($workarounds);
|
assert_script_run 'printf "$(head -n -1 ' . $repoxml . ')\n <repository type=\"rpm-md\" alias=\"workarounds\" sourcetype=\"baseurl\">\n <source path=\"file:///mnt/workarounds_repo\"/>\n </repository>\n</image>\n" > ' . $repoxml if ($workarounds);
|
||||||
# and the buildroot repo, for Rawhide
|
# and the buildroot repo, if applicable
|
||||||
assert_script_run 'printf "$(head -n -1 ' . $repoxml . ')\n <repository type=\"rpm-md\" alias=\"koji-rawhide\" sourcetype=\"baseurl\">\n <source path=\"https://kojipkgs.fedoraproject.org/repos/f' . $version . '-build/latest/\$basearch/\"/>\n </repository>\n</image>\n" > ' . $repoxml if ($version eq $rawrel);
|
assert_script_run 'printf "$(head -n -1 ' . $repoxml . ')\n <repository type=\"rpm-md\" alias=\"buildroot\" sourcetype=\"baseurl\">\n <source path=\"https://kojipkgs.fedoraproject.org/repos/' . $brrepo . '/latest/\$basearch/\"/>\n </repository>\n</image>\n" > ' . $repoxml if ($brrepo);
|
||||||
# upload the repositories XML so we can check it
|
# upload the repositories XML so we can check it
|
||||||
# NOTE: koji kiwi plugin does much more futzing around with the XML
|
# NOTE: koji kiwi plugin does much more futzing around with the XML
|
||||||
# it flattens includes, fiddles with the repos, and and messes with
|
# it flattens includes, fiddles with the repos, and and messes with
|
||||||
|
@ -8,6 +8,7 @@ sub run {
|
|||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $version = get_var("VERSION");
|
my $version = get_var("VERSION");
|
||||||
my $rawrel = get_var("RAWREL");
|
my $rawrel = get_var("RAWREL");
|
||||||
|
my $brrepo = get_var("BUILDROOT_REPO");
|
||||||
my $branch;
|
my $branch;
|
||||||
my $repoks;
|
my $repoks;
|
||||||
my $releasever;
|
my $releasever;
|
||||||
@ -43,7 +44,7 @@ sub run {
|
|||||||
assert_script_run 'echo "repo --name=workarounds --baseurl=file:///mnt/workarounds_repo" >> ' . $repoks if ($workarounds);
|
assert_script_run 'echo "repo --name=workarounds --baseurl=file:///mnt/workarounds_repo" >> ' . $repoks if ($workarounds);
|
||||||
# and the buildroot repo, for Rawhide
|
# and the buildroot repo, for Rawhide
|
||||||
if ($version eq $rawrel) {
|
if ($version eq $rawrel) {
|
||||||
assert_script_run 'echo "repo --name=koji-rawhide --baseurl=https://kojipkgs.fedoraproject.org/repos/f' . $version . '-build/latest/\$basearch/" >> ' . $repoks;
|
assert_script_run 'echo "repo --name=buildroot --baseurl=https://kojipkgs.fedoraproject.org/repos/' . $brrepo . '/latest/\$basearch/" >> ' . $repoks;
|
||||||
}
|
}
|
||||||
# now flatten the kickstart
|
# now flatten the kickstart
|
||||||
assert_script_run "ksflatten -c fedora-live-${lcsubv}.ks -o openqa.ks";
|
assert_script_run "ksflatten -c fedora-live-${lcsubv}.ks -o openqa.ks";
|
||||||
|
@ -8,6 +8,7 @@ sub run {
|
|||||||
my $version = get_var("VERSION");
|
my $version = get_var("VERSION");
|
||||||
my $currrel = get_var("CURRREL");
|
my $currrel = get_var("CURRREL");
|
||||||
my $rawrel = get_var("RAWREL");
|
my $rawrel = get_var("RAWREL");
|
||||||
|
my $brrepo = get_var("BUILDROOT_REPO");
|
||||||
my $repo = $version eq $rawrel ? "fedora-rawhide.repo" : "fedora.repo";
|
my $repo = $version eq $rawrel ? "fedora-rawhide.repo" : "fedora.repo";
|
||||||
my $branch;
|
my $branch;
|
||||||
if ($version eq $rawrel) {
|
if ($version eq $rawrel) {
|
||||||
@ -38,15 +39,15 @@ sub run {
|
|||||||
assert_script_run 'git clone https://pagure.io/workstation-ostree-config.git';
|
assert_script_run 'git clone https://pagure.io/workstation-ostree-config.git';
|
||||||
assert_script_run 'pushd workstation-ostree-config';
|
assert_script_run 'pushd workstation-ostree-config';
|
||||||
assert_script_run "git checkout ${branch}";
|
assert_script_run "git checkout ${branch}";
|
||||||
# now copy the advisory, workaround repo and koji-rawhide config files
|
# now copy the advisory, workaround repo and buildroot repo config files
|
||||||
assert_script_run 'cp /etc/yum.repos.d/workarounds.repo .' if ($workarounds);
|
assert_script_run 'cp /etc/yum.repos.d/workarounds.repo .' if ($workarounds);
|
||||||
assert_script_run 'cp /etc/yum.repos.d/koji-rawhide.repo .' if ($version eq $rawrel);
|
assert_script_run 'cp /etc/yum.repos.d/buildroot.repo .' if ($brrepo);
|
||||||
assert_script_run 'cp /etc/yum.repos.d/advisory.repo .' unless ($tag || $copr);
|
assert_script_run 'cp /etc/yum.repos.d/advisory.repo .' unless ($tag || $copr);
|
||||||
assert_script_run 'cp /etc/yum.repos.d/openqa-testtag.repo .' if ($tag || $copr);
|
assert_script_run 'cp /etc/yum.repos.d/openqa-testtag.repo .' if ($tag || $copr);
|
||||||
# and add them to the config file
|
# and add them to the config file
|
||||||
my $repl = 'repos:';
|
my $repl = 'repos:';
|
||||||
$repl .= '\n - workarounds' if ($workarounds);
|
$repl .= '\n - workarounds' if ($workarounds);
|
||||||
$repl .= '\n - koji-rawhide' if ($version eq $rawrel);
|
$repl .= '\n - buildroot' if ($brrepo);
|
||||||
$repl .= '\n - advisory' unless ($tag || $copr);
|
$repl .= '\n - advisory' unless ($tag || $copr);
|
||||||
$repl .= '\n - openqa-testtag' if ($tag || $copr);
|
$repl .= '\n - openqa-testtag' if ($tag || $copr);
|
||||||
# Just add them to all config files, as the names change a lot
|
# Just add them to all config files, as the names change a lot
|
||||||
@ -98,7 +99,7 @@ sub run {
|
|||||||
$cmd .= " --isfinal --repo=/etc/yum.repos.d/fedora-updates.repo";
|
$cmd .= " --isfinal --repo=/etc/yum.repos.d/fedora-updates.repo";
|
||||||
}
|
}
|
||||||
$cmd .= " --repo=/etc/yum.repos.d/workarounds.repo" if ($workarounds);
|
$cmd .= " --repo=/etc/yum.repos.d/workarounds.repo" if ($workarounds);
|
||||||
$cmd .= " --repo=/etc/yum.repos.d/koji-rawhide.repo" if ($version eq $rawrel);
|
$cmd .= " --repo=/etc/yum.repos.d/buildroot.repo" if ($brrepo);
|
||||||
$cmd .= " --repo=/etc/yum.repos.d/advisory.repo" unless ($tag || $copr);
|
$cmd .= " --repo=/etc/yum.repos.d/advisory.repo" unless ($tag || $copr);
|
||||||
$cmd .= " --repo=/etc/yum.repos.d/openqa-testtag.repo" if ($tag || $copr);
|
$cmd .= " --repo=/etc/yum.repos.d/openqa-testtag.repo" if ($tag || $copr);
|
||||||
$cmd .= " ./results";
|
$cmd .= " ./results";
|
||||||
|
@ -140,6 +140,12 @@ sub run {
|
|||||||
# In F32+ we may get an 'akonadi did something' message
|
# In F32+ we may get an 'akonadi did something' message
|
||||||
if (check_screen 'akonadi_migration_notification', 5) {
|
if (check_screen 'akonadi_migration_notification', 5) {
|
||||||
click_lastmatch;
|
click_lastmatch;
|
||||||
|
# ...and on F42+ that makes the notification pane close
|
||||||
|
# so we have to open it again
|
||||||
|
if (check_screen 'desktop_expand_systray', 5) {
|
||||||
|
click_lastmatch;
|
||||||
|
assert_and_click 'desktop_systray_notifications';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($desktop eq 'i3') {
|
if ($desktop eq 'i3') {
|
||||||
|
@ -11,11 +11,11 @@ sub run {
|
|||||||
# use a tty console for repo config and package prep
|
# use a tty console for repo config and package prep
|
||||||
$self->root_console(tty => 3);
|
$self->root_console(tty => 3);
|
||||||
disable_updates_repos;
|
disable_updates_repos;
|
||||||
# for update tests, disable koji-rawhide at this point, otherwise
|
# for update tests, disable buildroot repo at this point, otherwise
|
||||||
# gnome-software will complain about things being unsigned even
|
# gnome-software will complain about things being unsigned even
|
||||||
# though the repo has gpgcheck=0
|
# though the repo has gpgcheck=0
|
||||||
if (get_var("ADVISORY_OR_TASK") && get_var("VERSION") eq get_var("RAWREL")) {
|
if (get_var("BUILDROOT_REPO")) {
|
||||||
assert_script_run 'sed -i -e "s,enabled=1,enabled=0,g" /etc/yum.repos.d/koji-rawhide.repo';
|
assert_script_run 'sed -i -e "s,enabled=1,enabled=0,g" /etc/yum.repos.d/buildroot.repo';
|
||||||
}
|
}
|
||||||
# fwupd causes problems sometimes, and we're not testing it
|
# fwupd causes problems sometimes, and we're not testing it
|
||||||
script_run "systemctl stop fwupd.service";
|
script_run "systemctl stop fwupd.service";
|
||||||
|
Loading…
Reference in New Issue
Block a user