diff options
author | Sridhar K. N. Rao <sridhar.rao@spirent.com> | 2021-07-19 17:56:44 +0530 |
---|---|---|
committer | Luc Provoost <luc.provoost@intel.com> | 2021-09-06 08:43:47 +0000 |
commit | 43cff53a4970d161e547c73a97bfbd33a1149d49 (patch) | |
tree | 29fd3b305c872d1b18987d5d07a8c473efe17696 /VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py | |
parent | 3fa810ce5efea1fc3b1902dabc6ddf39c9070814 (diff) |
Changes from ViNePerf
This patch adds changes to support using rapid to run tests only.
1. Fix format.yaml path. Add format.yaml as datafile in setup.cfg
2. Do not call generate lua if starting prox is not required.
3. Move logs to results directory - if present
4. Machines should not be used in del, if not created.
Fix syntax error.
Signed-off-by: Sridhar K. N. Rao <sridhar.rao@spirent.com>
Change-Id: I580716573d0be2a8da02035f4d180e81b63b3fc8
Diffstat (limited to 'VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py')
-rwxr-xr-x | VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py b/VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py index f3d489d6..e4055cc5 100755 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py @@ -43,6 +43,12 @@ class RapidTestManager(object): """ RapidTestManager Class """ + def __init__(self): + """ + Init Function + """ + self.machines = [] + def __del__(self): for machine in self.machines: machine.close_prox() @@ -57,7 +63,6 @@ class RapidTestManager(object): monitor_gen = monitor_sut = False background_machines = [] sut_machine = gen_machine = None - self.machines = [] configonly = test_params['configonly'] for machine_params in test_params['machines']: if 'gencores' in machine_params.keys(): @@ -168,7 +173,12 @@ def main(): test_params = RapidCli.process_cli(test_params) _, test_file_name = os.path.split(test_params['test_file']) _, environment_file_name = os.path.split(test_params['environment_file']) - log_file = 'RUN{}.{}.log'.format(environment_file_name, test_file_name) + if 'resultsdir' in test_params: + res_dir = test_params['resultsdir'] + log_file = '{}/RUN{}.{}.log'.format(res_dir,environment_file_name, + test_file_name) + else: + log_file = 'RUN{}.{}.log'.format(environment_file_name, test_file_name) RapidLog.log_init(log_file, test_params['loglevel'], test_params['screenloglevel'] , test_params['version'] ) test_manager = RapidTestManager() |