From e9e07888dc8b78653e19745a3214cdd187022746 Mon Sep 17 00:00:00 2001 From: SerenaFeng Date: Fri, 29 Jul 2016 17:07:44 +0800 Subject: correct rally criteria check add method check_success_rate() to unify criteria check by success_rate JIRA: FUNCTEST-398 Change-Id: I1b3f0ccd7061b80ac88356206f29844e31e4101b Signed-off-by: SerenaFeng --- testcases/OpenStack/rally/run_rally-cert.py | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'testcases/OpenStack') diff --git a/testcases/OpenStack/rally/run_rally-cert.py b/testcases/OpenStack/rally/run_rally-cert.py index 2f696ec3..2bb191fa 100755 --- a/testcases/OpenStack/rally/run_rally-cert.py +++ b/testcases/OpenStack/rally/run_rally-cert.py @@ -504,23 +504,14 @@ 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) + if args.report: logger.debug("Pushing Rally summary into DB...") functest_utils.push_results_to_db("functest", -- cgit 1.2.3-korg