From 4b672f26b14f5dd0f33833ba15185a53e84f4b44 Mon Sep 17 00:00:00 2001 From: Linda Wang Date: Tue, 22 Aug 2017 02:19:31 +0000 Subject: Add the skipped testcases into details When running tempest_custom, if all tests are skipped, record them in details. Change-Id: Ie18ec0911ff298f91c524a9cd039929c2d0f6425 Signed-off-by: Linda Wang --- functest/opnfv_tests/openstack/tempest/tempest.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/functest/opnfv_tests/openstack/tempest/tempest.py b/functest/opnfv_tests/openstack/tempest/tempest.py index 003d4ea41..f783f01ff 100644 --- a/functest/opnfv_tests/openstack/tempest/tempest.py +++ b/functest/opnfv_tests/openstack/tempest/tempest.py @@ -184,9 +184,12 @@ class TempestCommon(testcase.OSGCTestCase): try: self.result = 100 * int(num_success) / int(num_executed) except ZeroDivisionError: - logger.error("No test has been executed") self.result = 0 - return + if int(num_tests) > 0: + logger.info("All tests have been skipped") + else: + logger.error("No test has been executed") + return with open(os.path.join(conf_utils.TEMPEST_RESULTS_DIR, "tempest.log"), 'r') as logfile: -- cgit 1.2.3-korg