mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-11-21 21:43:08 +00:00
Enable testing of COPRs, fix some issues, enable package checks
This works more or less like testing side tags. We also fix up some flow problems with this path (that also affect the side tag case), and enable the package checks on this path - it's not too hard really, we just need to write the updatepkgs file when we set up the repo, which we can do with dnf repoquery. Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
1edde53988
commit
a353caeb90
43
lib/utils.pm
43
lib/utils.pm
@ -570,13 +570,24 @@ sub setup_repos {
|
|||||||
);
|
);
|
||||||
my $arch = get_var("ARCH");
|
my $arch = get_var("ARCH");
|
||||||
my $tag = get_var("TAG");
|
my $tag = get_var("TAG");
|
||||||
# write the tag repo config if appropriate
|
my $copr = get_var("COPR");
|
||||||
assert_script_run 'printf "[openqa-testtag]\nname=openqa-testtag\nbaseurl=https://kojipkgs.fedoraproject.org/repos/' . "$tag/latest/$arch" . '/\ncost=2000\nenabled=1\ngpgcheck=0\n" > /etc/yum.repos.d/openqa-testtag.repo' if ($tag && !$args{waonly});
|
if (($tag || $copr) && !$args{waonly}) {
|
||||||
|
# write a side tag or COPR repo config, enabled or disabled
|
||||||
|
# according to the 'configs' arg
|
||||||
|
assert_script_run 'printf "[openqa-testtag]\nname=openqa-testtag\nbaseurl=' . get_var("UPDATE_OR_TAG_REPO") . '/\ncost=2000\nenabled=' . $args{configs} . '\ngpgcheck=0\npriority=1\n" > /etc/yum.repos.d/openqa-testtag.repo';
|
||||||
|
# write out the info files
|
||||||
|
assert_script_run 'dnf --disablerepo=* --enablerepo=openqa-testtag repoquery --qf "%{SOURCERPM} %{NAME} %{EPOCH} %{VERSION} %{RELEASE}" | sort -u > /mnt/updatepkgs.txt';
|
||||||
|
# the | xargs here is a wacky trick that converts newlines to
|
||||||
|
# spaces - unlike rpm, dnf always puts every package on a new
|
||||||
|
# line, which we don't want here
|
||||||
|
# https://unix.stackexchange.com/a/110759
|
||||||
|
assert_script_run 'dnf --disablerepo=* --enablerepo=openqa-testtag repoquery --qf "%{NAME} " | xargs > /mnt/updatepkgnames.txt';
|
||||||
|
}
|
||||||
my @was = get_workarounds($args{version});
|
my @was = get_workarounds($args{version});
|
||||||
# bail if there are no workarounds:
|
# bail if there are no workarounds:
|
||||||
# * if we're in workarounds-only mode
|
# * if we're in workarounds-only mode
|
||||||
# * if we're testing a side tag (so no packages to dl)
|
# * if we're testing a side tag or COPR (so no packages to dl)
|
||||||
if ($args{waonly} || $tag) {
|
if ($args{waonly} || $tag || $copr) {
|
||||||
return unless (@was);
|
return unless (@was);
|
||||||
}
|
}
|
||||||
# if we got this far, we're definitely downloading *something*
|
# if we got this far, we're definitely downloading *something*
|
||||||
@ -619,14 +630,14 @@ sub setup_repos {
|
|||||||
die "Neither ADVISORY_NVRS nor KOJITASK set! Don't know what to do" unless ($args{waonly});
|
die "Neither ADVISORY_NVRS nor KOJITASK set! Don't know what to do" unless ($args{waonly});
|
||||||
}
|
}
|
||||||
my $cmd = "/usr/local/bin/setup_repos.py";
|
my $cmd = "/usr/local/bin/setup_repos.py";
|
||||||
# don't download updates if we're in workarounds-only mode or testing a tag
|
# don't download updates if we're in workarounds-only mode or testing a tag or COPR
|
||||||
$cmd .= " -u $udstring" unless ($args{waonly} || $tag);
|
$cmd .= " -u $udstring" unless ($args{waonly} || $tag || $copr);
|
||||||
$cmd .= " -w $wastring" if (@was);
|
$cmd .= " -w $wastring" if (@was);
|
||||||
# write repo config files if asked
|
# write repo config files if asked
|
||||||
$cmd .= " -c" if ($args{configs});
|
$cmd .= " -c" if ($args{configs});
|
||||||
$cmd .= " $arch";
|
$cmd .= " $arch";
|
||||||
assert_script_run $cmd, $timeout;
|
assert_script_run $cmd, $timeout;
|
||||||
unless ($args{waonly} || $tag) {
|
unless ($args{waonly} || $tag || $copr) {
|
||||||
upload_logs "/mnt/updatepkgnames.txt";
|
upload_logs "/mnt/updatepkgnames.txt";
|
||||||
upload_logs "/mnt/updatepkgs.txt";
|
upload_logs "/mnt/updatepkgs.txt";
|
||||||
}
|
}
|
||||||
@ -635,8 +646,9 @@ sub setup_repos {
|
|||||||
sub _repo_setup_updates {
|
sub _repo_setup_updates {
|
||||||
# Appropriate repo setup steps for testing a Bodhi update
|
# Appropriate repo setup steps for testing a Bodhi update
|
||||||
my $tag = get_var("TAG");
|
my $tag = get_var("TAG");
|
||||||
|
my $copr = get_var("COPR");
|
||||||
# Check if we already ran, bail if so
|
# Check if we already ran, bail if so
|
||||||
if ($tag) {
|
if ($tag || $copr) {
|
||||||
# for TAG case, check for the repo file
|
# for TAG case, check for the repo file
|
||||||
return unless script_run "test -f /etc/yum.repos.d/openqa-testtag.repo";
|
return unless script_run "test -f /etc/yum.repos.d/openqa-testtag.repo";
|
||||||
}
|
}
|
||||||
@ -670,8 +682,8 @@ sub _repo_setup_updates {
|
|||||||
select_console("virtio-console");
|
select_console("virtio-console");
|
||||||
console_login();
|
console_login();
|
||||||
# prepare the directory the packages will be downloaded to, unless we're
|
# prepare the directory the packages will be downloaded to, unless we're
|
||||||
# testing a side tag
|
# testing a side tag or COPR
|
||||||
_prepare_update_mount() unless ($tag);
|
_prepare_update_mount() unless ($tag || $copr);
|
||||||
|
|
||||||
# on CANNED, we need to enter the toolbox at this point
|
# on CANNED, we need to enter the toolbox at this point
|
||||||
if (get_var("CANNED")) {
|
if (get_var("CANNED")) {
|
||||||
@ -829,7 +841,6 @@ sub gnome_initial_setup {
|
|||||||
@_
|
@_
|
||||||
);
|
);
|
||||||
my $relnum = get_release_number;
|
my $relnum = get_release_number;
|
||||||
my $advortask = get_var("ADVISORY_OR_TASK");
|
|
||||||
|
|
||||||
# note: when 'language' is "skipped", it's turned into a 'welcome'
|
# note: when 'language' is "skipped", it's turned into a 'welcome'
|
||||||
# page, which has a "Start Setup" button, not a "Next" button
|
# page, which has a "Start Setup" button, not a "Next" button
|
||||||
@ -1203,8 +1214,6 @@ sub quit_with_shortcut {
|
|||||||
# are currently installed. This is here so we can do it both in
|
# are currently installed. This is here so we can do it both in
|
||||||
# _advisory_post and post_fail_hook.
|
# _advisory_post and post_fail_hook.
|
||||||
sub advisory_get_installed_packages {
|
sub advisory_get_installed_packages {
|
||||||
# can't do anything useful when testing a side tag
|
|
||||||
return if (get_var("TAG"));
|
|
||||||
# bail out if the file doesn't exist: this is in case we get
|
# bail out if the file doesn't exist: this is in case we get
|
||||||
# here in the post-fail hook but we failed before creating it
|
# here in the post-fail hook but we failed before creating it
|
||||||
return if script_run "test -f /mnt/updatepkgs.txt";
|
return if script_run "test -f /mnt/updatepkgs.txt";
|
||||||
@ -1234,8 +1243,6 @@ sub advisory_check_nonmatching_packages {
|
|||||||
wrapper => "",
|
wrapper => "",
|
||||||
@_
|
@_
|
||||||
);
|
);
|
||||||
# can't do anything useful when testing a side tag
|
|
||||||
return if (get_var("TAG"));
|
|
||||||
# bail out if the file doesn't exist: this is in case we get
|
# bail out if the file doesn't exist: this is in case we get
|
||||||
# here in the post-fail hook but we failed before creating it
|
# here in the post-fail hook but we failed before creating it
|
||||||
return if script_run "test -f /mnt/updatepkgnames.txt";
|
return if script_run "test -f /mnt/updatepkgnames.txt";
|
||||||
@ -1245,9 +1252,13 @@ sub advisory_check_nonmatching_packages {
|
|||||||
script_run 'touch /tmp/installedupdatepkgs.txt';
|
script_run 'touch /tmp/installedupdatepkgs.txt';
|
||||||
my $rpmcmd = "rpm";
|
my $rpmcmd = "rpm";
|
||||||
my $timeout = 180;
|
my $timeout = 180;
|
||||||
|
# longer if we have a lot of packages
|
||||||
|
my $pkgs = script_output "wc -l /mnt/updatepkgs.txt";
|
||||||
|
$timeout *= 2 if ($pkgs > 100);
|
||||||
|
$timeout *= 2 if ($pkgs > 400);
|
||||||
my $wrapper = $args{wrapper};
|
my $wrapper = $args{wrapper};
|
||||||
$rpmcmd = "$wrapper rpm" if ($wrapper);
|
$rpmcmd = "$wrapper rpm" if ($wrapper);
|
||||||
$timeout = 360 if ($wrapper);
|
$timeout *= 2 if ($wrapper);
|
||||||
# this creates /tmp/installedupdatepkgs.txt as a sorted list of installed
|
# this creates /tmp/installedupdatepkgs.txt as a sorted list of installed
|
||||||
# packages with the same name as packages from the update, in the same form
|
# packages with the same name as packages from the update, in the same form
|
||||||
# as /mnt/updatepkgs.txt. The '--last | head -1' tries to handle the
|
# as /mnt/updatepkgs.txt. The '--last | head -1' tries to handle the
|
||||||
|
@ -20,6 +20,8 @@
|
|||||||
"backend": "qemu",
|
"backend": "qemu",
|
||||||
"settings": {
|
"settings": {
|
||||||
"ARCH_BASE_MACHINE": "aarch64",
|
"ARCH_BASE_MACHINE": "aarch64",
|
||||||
|
"INSECURE_PFLASH_CODE": "/usr/share/edk2/aarch64/QEMU_EFI-pflash.raw",
|
||||||
|
"INSECURE_PFLASH_VARS": "/usr/share/edk2/aarch64/vars-template-pflash.raw",
|
||||||
"PART_TABLE_TYPE": "gpt",
|
"PART_TABLE_TYPE": "gpt",
|
||||||
"QEMU": "aarch64",
|
"QEMU": "aarch64",
|
||||||
"QEMUCPU": "host",
|
"QEMUCPU": "host",
|
||||||
@ -56,6 +58,8 @@
|
|||||||
"backend": "qemu",
|
"backend": "qemu",
|
||||||
"settings": {
|
"settings": {
|
||||||
"ARCH_BASE_MACHINE": "64bit",
|
"ARCH_BASE_MACHINE": "64bit",
|
||||||
|
"INSECURE_PFLASH_CODE": "/usr/share/edk2/ovmf/OVMF_CODE.fd",
|
||||||
|
"INSECURE_PFLASH_VARS": "/usr/share/edk2/ovmf/OVMF_VARS.fd",
|
||||||
"PART_TABLE_TYPE": "gpt",
|
"PART_TABLE_TYPE": "gpt",
|
||||||
"QEMUCPU": "Nehalem",
|
"QEMUCPU": "Nehalem",
|
||||||
"QEMUCPUS": "2",
|
"QEMUCPUS": "2",
|
||||||
|
@ -33,6 +33,7 @@ sub run {
|
|||||||
}
|
}
|
||||||
my $arch = get_var("ARCH");
|
my $arch = get_var("ARCH");
|
||||||
my $tag = get_var("TAG");
|
my $tag = get_var("TAG");
|
||||||
|
my $copr = get_var("COPR");
|
||||||
my $workarounds = get_workarounds;
|
my $workarounds = get_workarounds;
|
||||||
if (get_var("NUMDISKS") > 2) {
|
if (get_var("NUMDISKS") > 2) {
|
||||||
# put /var/lib/mock on the third disk, so we don't run out of
|
# put /var/lib/mock on the third disk, so we don't run out of
|
||||||
@ -50,13 +51,13 @@ sub run {
|
|||||||
assert_script_run "echo \"include('/etc/mock/fedora-${mockver}-${arch}.cfg')\" > /etc/mock/openqa.cfg";
|
assert_script_run "echo \"include('/etc/mock/fedora-${mockver}-${arch}.cfg')\" > /etc/mock/openqa.cfg";
|
||||||
# make the side and workarounds repos and the serial device available inside the mock root
|
# make the side and workarounds repos and the serial device available inside the mock root
|
||||||
assert_script_run 'echo "config_opts[\'plugin_conf\'][\'bind_mount_enable\'] = True" >> /etc/mock/openqa.cfg';
|
assert_script_run 'echo "config_opts[\'plugin_conf\'][\'bind_mount_enable\'] = True" >> /etc/mock/openqa.cfg';
|
||||||
assert_script_run 'echo "config_opts[\'plugin_conf\'][\'bind_mount_opts\'][\'dirs\'].append((\'/mnt/update_repo\', \'/mnt/update_repo\'))" >> /etc/mock/openqa.cfg' unless ($tag);
|
assert_script_run 'echo "config_opts[\'plugin_conf\'][\'bind_mount_opts\'][\'dirs\'].append((\'/mnt/update_repo\', \'/mnt/update_repo\'))" >> /etc/mock/openqa.cfg' unless ($tag || $copr);
|
||||||
assert_script_run 'echo "config_opts[\'plugin_conf\'][\'bind_mount_opts\'][\'dirs\'].append((\'/mnt/workarounds_repo\', \'/mnt/workarounds_repo\'))" >> /etc/mock/openqa.cfg' if ($workarounds);
|
assert_script_run 'echo "config_opts[\'plugin_conf\'][\'bind_mount_opts\'][\'dirs\'].append((\'/mnt/workarounds_repo\', \'/mnt/workarounds_repo\'))" >> /etc/mock/openqa.cfg' if ($workarounds);
|
||||||
assert_script_run 'echo "config_opts[\'plugin_conf\'][\'bind_mount_opts\'][\'dirs\'].append((\'/dev/' . $serialdev . '\', \'/dev/' . $serialdev . '\'))" >> /etc/mock/openqa.cfg';
|
assert_script_run 'echo "config_opts[\'plugin_conf\'][\'bind_mount_opts\'][\'dirs\'].append((\'/dev/' . $serialdev . '\', \'/dev/' . $serialdev . '\'))" >> /etc/mock/openqa.cfg';
|
||||||
my $repos = 'config_opts[\'dnf.conf\'] += \"\"\"\n';
|
my $repos = 'config_opts[\'dnf.conf\'] += \"\"\"\n';
|
||||||
# add the update repo or tag repo to the config
|
# add the update, tag or COPR repo to the config
|
||||||
$repos .= '[advisory]\nname=Advisory repo\nbaseurl=file:///mnt/update_repo\nenabled=1\nmetadata_expire=3600\ngpgcheck=0\n' unless ($tag);
|
$repos .= '[advisory]\nname=Advisory repo\nbaseurl=file:///mnt/update_repo\nenabled=1\nmetadata_expire=3600\ngpgcheck=0\n' unless ($tag || $copr);
|
||||||
$repos .= '[openqa-testtag]\nname=Tag test repo\nbaseurl=https://kojipkgs.fedoraproject.org/repos/' . "${tag}/latest/${arch}" . '\nenabled=1\nmetadata_expire=3600\ngpgcheck=0\n' if ($tag);
|
$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, for Rawhide
|
||||||
@ -86,8 +87,8 @@ sub run {
|
|||||||
assert_script_run 'sed -i -e "s,dnf-yum,yum,g" teams/cloud/vagrant.xml';
|
assert_script_run 'sed -i -e "s,dnf-yum,yum,g" teams/cloud/vagrant.xml';
|
||||||
}
|
}
|
||||||
# now add the side repo or tag repo to the appropriate repo XML
|
# now add the side repo or tag repo to the appropriate repo XML
|
||||||
assert_script_run 'printf "$(head -n -1 ' . $repoxml . ')\n <repository type=\"rpm-md\" alias=\"advisory\" sourcetype=\"baseurl\">\n <source path=\"file:///mnt/update_repo\"/>\n </repository>\n</image>\n" > ' . $repoxml unless ($tag);
|
assert_script_run 'printf "$(head -n -1 ' . $repoxml . ')\n <repository type=\"rpm-md\" alias=\"advisory\" sourcetype=\"baseurl\">\n <source path=\"file:///mnt/update_repo\"/>\n </repository>\n</image>\n" > ' . $repoxml unless ($tag || $copr);
|
||||||
assert_script_run 'printf "$(head -n -1 ' . $repoxml . ')\n <repository type=\"rpm-md\" alias=\"openqa-testtag\" sourcetype=\"baseurl\">\n <source path=\"https://kojipkgs.fedoraproject.org/repos/' . "${tag}/latest/${arch}" . '\"/>\n </repository>\n</image>\n" > ' . $repoxml if ($tag);
|
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, for Rawhide
|
||||||
|
@ -27,8 +27,8 @@ sub run {
|
|||||||
}
|
}
|
||||||
$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/koji-rawhide.repo" if ($version eq $rawrel);
|
||||||
$cmd .= " --repo=/etc/yum.repos.d/advisory.repo" unless (get_var("TAG"));
|
$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"));
|
$cmd .= " --repo=/etc/yum.repos.d/openqa-testtag.repo" if (get_var("TAG") || get_var("COPR"));
|
||||||
$cmd .= " ./results";
|
$cmd .= " ./results";
|
||||||
assert_script_run $cmd, 2400;
|
assert_script_run $cmd, 2400;
|
||||||
# good to have the log around for checks
|
# good to have the log around for checks
|
||||||
|
@ -28,6 +28,7 @@ sub run {
|
|||||||
my $subv = get_var("SUBVARIANT");
|
my $subv = get_var("SUBVARIANT");
|
||||||
my $lcsubv = lc($subv);
|
my $lcsubv = lc($subv);
|
||||||
my $tag = get_var("TAG");
|
my $tag = get_var("TAG");
|
||||||
|
my $copr = get_var("COPR");
|
||||||
my $workarounds = get_workarounds;
|
my $workarounds = get_workarounds;
|
||||||
if (get_var("NUMDISKS") > 2) {
|
if (get_var("NUMDISKS") > 2) {
|
||||||
# put /var/lib/mock on the third disk, so we don't run out of
|
# put /var/lib/mock on the third disk, so we don't run out of
|
||||||
@ -45,13 +46,13 @@ sub run {
|
|||||||
assert_script_run "echo \"include('/etc/mock/fedora-${mockver}-${arch}.cfg')\" > /etc/mock/openqa.cfg";
|
assert_script_run "echo \"include('/etc/mock/fedora-${mockver}-${arch}.cfg')\" > /etc/mock/openqa.cfg";
|
||||||
# make the side and workarounds repos and the serial device available inside the mock root
|
# make the side and workarounds repos and the serial device available inside the mock root
|
||||||
assert_script_run 'echo "config_opts[\'plugin_conf\'][\'bind_mount_enable\'] = True" >> /etc/mock/openqa.cfg';
|
assert_script_run 'echo "config_opts[\'plugin_conf\'][\'bind_mount_enable\'] = True" >> /etc/mock/openqa.cfg';
|
||||||
assert_script_run 'echo "config_opts[\'plugin_conf\'][\'bind_mount_opts\'][\'dirs\'].append((\'/mnt/update_repo\', \'/mnt/update_repo\'))" >> /etc/mock/openqa.cfg' unless ($tag);
|
assert_script_run 'echo "config_opts[\'plugin_conf\'][\'bind_mount_opts\'][\'dirs\'].append((\'/mnt/update_repo\', \'/mnt/update_repo\'))" >> /etc/mock/openqa.cfg' unless ($tag || $copr);
|
||||||
assert_script_run 'echo "config_opts[\'plugin_conf\'][\'bind_mount_opts\'][\'dirs\'].append((\'/mnt/workarounds_repo\', \'/mnt/workarounds_repo\'))" >> /etc/mock/openqa.cfg' if ($workarounds);
|
assert_script_run 'echo "config_opts[\'plugin_conf\'][\'bind_mount_opts\'][\'dirs\'].append((\'/mnt/workarounds_repo\', \'/mnt/workarounds_repo\'))" >> /etc/mock/openqa.cfg' if ($workarounds);
|
||||||
assert_script_run 'echo "config_opts[\'plugin_conf\'][\'bind_mount_opts\'][\'dirs\'].append((\'/dev/' . $serialdev . '\', \'/dev/' . $serialdev . '\'))" >> /etc/mock/openqa.cfg';
|
assert_script_run 'echo "config_opts[\'plugin_conf\'][\'bind_mount_opts\'][\'dirs\'].append((\'/dev/' . $serialdev . '\', \'/dev/' . $serialdev . '\'))" >> /etc/mock/openqa.cfg';
|
||||||
my $repos = 'config_opts[\'dnf.conf\'] += \"\"\"\n';
|
my $repos = 'config_opts[\'dnf.conf\'] += \"\"\"\n';
|
||||||
# add the update repo or tag repo to the config
|
# add the update, tag or COPR repo to the config
|
||||||
$repos .= '[advisory]\nname=Advisory repo\nbaseurl=file:///mnt/update_repo\nenabled=1\nmetadata_expire=3600\ngpgcheck=0\n' unless ($tag);
|
$repos .= '[advisory]\nname=Advisory repo\nbaseurl=file:///mnt/update_repo\nenabled=1\nmetadata_expire=3600\ngpgcheck=0\n' unless ($tag || $copr);
|
||||||
$repos .= '[openqa-testtag]\nname=Tag test repo\nbaseurl=https://kojipkgs.fedoraproject.org/repos/' . "${tag}/latest/${arch}" . '\nenabled=1\nmetadata_expire=3600\ngpgcheck=0\n' if ($tag);
|
$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, for Rawhide
|
||||||
@ -68,9 +69,9 @@ sub run {
|
|||||||
assert_script_run 'git clone https://pagure.io/fedora-kickstarts.git';
|
assert_script_run 'git clone https://pagure.io/fedora-kickstarts.git';
|
||||||
assert_script_run 'cd fedora-kickstarts';
|
assert_script_run 'cd fedora-kickstarts';
|
||||||
assert_script_run "git checkout ${branch}";
|
assert_script_run "git checkout ${branch}";
|
||||||
# now add the side repo or tag repo to the appropriate repo ks
|
# now add the side, tag or COPR repo to the appropriate repo ks
|
||||||
assert_script_run 'echo "repo --name=advisory --baseurl=file:///mnt/update_repo" >> ' . $repoks unless ($tag);
|
assert_script_run 'echo "repo --name=advisory --baseurl=file:///mnt/update_repo" >> ' . $repoks unless ($tag || $copr);
|
||||||
assert_script_run 'echo "repo --name=openqa-testtag --baseurl=https://kojipkgs.fedoraproject.org/repos/' . "${tag}/latest/${arch}" . '" >> ' . $repoks if ($tag);
|
assert_script_run 'echo "repo --name=openqa-testtag --baseurl=' . get_var("UPDATE_OR_TAG_REPO") . '" >> ' . $repoks if ($tag || $copr);
|
||||||
# and the workarounds repo
|
# and the workarounds repo
|
||||||
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
|
||||||
|
@ -10,20 +10,18 @@ sub run {
|
|||||||
my $rawrel = get_var("RAWREL");
|
my $rawrel = get_var("RAWREL");
|
||||||
my $repo = $version eq $rawrel ? "fedora-rawhide.repo" : "fedora.repo";
|
my $repo = $version eq $rawrel ? "fedora-rawhide.repo" : "fedora.repo";
|
||||||
my $branch;
|
my $branch;
|
||||||
my $releasever;
|
|
||||||
if ($version eq $rawrel) {
|
if ($version eq $rawrel) {
|
||||||
$branch = "main";
|
$branch = "main";
|
||||||
$releasever = "Rawhide";
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$branch = "f${version}";
|
$branch = "f${version}";
|
||||||
$releasever = $version;
|
|
||||||
}
|
}
|
||||||
my $advortask = get_var("ADVISORY_OR_TASK");
|
my $advortask = get_var("ADVISORY_OR_TASK");
|
||||||
my $arch = get_var("ARCH");
|
my $arch = get_var("ARCH");
|
||||||
my $subv = get_var("SUBVARIANT");
|
my $subv = get_var("SUBVARIANT");
|
||||||
my $lcsubv = lc($subv);
|
my $lcsubv = lc($subv);
|
||||||
my $tag = get_var("TAG");
|
my $tag = get_var("TAG");
|
||||||
|
my $copr = get_var("COPR");
|
||||||
my $workarounds = get_workarounds;
|
my $workarounds = get_workarounds;
|
||||||
# mount our nice big empty scratch disk as /var/tmp
|
# mount our nice big empty scratch disk as /var/tmp
|
||||||
assert_script_run "rm -rf /var/tmp/*";
|
assert_script_run "rm -rf /var/tmp/*";
|
||||||
@ -43,14 +41,14 @@ sub run {
|
|||||||
# now copy the advisory, workaround repo and koji-rawhide config files
|
# now copy the advisory, workaround repo and koji-rawhide 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/koji-rawhide.repo .' if ($version eq $rawrel);
|
||||||
assert_script_run 'cp /etc/yum.repos.d/advisory.repo .' unless ($tag);
|
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);
|
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 - koji-rawhide' if ($version eq $rawrel);
|
||||||
$repl .= '\n - advisory' unless ($tag);
|
$repl .= '\n - advisory' unless ($tag || $copr);
|
||||||
$repl .= '\n - openqa-testtag' if ($tag);
|
$repl .= '\n - openqa-testtag' if ($tag || $copr);
|
||||||
# Up to Fedora 39, repo definitions are in the subvariant config...
|
# Up to Fedora 39, repo definitions are in the subvariant config...
|
||||||
assert_script_run 'sed -i -e "s,repos:,' . $repl . ',g" fedora-' . $lcsubv . '.yaml';
|
assert_script_run 'sed -i -e "s,repos:,' . $repl . ',g" fedora-' . $lcsubv . '.yaml';
|
||||||
# From Fedora 40 onwards, they're in the common config. Let's just
|
# From Fedora 40 onwards, they're in the common config. Let's just
|
||||||
@ -106,8 +104,8 @@ sub run {
|
|||||||
}
|
}
|
||||||
$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/koji-rawhide.repo" if ($version eq $rawrel);
|
||||||
$cmd .= " --repo=/etc/yum.repos.d/advisory.repo" unless ($tag);
|
$cmd .= " --repo=/etc/yum.repos.d/advisory.repo" unless ($tag || $copr);
|
||||||
$cmd .= " --repo=/etc/yum.repos.d/openqa-testtag.repo" if ($tag);
|
$cmd .= " --repo=/etc/yum.repos.d/openqa-testtag.repo" if ($tag || $copr);
|
||||||
$cmd .= " ./results";
|
$cmd .= " ./results";
|
||||||
assert_script_run $cmd, 9000;
|
assert_script_run $cmd, 9000;
|
||||||
# good to have the log around for checks
|
# good to have the log around for checks
|
||||||
|
@ -133,9 +133,11 @@ sub run {
|
|||||||
assert_script_run "mkdir -p /export";
|
assert_script_run "mkdir -p /export";
|
||||||
# get the kickstart
|
# get the kickstart
|
||||||
assert_script_run "curl -o /export/root-user-crypted-net.ks https://fedorapeople.org/groups/qa/kickstarts/root-user-crypted-net.ks";
|
assert_script_run "curl -o /export/root-user-crypted-net.ks https://fedorapeople.org/groups/qa/kickstarts/root-user-crypted-net.ks";
|
||||||
# for update tests, set up the update repository and export it
|
# for update tests, set up the update repository and export it,
|
||||||
if (get_var("ADVISORY_OR_TASK") && !get_var("TAG")) {
|
# if we have one (for tag and copr tests we don't really need to
|
||||||
assert_script_run "echo '/mnt/update_repo 172.16.2.0/24(ro)' >> /etc/exports";
|
# be here at all so we'll just sit here being useless)
|
||||||
|
if (get_var("ADVISORY_OR_TASK")) {
|
||||||
|
assert_script_run "echo '/mnt/update_repo 172.16.2.0/24(ro)' >> /etc/exports" if (!get_var("TAG") && !get_var("COPR"));
|
||||||
}
|
}
|
||||||
# for compose tests, we do all this stuff
|
# for compose tests, we do all this stuff
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user