From: Linda Wang Date: Tue, 22 Aug 2017 02:19:31 +0000 (+0000) Subject: Add the skipped testcases into details X-Git-Tag: opnfv-5.0.RC1~172^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=4b672f26b14f5dd0f33833ba15185a53e84f4b44;p=functest.git 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 --- 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: