diff --git a/src/test/regress/citus_tests/common.py b/src/test/regress/citus_tests/common.py index a6169d8c5..cf625c4f7 100644 --- a/src/test/regress/citus_tests/common.py +++ b/src/test/regress/citus_tests/common.py @@ -295,3 +295,15 @@ def initialize_citus_cluster(bindir, datadir, settings, config): if config.add_coordinator_to_metadata: add_coordinator_to_metadata(bindir, config.coordinator_port()) config.setup_steps() + +def eprint(*args, **kwargs): + """eprint prints to stderr""" + + print(*args, file=sys.stderr, **kwargs) + + +def run(command, *args, shell=True, **kwargs): + """run runs the given command and prints it to stderr""" + + eprint(f"+ {command} ") + return subprocess.run(command, *args, check=True, shell=shell, **kwargs)