summaryrefslogtreecommitdiffstats
path: root/testcases/testcase.py
diff options
context:
space:
mode:
authorMartin Klozik <martinx.klozik@intel.com>2016-11-21 13:59:09 +0000
committerMartin Klozik <martinx.klozik@intel.com>2016-11-21 14:07:40 +0000
commit221038f0517719d898b5f9f3173eabfe9aba560a (patch)
treebd0365c48599b089a01082a866f89841426a98f5 /testcases/testcase.py
parent1356d7c2bccabdd6239d1ae8628f869556ed2938 (diff)
ci: Decrease hugepages size for VERIFY&MERGE jobs
VSPERF by default requires allocation of hugepages with total size of 10GB. However for MERGE and VERIFY jobs less memory is required and default size of 10GB can cause issues. Thus amount of memory was limited and other minor enhancements were introduced: * sysstat system package is installed at nodes running VERIFY and MERGE jobs * WHITELIST_NICS was set to empty list by default to avoid automatic bind of NICs to DPDK. Old default value could cut off network connection to DUT. * imports were fixed at both integration.py and testcase.py JIRA: VSPERF-391 Change-Id: Ic07d68f4591ae697c1b8edeae6c0cffe47c065ce 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: Bill Michalowski <bmichalo@redhat.com> Reviewed-by: Antonio Fischetti <antonio.fischetti@intel.com>
Diffstat (limited to 'testcases/testcase.py')
-rw-r--r--testcases/testcase.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/testcases/testcase.py b/testcases/testcase.py
index 01a07391..18ad4240 100644
--- a/testcases/testcase.py
+++ b/testcases/testcase.py
@@ -32,6 +32,9 @@ from core.results.results_constants import ResultsConstants
from tools import tasks
from tools import hugepages
from tools import functions
+from tools import namespace
+from tools import veth
+from tools.teststepstools import TestStepsTools
from tools.pkt_gen.trafficgen.trafficgenhelper import TRAFFIC_DEFAULTS
CHECK_PREFIX = 'validate_'
@@ -176,7 +179,9 @@ class TestCase(object):
self._traffic['l2'] = S.getValue(self._tunnel_type.upper() + '_FRAME_L2')
self._traffic['l3'] = S.getValue(self._tunnel_type.upper() + '_FRAME_L3')
self._traffic['l4'] = S.getValue(self._tunnel_type.upper() + '_FRAME_L4')
- elif S.getValue('NICS')[0]['type'] == 'vf' or S.getValue('NICS')[1]['type'] == 'vf':
+ elif len(S.getValue('NICS')) and \
+ (S.getValue('NICS')[0]['type'] == 'vf' or
+ S.getValue('NICS')[1]['type'] == 'vf'):
mac1 = S.getValue('NICS')[0]['mac']
mac2 = S.getValue('NICS')[1]['mac']
if mac1 and mac2:
@@ -278,22 +283,20 @@ class TestCase(object):
# cleanup any namespaces created
if os.path.isdir('/tmp/namespaces'):
- import tools.namespace
namespace_list = os.listdir('/tmp/namespaces')
if len(namespace_list):
self._logger.info('Cleaning up namespaces')
for name in namespace_list:
- tools.namespace.delete_namespace(name)
+ namespace.delete_namespace(name)
os.rmdir('/tmp/namespaces')
# cleanup any veth ports created
if os.path.isdir('/tmp/veth'):
- import tools.veth
veth_list = os.listdir('/tmp/veth')
if len(veth_list):
self._logger.info('Cleaning up veth ports')
for eth in veth_list:
port1, port2 = eth.split('-')
- tools.veth.del_veth_port(port1, port2)
+ veth.del_veth_port(port1, port2)
os.rmdir('/tmp/veth')
def run_report(self):