Bugfix: KeyError when Functest fails to store results into file 45/35845/1
authorxudan <xudan16@huawei.com>
Wed, 7 Jun 2017 02:13:07 +0000 (22:13 -0400)
committerxudan <xudan16@huawei.com>
Wed, 7 Jun 2017 02:13:07 +0000 (22:13 -0400)
JIRA: DOVETAIL-445

https://build.opnfv.org/ci/view/dovetail/job/dovetail-fuel-baremetal-proposed_tests-danube/19/console

Change-Id: If933156bb3931e7bfc8ec31eb03ca5a3cb0bf8b0
Signed-off-by: xudan <xudan16@huawei.com>
dovetail/run.py

index 84bd88f..09d6948 100755 (executable)
@@ -95,10 +95,10 @@ def check_tc_result(testcase, logger):
             return
         if os.path.isfile(result_file):
             logger.info("Results have been stored with file %s.", result_file)
-            result = Report.get_result(testcase)
-            Report.check_result(testcase, result)
         else:
             logger.error("Fail to store results with file %s.", result_file)
+        result = Report.get_result(testcase)
+        Report.check_result(testcase, result)
 
 
 def validate_input(input_dict, check_dict, logger):