aboutsummaryrefslogtreecommitdiffstats
path: root/functest/ci/run_tests.py
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2017-08-18 14:22:20 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2017-08-18 14:26:29 +0200
commit282c0ccaf94b60b27a1ed2291e03f5186688158b (patch)
tree76f5a74288df235023e7eddde7b5c9bb91483b89 /functest/ci/run_tests.py
parent2890159f9da2dd13f5db6f85ca039922205df836 (diff)
Fix summary in run_tests.py
It fixes summary() when several tests have not been executed after a blocking test in failure. Change-Id: I3c0af4c8083ffa76f786756d409c09e018bbecc8 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/ci/run_tests.py')
-rw-r--r--functest/ci/run_tests.py18
1 files changed, 12 insertions, 6 deletions
diff --git a/functest/ci/run_tests.py b/functest/ci/run_tests.py
index e26f4305..68d74736 100644
--- a/functest/ci/run_tests.py
+++ b/functest/ci/run_tests.py
@@ -241,12 +241,18 @@ class Runner(object):
tiers = [tier] if tier else self._tiers.get_tiers()
for tier in tiers:
for test in tier.get_tests():
- test_case = self.executed_test_cases[test.get_name()]
- result = 'PASS' if(test_case.is_successful(
- ) == test_case.EX_OK) else 'FAIL'
- msg.add_row([test_case.case_name, test_case.project_name,
- self._tiers.get_tier_name(test_case.case_name),
- test_case.get_duration(), result])
+ try:
+ test_case = self.executed_test_cases[test.get_name()]
+ except KeyError:
+ msg.add_row([test.get_name(), test.get_project(),
+ tier.get_name(), "00:00", "SKIP"])
+ else:
+ result = 'PASS' if(test_case.is_successful(
+ ) == test_case.EX_OK) else 'FAIL'
+ msg.add_row(
+ [test_case.case_name, test_case.project_name,
+ self._tiers.get_tier_name(test_case.case_name),
+ test_case.get_duration(), result])
for test in tier.get_skipped_test():
msg.add_row([test.get_name(), test.get_project(),
tier.get_name(), "00:00", "SKIP"])