X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=VNFs%2FDPPD-PROX%2Fhelper-scripts%2Frapid%2Frunrapid.py;h=023b4bc3ba2747be5b8fe19777ded446cae3b6fd;hb=d092ffd38f9b5acafb740da11b5a2467ff972036;hp=1e6818e65443c4739f2eade2d523b91655469a43;hpb=4d932aced6931d756e07dbce6ab7cf04799ba5f4;p=samplevnf.git diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py b/VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py index 1e6818e6..023b4bc3 100755 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 ## ## Copyright (c) 2010-2020 Intel Corporation @@ -46,7 +46,6 @@ class RapidTestManager(object): @staticmethod def run_tests(test_params): - RapidLog.log_init(test_params) test_params = RapidConfigParser.parse_config(test_params) RapidLog.debug(test_params) monitor_gen = monitor_sut = False @@ -55,7 +54,10 @@ class RapidTestManager(object): machines = [] for machine_params in test_params['machines']: if 'gencores' in machine_params.keys(): - machine = RapidGeneratorMachine(test_params['key'], test_params['user'], test_params['vim_type'], test_params['rundir'], machine_params) + machine = RapidGeneratorMachine(test_params['key'], + test_params['user'], test_params['vim_type'], + test_params['rundir'], machine_params, + test_params['ipv6']) if machine_params['monitor']: if monitor_gen: RapidLog.exception("Can only monitor 1 generator") @@ -66,7 +68,9 @@ class RapidTestManager(object): else: background_machines.append(machine) else: - machine = RapidMachine(test_params['key'], test_params['user'], test_params['vim_type'], test_params['rundir'], machine_params) + machine = RapidMachine(test_params['key'], test_params['user'], + test_params['vim_type'], test_params['rundir'], + machine_params) if machine_params['monitor']: if monitor_sut: RapidLog.exception("Can only monitor 1 sut") @@ -82,26 +86,31 @@ class RapidTestManager(object): result = True for test_param in test_params['tests']: RapidLog.info(test_param['test']) - if test_param['test'] in ['flowsizetest', 'TST009test', 'fixed_rate']: + if test_param['test'] in ['flowsizetest', 'TST009test', + 'fixed_rate', 'increment_till_fail']: test = FlowSizeTest(test_param, test_params['lat_percentile'], - test_params['runtime'], test_params['pushgateway'], + test_params['runtime'], + test_params['TestName'], test_params['environment_file'], gen_machine, sut_machine, background_machines) elif test_param['test'] in ['corestats']: - test = CoreStatsTest(test_params['runtime'], - test_params['pushgateway'], + test = CoreStatsTest(test_param, test_params['runtime'], + test_params['TestName'], test_params['environment_file'], machines) elif test_param['test'] in ['portstats']: - test = PortStatsTest(test_params['runtime'], - test_params['pushgateway'], + test = PortStatsTest(test_param, test_params['runtime'], + test_params['TestName'], test_params['environment_file'], machines) elif test_param['test'] in ['impairtest']: test = ImpairTest(test_param, test_params['lat_percentile'], - test_params['runtime'], test_params['pushgateway'], + test_params['runtime'], + test_params['TestName'], test_params['environment_file'], gen_machine, sut_machine) elif test_param['test'] in ['irqtest']: - test = IrqTest(test_params['runtime'], machines) + test = IrqTest(test_param, test_params['runtime'], + test_params['TestName'], + test_params['environment_file'], machines) elif test_param['test'] in ['warmuptest']: test = WarmupTest(test_param, gen_machine) else: @@ -115,10 +124,14 @@ class RapidTestManager(object): def main(): """Main function. """ - test_params = RapidDefaults.test_params + test_params = RapidTestManager.get_defaults() # When no cli is used, the process_cli can be replaced by code modifying # test_params test_params = RapidCli.process_cli(test_params) + log_file = 'RUN{}.{}.log'.format(test_params['environment_file'], + test_params['test_file']) + RapidLog.log_init(log_file, test_params['loglevel'], + test_params['screenloglevel'] , test_params['version'] ) test_result = RapidTestManager.run_tests(test_params) RapidLog.info('Test result is : {}'.format(test_result))