aboutsummaryrefslogtreecommitdiffstats
path: root/functest/core
diff options
context:
space:
mode:
authorJose Lausuch <jose.lausuch@ericsson.com>2017-02-22 01:52:31 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-02-22 01:52:31 +0000
commit46dc6015888db0218330000613abf2249b6829dc (patch)
treeb83cb849bdd40f0d18a6063fdcad7706b3ea5743 /functest/core
parentec22ca7704e42c7f002944de3a7c72e656eac024 (diff)
parente9334da17298cfeff4ccfb079bb3e3908e85c0e2 (diff)
Merge "Integrate BAROMETER feature test case"
Diffstat (limited to 'functest/core')
-rw-r--r--functest/core/feature_base.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/functest/core/feature_base.py b/functest/core/feature_base.py
index fe9a9998..2bd1ec83 100644
--- a/functest/core/feature_base.py
+++ b/functest/core/feature_base.py
@@ -7,6 +7,7 @@ from functest.utils.constants import CONST
class FeatureBase(base.TestcaseBase):
+
def __init__(self, project='functest', case='', repo='', cmd=''):
super(FeatureBase, self).__init__()
self.project_name = project
@@ -19,7 +20,7 @@ class FeatureBase(base.TestcaseBase):
def run(self, **kwargs):
self.prepare()
self.start_time = time.time()
- ret = ft_utils.execute_command(self.cmd, output_file=self.result_file)
+ ret = self.execute()
self.stop_time = time.time()
self.post()
self.parse_results(ret)
@@ -27,6 +28,13 @@ class FeatureBase(base.TestcaseBase):
self.logger.info("Test result is stored in '%s'" % self.result_file)
return base.TestcaseBase.EX_OK
+ def execute(self):
+ '''
+ Executer method that can be overwritten
+ By default it executes a shell command.
+ '''
+ return ft_utils.execute_command(self.cmd, output_file=self.result_file)
+
def prepare(self, **kwargs):
pass