Fix bug in gpcheckcat behave utils to run all repair scripts.
When passing in a glob directory not all scripts were being run since it was
cd'ing to one particular directory.  Update the command to actually run all
repair scripts.
@@ -1609,10 +1609,8 @@ def impl(context, path, num):
@then('run all the repair scripts in the dir "{dir}"')
def impl(context, dir):
- bash_files = glob.glob("%s/*.sh" % dir)
- for file in bash_files:
- run_command(context, "bash %s" % file)
-
+ command = "find {0} -name *.sh -exec bash {{}} \;".format(dir)
+ run_command(context, command)
if context.ret_code != 0:
raise Exception("Error running repair script %s: %s" % (file, context.stdout_message))
