diff options
author | helenyao <yaohelan@huawei.com> | 2017-02-15 21:04:34 -0500 |
---|---|---|
committer | helenyao <yaohelan@huawei.com> | 2017-02-22 06:44:47 -0500 |
commit | 0a09ecbcaefbc03f2a2bb9157be05007100aee90 (patch) | |
tree | beca1f470929e47cb739884c2e1b415b28ee5ae0 /functest/utils/functest_utils.py | |
parent | 0ab99ba102cfa888f8219af5b4cdb1271ae577d2 (diff) |
Prepare env will exit when an error is raised
JIRA: FUNCTEST-727
Change-Id: I4d8e24c0cb6272d92dc777dc82d56490948598db
Signed-off-by: helenyao <yaohelan@huawei.com>
Diffstat (limited to 'functest/utils/functest_utils.py')
-rw-r--r-- | functest/utils/functest_utils.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/functest/utils/functest_utils.py b/functest/utils/functest_utils.py index b2c36cff..78831c11 100644 --- a/functest/utils/functest_utils.py +++ b/functest/utils/functest_utils.py @@ -291,6 +291,13 @@ def get_ci_envvars(): return ci_env_var +def execute_command_raise(cmd, info=False, error_msg="", + verbose=True, output_file=None): + ret = execute_command(cmd, info, error_msg, verbose, output_file) + if ret != 0: + raise Exception(error_msg) + + def execute_command(cmd, info=False, error_msg="", verbose=True, output_file=None): if not error_msg: |