aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests
diff options
context:
space:
mode:
authorLinda Wang <wangwulin@huawei.com>2017-08-22 02:19:31 +0000
committerLinda Wang <wangwulin@huawei.com>2017-08-22 02:19:31 +0000
commit4b672f26b14f5dd0f33833ba15185a53e84f4b44 (patch)
treea1ca6f4b7508ffc2bc904991b50c84069fa9d807 /functest/opnfv_tests
parent9515e36a056ad7f16f39564ae2eeca955054997d (diff)
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 <wangwulin@huawei.com>
Diffstat (limited to 'functest/opnfv_tests')
-rw-r--r--functest/opnfv_tests/openstack/tempest/tempest.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/functest/opnfv_tests/openstack/tempest/tempest.py b/functest/opnfv_tests/openstack/tempest/tempest.py
index 003d4ea4..f783f01f 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: