Add the skipped testcases into details 37/39837/1
authorLinda Wang <wangwulin@huawei.com>
Tue, 22 Aug 2017 02:19:31 +0000 (02:19 +0000)
committerLinda Wang <wangwulin@huawei.com>
Tue, 22 Aug 2017 02:19:31 +0000 (02:19 +0000)
When running tempest_custom, if all tests are skipped, record them
in details.

Change-Id: Ie18ec0911ff298f91c524a9cd039929c2d0f6425
Signed-off-by: Linda Wang <wangwulin@huawei.com>
functest/opnfv_tests/openstack/tempest/tempest.py

index 003d4ea..f783f01 100644 (file)
@@ -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: