aboutsummaryrefslogtreecommitdiffstats
path: root/functest/ci/run_tests.py
diff options
context:
space:
mode:
authorJose Lausuch <jose.lausuch@ericsson.com>2017-06-27 09:28:06 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-06-27 09:28:06 +0000
commit6eeafcbb3f0abe63eca3c00dab7ed4adb4e2c34c (patch)
treed669d25a40d5bff779fd47a890b6fea7c6b4fb03 /functest/ci/run_tests.py
parentd7fc6fb2603beb6fc4e8be498763459a33900e26 (diff)
parent429a6eccd0858ffa8cb326c937d2c7ccdf6ffec8 (diff)
Merge "Don't display functest report for single test cases"
Diffstat (limited to 'functest/ci/run_tests.py')
-rwxr-xr-xfunctest/ci/run_tests.py22
1 files changed, 12 insertions, 10 deletions
diff --git a/functest/ci/run_tests.py b/functest/ci/run_tests.py
index 430f0ca8..722df14f 100755
--- a/functest/ci/run_tests.py
+++ b/functest/ci/run_tests.py
@@ -252,16 +252,18 @@ class Runner(object):
msg.add_row([env_var, CONST.__getattribute__(env_var)])
logger.info("Deployment description: \n\n%s\n", msg)
- msg = prettytable.PrettyTable(
- header_style='upper', padding_width=5,
- field_names=['test case', 'project', 'tier', 'duration', 'result'])
- for test_case in self.executed_test_cases:
- result = 'PASS' if(test_case.is_successful(
- ) == test_case.EX_OK) else 'FAIL'
- msg.add_row([test_case.case_name, test_case.project_name,
- _tiers.get_tier_name(test_case.case_name),
- test_case.get_duration(), result])
- logger.info("FUNCTEST REPORT: \n\n%s\n", msg)
+ if len(self.executed_test_cases) > 1:
+ msg = prettytable.PrettyTable(
+ header_style='upper', padding_width=5,
+ field_names=['test case', 'project', 'tier',
+ 'duration', 'result'])
+ for test_case in self.executed_test_cases:
+ result = 'PASS' if(test_case.is_successful(
+ ) == test_case.EX_OK) else 'FAIL'
+ msg.add_row([test_case.case_name, test_case.project_name,
+ _tiers.get_tier_name(test_case.case_name),
+ test_case.get_duration(), result])
+ logger.info("FUNCTEST REPORT: \n\n%s\n", msg)
logger.info("Execution exit value: %s" % self.overall_result)
return self.overall_result