From 485ac777fd9cded7c145917bfcbe701276f3c855 Mon Sep 17 00:00:00 2001 From: "Sridhar K. N. Rao" Date: Thu, 5 Oct 2017 09:29:35 +0530 Subject: load_gen: Supporting loading of load_gen via loader. Currently all tools are loaded via loader utility, except load_gen. Load_gens were loaded directly through component_factory. This patch adds support to load load_gens through loader utility. The changes are as follows: 1. Configuration changes:The common.conf include configuration of directory. testcases.conf includes changes to load configuration, where tool is no more part of the load-configuration. The custom.conf has configuration of LOADGEN to be used - this configuration replaces the earlier 'tool' configuration parameter. 2. loader_utility_changes: In loader.py, loadgen_loader is defined, which is used in new get_loadgen function. 3. component_factory changes: in create_loadgen, similar to other tools, the function just retuns the object of loadgen_class. 4. Renaming of Dummy load_gen: Loader fails to load properly a dummy loadgen due to name-clash with dummy in pkt_gen. To avoid this name clash dummy is renamed to dummyloadgen. 5. testcase changes: create_loadgen is now called with output of loader's get_loadgen_class. 6. Fixed Pylint Errors and extra-space at the end. 7. Included CLI options support for --loadgen and --list-loadgens. Thanks to Martin K. 8. Added the missing loadgen parameter in testcases.conf. 9. Fixed the missing comma error. 10. Added CI change in build-vsperf.sh 11. Fixed configuration reading in stress/stress.py JIRA: VSPERF-533 Change-Id: I3fbb259618825a12fef55320a748a4f02509190b Signed-off-by: Sridhar K. N. Rao Signed-off-by: Martin Klozik --- testcases/testcase.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'testcases') diff --git a/testcases/testcase.py b/testcases/testcase.py index 01b3a975..3d9ffe4b 100644 --- a/testcases/testcase.py +++ b/testcases/testcase.py @@ -131,11 +131,6 @@ class TestCase(object): # check if test requires background load and which generator it uses self._load_cfg = cfg.get('Load', None) - if self._load_cfg and 'tool' in self._load_cfg: - self._loadgen = self._load_cfg['tool'] - else: - # background load is not requested, so use dummy implementation - self._loadgen = "Dummy" if self._frame_mod: self._frame_mod = self._frame_mod.lower() @@ -247,7 +242,7 @@ class TestCase(object): loader.get_collector_class(), self._results_dir, self.name) self._loadgen = component_factory.create_loadgen( - self._loadgen, + loader.get_loadgen_class(), self._load_cfg) self._output_file = os.path.join(self._results_dir, "result_" + self.name + -- cgit 1.2.3-korg