From 0271642f61cf94df1305de278484dab7129fd8d5 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Tue, 11 Apr 2023 10:58:09 -0700 Subject: [PATCH] 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 --- tests/_check_install_source.pm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/_check_install_source.pm b/tests/_check_install_source.pm index 92f8390e..40c1f006 100644 --- a/tests/_check_install_source.pm +++ b/tests/_check_install_source.pm @@ -27,14 +27,17 @@ sub run { # this line tells us it set up a repo for our URL. # "repo addrepo" is older format from before Fedora 37, # "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' - 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). - 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 - # is from F39+ - assert_script_run 'grep -E "Loaded metadata from.*file:///run/install/(addrepo.nfs|sources/mount-1000-nfs-device)" /tmp/anaconda.log'; + # or mount-0000-nfs-device is from F39+ + 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:/) {