forked from TrueCloudLab/frostfs-testcases
[#163] Setup and Teardown restart dev-env
Signed-off-by: Elizaveta Chichindaeva <elizaveta@nspcc.ru>
This commit is contained in:
parent
bd9507a19e
commit
0d86352cbe
7 changed files with 49 additions and 13 deletions
|
@ -13,14 +13,14 @@ from robot.api import logger
|
|||
ROBOT_AUTO_KEYWORDS = False
|
||||
|
||||
|
||||
def _cmd_run(cmd):
|
||||
def _cmd_run(cmd, timeout=30):
|
||||
"""
|
||||
Runs given shell command <cmd>, in case of success returns its stdout,
|
||||
in case of failure returns error message.
|
||||
"""
|
||||
try:
|
||||
compl_proc = subprocess.run(cmd, check=True, universal_newlines=True,
|
||||
stdout=subprocess.PIPE, stderr=subprocess.STDOUT, timeout=30,
|
||||
stdout=subprocess.PIPE, stderr=subprocess.STDOUT, timeout=timeout,
|
||||
shell=True)
|
||||
output = compl_proc.stdout
|
||||
logger.info(f"Output: {output}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue