diff options
author | Markus Kullberg <markus.kullberg@nokia.com> | 2016-07-29 11:06:29 +0300 |
---|---|---|
committer | Jose Lausuch <jose.lausuch@ericsson.com> | 2016-07-29 11:09:57 +0000 |
commit | 7053fa447735e3f86772c4561aaacba74713680c (patch) | |
tree | cb0503813be190725e0d2d813bbb34f095ea05b5 /testcases/OpenStack/rally | |
parent | 94a427e991b424474053e1ccae0cba26fceacfb0 (diff) |
Return -1 in Rally if the success criteria is not met
JIRA: FUNCTEST-382
Change-Id: Iaf475ecd3dbfcf6fb639ff146fe96e54c5393a1e
Signed-off-by: Markus Kullberg <markus.kullberg@nokia.com>
Diffstat (limited to 'testcases/OpenStack/rally')
-rwxr-xr-x | testcases/OpenStack/rally/run_rally-cert.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/testcases/OpenStack/rally/run_rally-cert.py b/testcases/OpenStack/rally/run_rally-cert.py index 2bb191fad..1f1214e03 100755 --- a/testcases/OpenStack/rally/run_rally-cert.py +++ b/testcases/OpenStack/rally/run_rally-cert.py @@ -512,6 +512,10 @@ def main(): # Evaluation of the success criteria status = functest_utils.check_success_rate(case_name, success_rate) + exit_code = -1 + if status == "PASS": + exit_code = 0 + if args.report: logger.debug("Pushing Rally summary into DB...") functest_utils.push_results_to_db("functest", @@ -522,7 +526,7 @@ def main(): status, payload) if args.noclean: - exit(0) + exit(exit_code) if not image_exists: logger.debug("Deleting image '%s' with ID '%s'..." @@ -536,6 +540,8 @@ def main(): if not os_utils.delete_volume_type(cinder_client, volume_type): logger.error("Error in deleting volume type...") + exit(exit_code) + if __name__ == '__main__': main() |