summaryrefslogtreecommitdiffstats
path: root/testcases/testcase.py
diff options
context:
space:
mode:
authorMartin Klozik <martinx.klozik@intel.com>2017-06-07 16:41:18 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-06-07 16:41:18 +0000
commit80c9f96f5e60ee6a2a93494a0aae82014c2311b6 (patch)
treee91017d2dd69c8d6d8d6b09e0bb6c9a10975a3b8 /testcases/testcase.py
parentd10939601932809da1d5ae717323ac33a72a0d75 (diff)
parent102555d5887bcd21b0b9a9ca40f33736e396ab98 (diff)
Merge "ci: Fix VPP back2back TCs"
Diffstat (limited to 'testcases/testcase.py')
-rw-r--r--testcases/testcase.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/testcases/testcase.py b/testcases/testcase.py
index 75ed1a5c..3a86f77c 100644
--- a/testcases/testcase.py
+++ b/testcases/testcase.py
@@ -45,14 +45,18 @@ class TestCase(object):
In this basic form runs RFC2544 throughput test
"""
# pylint: disable=too-many-statements
- def __init__(self, cfg):
+ def __init__(self, test_cfg):
"""Pull out fields from test config
- :param cfg: A dictionary of string-value pairs describing the test
+ :param test_cfg: A dictionary of string-value pairs describing the test
configuration. Both the key and values strings use well-known
values.
:param results_dir: Where the csv formatted results are written.
"""
+ # make a local copy of test configuration to avoid modification of
+ # original content used in vsperf main script
+ cfg = copy.deepcopy(test_cfg)
+
self._testcase_start_time = time.time()
self._hugepages_mounted = False
self._traffic_ctl = None
@@ -336,7 +340,8 @@ class TestCase(object):
self.run_report()
# restore original settings
- S.load_from_dict(self._settings_original)
+ for key in self._settings_original:
+ S.setValue(key, self._settings_original[key])
def _update_settings(self, param, value):
""" Check value of given configuration parameter