in pytest_rally/process.py [0:0]
def run_command_with_return_code(cmd):
try:
proc = subprocess.run(shlex.split(cmd), text=True, capture_output=True, check=True)
return proc.returncode
except subprocess.CalledProcessError as e:
# pytest will capture this for failed tests, making debugging easier
print(e.stdout)
return e.returncode