From 305ca81ee9058cb3daa96706ba9cb9c071e3e41c Mon Sep 17 00:00:00 2001 From: Martin Klozik Date: Mon, 19 Oct 2015 17:38:52 +0100 Subject: bugfix of Vanilla OVS testing scenarios Automatic selection of OVS and DPDK directories must be performed before initialization of modules is called. Otherwise modules will use wrong values with unpredictable results. Default directory values have been changed to point to sources build by make. Clean&sweep of directory usage was performed. Configuration file for pylint has been renamed to follow pylint naming convention. Change-Id: I42c89f8890c021f0062b478a856ae0113f1245fb JIRA: VSPERF-121 Signed-off-by: Martin Klozik Reviewed-by: Maryam Tahhan Reviewed-by: Billy O Mahony Reviewed-by: Brian Castelli Reviewed-by: Gene Snider Reviewed-by: Al Morton Reviewed-by: Tv Rao --- vsperf | 40 ++++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 22 deletions(-) (limited to 'vsperf') diff --git a/vsperf b/vsperf index 7a442658..e220e246 100755 --- a/vsperf +++ b/vsperf @@ -286,6 +286,24 @@ def main(): # than both a settings file and environment variables settings.load_from_dict(args) + # set dpdk and ovs paths accorfing to VNF and VSWITCH + if settings.getValue('VSWITCH').endswith('Vanilla'): + # settings paths for Vanilla + settings.setValue('OVS_DIR', (settings.getValue('OVS_DIR_VANILLA'))) + elif settings.getValue('VSWITCH').endswith('Vhost'): + if settings.getValue('VNF').endswith('Cuse'): + # settings paths for Cuse + settings.setValue('RTE_SDK', (settings.getValue('RTE_SDK_CUSE'))) + settings.setValue('OVS_DIR', (settings.getValue('OVS_DIR_CUSE'))) + else: + # settings paths for VhostUser + settings.setValue('RTE_SDK', (settings.getValue('RTE_SDK_USER'))) + settings.setValue('OVS_DIR', (settings.getValue('OVS_DIR_USER'))) + else: + # default - set to VHOST USER but can be changed during enhancement + settings.setValue('RTE_SDK', (settings.getValue('RTE_SDK_USER'))) + settings.setValue('OVS_DIR', (settings.getValue('OVS_DIR_USER'))) + configure_logging(settings.getValue('VERBOSITY')) logger = logging.getLogger() @@ -388,28 +406,6 @@ def main(): logger.error("No tests matched --test option or positional args. Done.") sys.exit(1) - # set dpdk, ovs and qemu paths accorfing to VNF and VSWITCH - if settings.getValue('VSWITCH').endswith('Vanilla'): - # settings paths for Vanilla - settings.setValue('OVS_DIR', (settings.getValue('OVS_DIR_VANILLA'))) - settings.setValue('QEMU_DIR', (settings.getValue('QEMU_DIR_VANILLA'))) - elif settings.getValue('VSWITCH').endswith('Vhost'): - if settings.getValue('VNF').endswith('Cuse'): - # settings paths for Cuse - settings.setValue('RTE_SDK', (settings.getValue('RTE_SDK_CUSE'))) - settings.setValue('OVS_DIR', (settings.getValue('OVS_DIR_CUSE'))) - settings.setValue('QEMU_DIR', (settings.getValue('QEMU_DIR_CUSE'))) - else: - # settings paths for VhostUser - settings.setValue('RTE_SDK', (settings.getValue('RTE_SDK_USER'))) - settings.setValue('OVS_DIR', (settings.getValue('OVS_DIR_USER'))) - settings.setValue('QEMU_DIR', (settings.getValue('QEMU_DIR_USER'))) - else: - # default - set to VHOST USER but can be changed during enhancement - settings.setValue('RTE_SDK', (settings.getValue('RTE_SDK_USER'))) - settings.setValue('OVS_DIR', (settings.getValue('OVS_DIR_USER'))) - settings.setValue('QEMU_DIR', (settings.getValue('QEMU_DIR_USER'))) - # create results directory if not os.path.exists(results_path): logger.info("Creating result directory: " + results_path) -- cgit 1.2.3-korg