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

Adjust _check_install_source for more changes in anaconda

Another message changed format a bit, and all the messages are
now showing up in syslog instead of packaging.log, so handle
all possibilities here. I had to split the first check into two
commands because I can't seem to make it work if I try and do it
all in one command with bracket groups :/

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2023-04-11 10:58:09 -07:00
parent a07cc52a6e
commit 0271642f61

View File

@ -27,14 +27,17 @@ sub run {
# this line tells us it set up a repo for our URL. # this line tells us it set up a repo for our URL.
# "repo addrepo" is older format from before Fedora 37, # "repo addrepo" is older format from before Fedora 37,
# "Add the 'addrepo" is newer format from F37+ # "Add the 'addrepo" is newer format from F37+
assert_script_run 'grep "\(repo \|Add the \'\)addrepo.*' . ${addrepourl} . '" /tmp/packaging.log'; if (script_run 'grep "\(repo \|Add the \'\)addrepo.*' . ${addrepourl} . '" /tmp/packaging.log') {
# newer path from f39+: message is in syslog and look a bit different
assert_script_run 'grep "Add the \'addrepo.*file:///run/install/sources/mount-.000-nfs-device" /tmp/syslog';
}
# ...this line tells us it added the repo called 'addrepo' # ...this line tells us it added the repo called 'addrepo'
assert_script_run 'grep "Added the \'addrepo\'" /tmp/anaconda.log'; assert_script_run 'grep "Added the \'addrepo\'" /tmp/anaconda.log /tmp/syslog';
# ...and this tells us it worked (I hope). # ...and this tells us it worked (I hope).
assert_script_run 'grep "Load metadata for the \'addrepo\'" /tmp/anaconda.log'; assert_script_run 'grep "Load metadata for the \'addrepo\'" /tmp/anaconda.log /tmp/syslog';
# addrepo.nfs is from before Fedora 39, sources/mount-1000-nfs-device # addrepo.nfs is from before Fedora 39, sources/mount-1000-nfs-device
# is from F39+ # or mount-0000-nfs-device is from F39+
assert_script_run 'grep -E "Loaded metadata from.*file:///run/install/(addrepo.nfs|sources/mount-1000-nfs-device)" /tmp/anaconda.log'; assert_script_run 'grep -E "Loaded metadata from.*file:///run/install/(addrepo.nfs|sources/mount-.000-nfs-device)" /tmp/anaconda.log /tmp/syslog';
} }
} }
if ($repourl =~ /^hd:/) { if ($repourl =~ /^hd:/) {