summaryrefslogtreecommitdiffstats
path: root/testcases
diff options
context:
space:
mode:
authorMartin Klozik <martinx.klozik@intel.com>2017-03-17 09:32:53 +0000
committerMartin Klozik <martinx.klozik@intel.com>2017-03-20 14:57:28 +0000
commit00ae14186c5292c04766321d02fc7f82668ee066 (patch)
tree65b15fc50a83f5a71261b916efb38444104f0b89 /testcases
parent023b29d33f11292a18af7f81c593f9f1642b3818 (diff)
vpp: Reporting update related to VPP
VSPERF reports were updated to contain vSwitch name. In case of VPP, it is not possible to read its version if VPP is not running. Thus VSPERF was enhanced to support tool version check during its runtime. This mechanism can be enhanced to support e.g. VNF in the future. JIRA: VSPERF-496 Change-Id: I74b47505e35340eead165d9b588e9cc15c058bbf Signed-off-by: Martin Klozik <martinx.klozik@intel.com> Reviewed-by: Al Morton <acmorton@att.com> Reviewed-by: Christian Trautman <ctrautma@redhat.com> Reviewed-by: Sridhar Rao <sridhar.rao@spirent.com> Reviewed-by: Trevor Cooper <trevor.cooper@intel.com>
Diffstat (limited to 'testcases')
-rw-r--r--testcases/performance.py2
-rw-r--r--testcases/testcase.py37
2 files changed, 38 insertions, 1 deletions
diff --git a/testcases/performance.py b/testcases/performance.py
index 0be99724..a82b5d1c 100644
--- a/testcases/performance.py
+++ b/testcases/performance.py
@@ -34,4 +34,4 @@ class PerformanceTestCase(TestCase):
def run_report(self):
super(PerformanceTestCase, self).run_report()
if self._tc_results:
- report.generate(self._output_file, self._tc_results, self._collector.get_results(), self._type)
+ report.generate(self)
diff --git a/testcases/testcase.py b/testcases/testcase.py
index 4fbf9c04..5446d0d9 100644
--- a/testcases/testcase.py
+++ b/testcases/testcase.py
@@ -65,6 +65,7 @@ class TestCase(object):
self._settings_original = {}
self._settings_paths_modified = False
self._testcast_run_time = None
+ self._versions = []
# initialization of step driven specific members
self._step_check = False # by default don't check result for step driven testcases
self._step_vnf_list = {}
@@ -303,6 +304,8 @@ class TestCase(object):
if not self._vswitch_none:
self._add_flows()
+ self._versions += self._vswitch_ctl.get_vswitch().get_version()
+
with self._traffic_ctl:
# execute test based on TestSteps definition if needed...
if self.step_run():
@@ -358,6 +361,7 @@ class TestCase(object):
for item in results:
item[ResultsConstants.ID] = self.name
item[ResultsConstants.DEPLOYMENT] = self.deployment
+ item[ResultsConstants.VSWITCH] = S.getValue('VSWITCH')
item[ResultsConstants.TRAFFIC_TYPE] = self._traffic['l3']['proto']
item[ResultsConstants.TEST_RUN_TIME] = self._testcase_run_time
if self._traffic['multistream']:
@@ -774,3 +778,36 @@ class TestCase(object):
# all steps processed without any issue
return True
+
+ #
+ # get methods for TestCase members, which needs to be publicly available
+ #
+ def get_output_file(self):
+ """Return content of self._output_file member
+ """
+ return self._output_file
+
+ def get_desc(self):
+ """Return content of self.desc member
+ """
+ return self.desc
+
+ def get_versions(self):
+ """Return content of self.versions member
+ """
+ return self._versions
+
+ def get_traffic(self):
+ """Return content of self._traffic member
+ """
+ return self._traffic
+
+ def get_tc_results(self):
+ """Return content of self._tc_results member
+ """
+ return self._tc_results
+
+ def get_collector(self):
+ """Return content of self._collector member
+ """
+ return self._collector