From e236b078f49e66b986036cca4495d5524ee332ea Mon Sep 17 00:00:00 2001 From: SerenaFeng Date: Wed, 27 Jul 2016 09:42:20 +0800 Subject: substitue misused variable 'total_success' with 'success_rate' JIRA: FUNCTEST-390 Change-Id: I35a2f72016573fc9e0a8403e436d5568937c5b14 Signed-off-by: SerenaFeng --- testcases/OpenStack/rally/run_rally-cert.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'testcases/OpenStack') diff --git a/testcases/OpenStack/rally/run_rally-cert.py b/testcases/OpenStack/rally/run_rally-cert.py index 80c13a6c9..7d9a7cd9d 100755 --- a/testcases/OpenStack/rally/run_rally-cert.py +++ b/testcases/OpenStack/rally/run_rally-cert.py @@ -490,19 +490,19 @@ def main(): total_duration_str = time.strftime("%H:%M:%S", time.gmtime(total_duration)) total_duration_str2 = "{0:<10}".format(total_duration_str) total_nb_tests_str = "{0:<13}".format(total_nb_tests) - total_success = "{:0.2f}".format(total_success / len(SUMMARY)) - total_success_str = "{0:<10}".format(str(total_success) + '%') + success_rate = "{:0.2f}".format(total_success / len(SUMMARY)) + success_rate_str = "{0:<10}".format(str(success_rate) + '%') report += "+===================+============+===============+===========+" report += "\n" report += ("| TOTAL: | " + total_duration_str2 + " | " + - total_nb_tests_str + " | " + total_success_str + "|\n") + total_nb_tests_str + " | " + success_rate_str + "|\n") report += "+===================+============+===============+===========+" report += "\n" logger.info("\n" + report) payload.append({'summary': {'duration': total_duration, 'nb tests': total_nb_tests, - 'nb success': total_success}}) + 'nb success': success_rate}}) # Generate json results for DB # json_results = {"timestart": time_start, "duration": total_duration, @@ -513,7 +513,7 @@ def main(): # Evaluation of the success criteria status = "FAIL" # for Rally we decided that the overall success rate must be above 90% - if float(total_success) >= 90: + if float(success_rate) >= 90: status = "PASS" if args.sanity: -- cgit 1.2.3-korg