aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2016-12-01 16:41:22 +0000
committerGerrit Code Review <gerrit@opnfv.org>2016-12-01 16:41:22 +0000
commit8417877de20766eb9695382e708efeb8de32cab6 (patch)
tree4cde19e0379d992ede4fa853bef4b441138bae37
parent0c4870bbdb32540ff358ea0b7cc068645c0a4db1 (diff)
parentac9a06a92ce16dc45ead136c1f2987cb9a202db5 (diff)
Merge "Remove Notion of SKIP in test cases"
-rwxr-xr-xfunctest/ci/testcases.yaml12
-rwxr-xr-xfunctest/opnfv_tests/features/domino.py34
-rw-r--r--functest/opnfv_tests/features/sdnvpn.py15
3 files changed, 20 insertions, 41 deletions
diff --git a/functest/ci/testcases.yaml b/functest/ci/testcases.yaml
index ffdfa51e..d483e589 100755
--- a/functest/ci/testcases.yaml
+++ b/functest/ci/testcases.yaml
@@ -185,18 +185,6 @@ tiers:
installer: '(fuel)|(compass)'
scenario: 'multisite'
-
- name: domino
- criteria: 'status == "PASS"'
- blocking: false
- description: >-
- Test suite for template distribution based on Domino
- dependencies:
- installer: 'joid'
- scenario: ''
- run:
- module: 'functest.opnfv_tests.features.domino'
- class: 'DominoTests'
- -
name: odl-sfc
criteria: 'status == "PASS"'
blocking: false
diff --git a/functest/opnfv_tests/features/domino.py b/functest/opnfv_tests/features/domino.py
index 942b474f..4d882e15 100755
--- a/functest/opnfv_tests/features/domino.py
+++ b/functest/opnfv_tests/features/domino.py
@@ -20,60 +20,56 @@ import sys
import time
from functest.core import TestCasesBase
+import functest.utils.functest_constants as ft_constants
import functest.utils.functest_logger as ft_logger
import functest.utils.functest_utils as ft_utils
-import functest.utils.functest_constants as ft_constants
-class DominoTests(TestCasesBase.TestCasesBase):
+class DominoCases(TestCasesBase.TestCasesBase):
+ DOMINO_REPO = \
+ ft_constants.DOMINO_REPO_DIR
+ RESULTS_DIR = \
+ ft_constants.FUNCTEST_RESULTS_DIR
logger = ft_logger.Logger("domino").getLogger()
def __init__(self):
- super(DominoTests, self).__init__()
+ super(DominoCases, self).__init__()
self.project_name = "domino"
self.case_name = "domino-multinode"
def main(self, **kwargs):
- cmd = ('cd %s && ./tests/run_multinode.sh' %
- ft_constants.DOMINO_REPO_DIR)
- log_file = os.path.join(
- ft_constants.FUNCTEST_RESULTS_DIR, "domino.log")
+ cmd = 'cd %s && ./tests/run_multinode.sh' % self.DOMINO_REPO
+ log_file = os.path.join(self.RESULTS_DIR, "domino.log")
start_time = time.time()
ret = ft_utils.execute_command(cmd,
output_file=log_file)
stop_time = time.time()
- duration = round(stop_time - start_time, 1)
- if ret == 0 and duration > 1:
+ if ret == 0:
self.logger.info("domino OK")
status = 'PASS'
- elif ret == 0 and duration <= 1:
- self.logger.info("domino TEST SKIPPED")
- status = 'SKIP'
else:
self.logger.info("domino FAILED")
status = "FAIL"
# report status only if tests run (FAIL OR PASS)
- if status is not "SKIP":
- self.criteria = status
- self.start_time = start_time
- self.stop_time = stop_time
- self.details = {}
+ self.criteria = status
+ self.start_time = start_time
+ self.stop_time = stop_time
+ self.details = {}
def run(self):
kwargs = {}
return self.main(**kwargs)
-
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument("-r", "--report",
help="Create json result file",
action="store_true")
args = vars(parser.parse_args())
- domino = DominoTests()
+ domino = DominoCases()
try:
result = domino.main(**args)
if result != TestCasesBase.TestCasesBase.EX_OK:
diff --git a/functest/opnfv_tests/features/sdnvpn.py b/functest/opnfv_tests/features/sdnvpn.py
index 567b5fbc..1c07fe14 100644
--- a/functest/opnfv_tests/features/sdnvpn.py
+++ b/functest/opnfv_tests/features/sdnvpn.py
@@ -41,23 +41,18 @@ class SdnVpnTests(TestCasesBase.TestCasesBase):
output_file=log_file)
stop_time = time.time()
- duration = round(stop_time - start_time, 1)
- if ret == 0 and duration > 1:
+ if ret == 0:
self.logger.info("%s OK" % self.case_name)
status = 'PASS'
- elif ret == 0 and duration <= 1:
- self.logger.info("%s TEST SKIPPED" % self.case_name)
- status = 'SKIP'
else:
self.logger.info("%s FAILED" % self.case_name)
status = "FAIL"
# report status only if tests run (FAIL OR PASS)
- if status is not "SKIP":
- self.criteria = status
- self.start_time = start_time
- self.stop_time = stop_time
- self.details = {}
+ self.criteria = status
+ self.start_time = start_time
+ self.stop_time = stop_time
+ self.details = {}
def run(self):
kwargs = {}