This is an automated email from the ASF dual-hosted git repository.

maxyang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git

commit 21404af3303034a10af3840b03bc8bc9d331f02b
Author: Yongtao Huang <[email protected]>
AuthorDate: Mon Jun 19 23:13:18 2023 +0800

    Post fix: replace 'egrep' with 'grep -E' in gpMgmt (#15810)
    
    This is a post commit of 
[62bcf77](https://github.com/greenplum-db/gpdb/commit/62bcf771aef01841903abe96bfd9b2c3b6a5d91d)
    
    Signed-off-by: Yongtao Huang <[email protected]>
---
 gpMgmt/test/behave/mgmt_utils/gpinitsystem.feature | 2 +-
 gpMgmt/test/behave/mgmt_utils/steps/mgmt_utils.py  | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/gpMgmt/test/behave/mgmt_utils/gpinitsystem.feature 
b/gpMgmt/test/behave/mgmt_utils/gpinitsystem.feature
index 3b666cc3e0..c112c7aecd 100644
--- a/gpMgmt/test/behave/mgmt_utils/gpinitsystem.feature
+++ b/gpMgmt/test/behave/mgmt_utils/gpinitsystem.feature
@@ -256,7 +256,7 @@ Feature: gpinitsystem tests
         When the user runs command "source $GPHOME/greenplum_path.sh; 
__DCA_VERSION_FILE__=/tmp/gpinitsystem/gpdb-appliance-version 
$GPHOME/bin/gpinitsystem -a -c ../gpAux/gpdemo/clusterConfigFile"
         Then gpinitsystem should return a return code of 0
         # the log file must have the entry indicating that DCA specific 
configuration has been set
-        And the user runs command "egrep 'Setting DCA specific configuration 
values' ~/gpAdminLogs/gpinitsystem*log"
+        And the user runs command "grep -E 'Setting DCA specific configuration 
values' ~/gpAdminLogs/gpinitsystem*log"
 
     Scenario: gpinitsystem uses the system locale if no locale is specified
         Given the database is not running
diff --git a/gpMgmt/test/behave/mgmt_utils/steps/mgmt_utils.py 
b/gpMgmt/test/behave/mgmt_utils/steps/mgmt_utils.py
index e836abc0f9..d2f52f33b2 100644
--- a/gpMgmt/test/behave/mgmt_utils/steps/mgmt_utils.py
+++ b/gpMgmt/test/behave/mgmt_utils/steps/mgmt_utils.py
@@ -646,7 +646,7 @@ def impl(context, process_name, secs):
 @when('the user asynchronously sets up to end {process_name} process when 
{log_msg} is printed in the logs')
 def impl(context, process_name, log_msg):
     command = "while sleep 0.1; " \
-              "do if egrep --quiet %s  ~/gpAdminLogs/%s*log ; " \
+              "do if grep -E --quiet %s  ~/gpAdminLogs/%s*log ; " \
               "then ps ux | grep bin/%s |awk '{print $2}' | xargs kill ;break 
2; " \
               "fi; done" % (log_msg, process_name, process_name)
     run_async_command(context, command)
@@ -654,7 +654,7 @@ def impl(context, process_name, log_msg):
 @then('the user asynchronously sets up to end {kill_process_name} process when 
{log_msg} is printed in the {logfile_name} logs')
 def impl(context, kill_process_name, log_msg, logfile_name):
     command = "while sleep 0.1; " \
-              "do if egrep --quiet %s  ~/gpAdminLogs/%s*log ; " \
+              "do if grep -E --quiet %s  ~/gpAdminLogs/%s*log ; " \
               "then ps ux | grep bin/%s |awk '{print $2}' | xargs kill -2 
;break 2; " \
               "fi; done" % (log_msg, logfile_name, kill_process_name)
     run_async_command(context, command)
@@ -1255,7 +1255,7 @@ def impl(context, options):
 @then('gpintsystem logs should {contain} lines about running backout script')
 def impl(context, contain):
     string_to_find = 'Run command bash .*backout_gpinitsystem.* on coordinator 
to remove these changes$'
-    command = "egrep '{}' 
~/gpAdminLogs/gpinitsystem*log".format(string_to_find)
+    command = "grep -E '{}' 
~/gpAdminLogs/gpinitsystem*log".format(string_to_find)
     run_command(context, command)
     if contain == "contain":
         if has_exception(context):


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to