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

_check_install_source: adapt to anaconda changing logs, again

anaconda changed the repository add code (again) and so the log
messages changed (again). We're now tracking three variations
from <F35, F35, and F36. Sigh.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2022-01-12 14:28:32 -08:00
parent b60b0f85b4
commit b17b112800

View File

@ -26,8 +26,11 @@ sub run {
if ($addrepourl =~ m,^nfs://,,) { if ($addrepourl =~ m,^nfs://,,) {
# this line tells us it set up a repo for our URL... # this line tells us it set up a repo for our URL...
assert_script_run 'grep "repo addrepo.*' . ${addrepourl} . '" /tmp/packaging.log'; assert_script_run 'grep "repo addrepo.*' . ${addrepourl} . '" /tmp/packaging.log';
# ...this line tells us it added the repo called 'addrepo'... # ...this line tells us it added the repo called 'addrepo' (<F36)...
assert_script_run 'grep "\(added\|enabled\) repo: .addrepo." /tmp/packaging.log'; if (script_run 'grep "\(added\|enabled\) repo: .addrepo." /tmp/packaging.log') {
# this is F36+
assert_script_run 'grep "Added the ' . "'addrepo'" . '" /tmp/anaconda.log';
}
# ...and one of these tells us it worked (I hope). This one is <F35... # ...and one of these tells us it worked (I hope). This one is <F35...
if (script_run 'grep "enabled repo.*nfs" /tmp/packaging.log') { if (script_run 'grep "enabled repo.*nfs" /tmp/packaging.log') {
# ...these are F35+ # ...these are F35+
@ -65,8 +68,14 @@ sub run {
# in F35+, the "enabled repo" log line is gone, instead # in F35+, the "enabled repo" log line is gone, instead
# we'll check some log messages from the dnf manager module # we'll check some log messages from the dnf manager module
# that show up in anaconda.log. Can drop the above branch # that show up in anaconda.log. Can drop the above branch
# and only go with the below branch after F34 EOL # and only go with this branch after F34 EOL.
assert_script_run 'grep "added repo: ' . "'anaconda'.*${repourl}" . '" /tmp/packaging.log'; #
# in F36+, the "added repo: " line in packaging.log is
# gone too, instead we get "Added the 'XXX' repository"
# in anaconda.log
if (script_run 'grep "added repo: ' . "'anaconda'.*${repourl}" . '" /tmp/packaging.log') {
assert_script_run 'grep "Added the ' . "'anaconda'" . '" /tmp/anaconda.log';
}
assert_script_run 'grep "Load metadata for the ' . "'anaconda'" . '" /tmp/anaconda.log'; assert_script_run 'grep "Load metadata for the ' . "'anaconda'" . '" /tmp/anaconda.log';
assert_script_run 'grep "Loaded metadata from ' . ".*${repourl}" . '" /tmp/anaconda.log'; assert_script_run 'grep "Loaded metadata from ' . ".*${repourl}" . '" /tmp/anaconda.log';
} }