diff options
Diffstat (limited to 'testcases/OpenStack/rally/run_rally-cert.py')
-rwxr-xr-x | testcases/OpenStack/rally/run_rally-cert.py | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/testcases/OpenStack/rally/run_rally-cert.py b/testcases/OpenStack/rally/run_rally-cert.py index 2f696ec30..1f1214e03 100755 --- a/testcases/OpenStack/rally/run_rally-cert.py +++ b/testcases/OpenStack/rally/run_rally-cert.py @@ -504,23 +504,18 @@ def main(): 'nb tests': total_nb_tests, 'nb success': success_rate}}) - # Generate json results for DB - # json_results = {"timestart": time_start, "duration": total_duration, - # "tests": int(total_nb_tests), - # "success": int(total_success)} - # logger.info("Results: "+str(json_results)) - - # Evaluation of the success criteria - status = "FAIL" - # for Rally we decided that the overall success rate must be above 90% - if float(success_rate) >= 90: - status = "PASS" - if args.sanity: case_name = "rally_sanity" else: case_name = "rally_full" + # 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", @@ -531,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'..." @@ -545,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() |