diff options
author | jose.lausuch <jose.lausuch@ericsson.com> | 2017-06-23 10:49:15 +0200 |
---|---|---|
committer | jose.lausuch <jose.lausuch@ericsson.com> | 2017-06-26 09:41:26 +0200 |
commit | 429a6eccd0858ffa8cb326c937d2c7ccdf6ffec8 (patch) | |
tree | f32ccd0429724336bb553f04fb241048fa7e4a56 | |
parent | b04150dda0678772a6a42da8d7878deb4ddcd551 (diff) |
Don't display functest report for single test cases
When executing a single test case, it is not neccessary
to show duplicated information about the result of the test
case. The functest report only makes sense when running
multiple tests.
e.g. functest testcase run vping_ssh
The report is still showed when doing:
functest testcase run all
Change-Id: I92d97d6111ecd9484a14c72cf4bb0c2bbe3ae6bf
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
-rwxr-xr-x | functest/ci/run_tests.py | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/functest/ci/run_tests.py b/functest/ci/run_tests.py index 430f0ca8d..722df14fe 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 |