From: helenyao Date: Thu, 12 Jan 2017 11:12:04 +0000 (-0500) Subject: Bugfix: fix the wrong return code X-Git-Tag: 0.2~969 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=650efd9c929e8e53c55e362078aede82260ca071;p=functest-xtesting.git Bugfix: fix the wrong return code The bug was introduced by patch[1] [1] https://gerrit.opnfv.org/gerrit/#/c/24619/ Change-Id: Icf6c267aba26fcb5b129a611423dcf2200f95277 Signed-off-by: helenyao --- diff --git a/functest/ci/run_tests.py b/functest/ci/run_tests.py index 7aac9d2c..35345fee 100755 --- a/functest/ci/run_tests.py +++ b/functest/ci/run_tests.py @@ -170,7 +170,7 @@ def run_test(test, tier_name): if result != 0: logger.error("The test case '%s' failed. " % test_name) - OVERALL_RESULT = -1 + GlobalVariables.OVERALL_RESULT = -1 result_str = "FAIL" if test.is_blocking(): @@ -180,8 +180,9 @@ def run_test(test, tier_name): # if it is a single test we don't print the whole results table update_test_info(test_name, result_str, duration_str) generate_report.main(GlobalVariables.EXECUTED_TEST_CASES) - logger.info("Execution exit value: %s" % OVERALL_RESULT) - sys.exit(OVERALL_RESULT) + logger.info("Execution exit value: %s" % + GlobalVariables.OVERALL_RESULT) + sys.exit(GlobalVariables.OVERALL_RESULT) update_test_info(test_name, result_str, duration_str)