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

Tweak ostree build and rebase for update tests to be more robust

We have had several problems where rebasing from one release to
another just doesn't work, and we have to work around it somehow.
Sometimes it's difficult or impossible to do. All we want to do
here is check the rebase mechanism itself; we don't actually want
to assert that you can rebase to any specific other release.

For update tests, we should be able to use a non-standard ref
name for the ostree we build, embed into the installer image,
and install. That should mean we can then rebase to the standard
ref name for the same release, which should be much safer than
trying to rebase to a different release. We can't do this for
the compose tests, but at least for update tests I'm hoping this
makes things more robust.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2023-06-10 16:00:21 -07:00
parent c5766af308
commit 12fa93bd27
3 changed files with 13 additions and 2 deletions

View File

@ -44,5 +44,8 @@ for addtempvar in args["add_template_var"]:
# this is where the previous step of the openQA test created the # this is where the previous step of the openQA test created the
# ostree repo # ostree repo
cmd = cmd.replace("https://kojipkgs.fedoraproject.org/compose/ostree/repo/", "file:///var/tmp/ostree/repo") cmd = cmd.replace("https://kojipkgs.fedoraproject.org/compose/ostree/repo/", "file:///var/tmp/ostree/repo")
# this changes to our custom ref name
cmd = cmd.replace("ostree_install_ref=fedora/", "ostree_install_ref=fedora-openqa/")
cmd = cmd.replace("ostree_update_ref=fedora/", "ostree_update_ref=fedora-openqa/")
print(cmd) print(cmd)

View File

@ -46,6 +46,9 @@ sub run {
my $repl = 'repos:\n - advisory\n - workarounds'; my $repl = 'repos:\n - advisory\n - workarounds';
$repl .= '\n - koji-rawhide' if ($version eq $rawrel); $repl .= '\n - koji-rawhide' if ($version eq $rawrel);
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';
# change the ref name to a custom one (so we can test rebasing to
# the 'normal' ref later)
assert_script_run 'sed -i -e "s,ref: fedora/,ref: fedora-openqa/,g" fedora-' . $lcsubv . '.yaml';
# upload the config so we can check it # upload the config so we can check it
upload_logs "fedora-$lcsubv.yaml"; upload_logs "fedora-$lcsubv.yaml";
assert_script_run 'popd'; assert_script_run 'popd';
@ -74,7 +77,7 @@ sub run {
assert_script_run 'git clone https://pagure.io/pungi-fedora.git'; assert_script_run 'git clone https://pagure.io/pungi-fedora.git';
assert_script_run 'cd pungi-fedora/'; assert_script_run 'cd pungi-fedora/';
assert_script_run "git checkout ${branch}"; assert_script_run "git checkout ${branch}";
assert_script_run 'wget https://pagure.io/fedora-qa/os-autoinst-distri-fedora/raw/main/f/ostree-parse-pungi.py', timeout => 120; assert_script_run 'wget https://pagure.io/fedora-qa/os-autoinst-distri-fedora/raw/ostree-custom-ref/f/ostree-parse-pungi.py', timeout => 120;
my $loraxargs = script_output "python3 ostree-parse-pungi.py $lcsubv $arch"; my $loraxargs = script_output "python3 ostree-parse-pungi.py $lcsubv $arch";
# this 'temporary file cleanup' thing can actually wipe bits of # this 'temporary file cleanup' thing can actually wipe bits of

View File

@ -38,7 +38,12 @@ sub run {
$rebase = $relnum - 1; $rebase = $relnum - 1;
# avoid rebasing from 37 to <37, bad stuff happens # avoid rebasing from 37 to <37, bad stuff happens
# FIXME when 38 branches, we should change this to RELNUM+1 # FIXME when 38 branches, we should change this to RELNUM+1
$rebase = "rawhide" if ($relnum eq "37"); $rebase = "38" if ($relnum eq "37");
# on update tests, just rebase to the 'official' ref for the
# release, as opposed to the custom ref we used when building;
# this should be more reliable than a different release
$rebase = $relnum if (get_var("ADVISORY_OR_TASK"));
$rebase = "rawhide" if ($rebase eq get_var("RAWREL"));
$target = "fedora/${rebase}/${arch}/silverblue"; $target = "fedora/${rebase}/${arch}/silverblue";
} }
elsif ($current =~ "coreos") { elsif ($current =~ "coreos") {