From fdaa4783e7e52558e09fcd9120ba3930e9b27b40 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Mon, 7 May 2018 15:49:24 -0700 Subject: [PATCH] _check_install_source: handle 'added repo' and 'enabled repo' The text changed from 'added repo' to 'enabled repo' in Rawhide after F28, so let's handle both at least till F28 is EOL. Signed-off-by: Adam Williamson --- tests/_check_install_source.pm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tests/_check_install_source.pm b/tests/_check_install_source.pm index a1099504..06990032 100644 --- a/tests/_check_install_source.pm +++ b/tests/_check_install_source.pm @@ -30,7 +30,19 @@ sub run { } } else { - assert_script_run "grep \"added repo: 'anaconda'.*${repourl}\" /tmp/packaging.log"; + # there are only three hard problems in software development: + # naming things, cache expiry, off-by-one errors...and quoting + # we need single quotes (at the perl level) around the start + # of this, so the backslashes are not interpreted by perl but + # passed through to ultimately be interpreted by 'grep' + # itself. We need double quotes around $repourl so that *is* + # interpreted by perl. And we need quotes around the entire + # expression at the bash level, and single quotes around the + # text 'anaconda' at the level of grep, as the string we're + # actually matching on literally has 'anaconda' in it. We need + # (added|enabled) till F28 goes EOL: the log line was changed + # in Rawhide after F28 came out. + assert_script_run 'grep "\(added\|enabled\) repo: ' . "'anaconda'.*${repourl}" . '" /tmp/packaging.log'; } send_key "ctrl-alt-f6";