diff options
author | Luc Provoost <luc.provoost@intel.com> | 2020-12-16 15:47:49 +0100 |
---|---|---|
committer | Luc Provoost <luc.provoost@intel.com> | 2020-12-28 12:11:29 +0100 |
commit | 9822834527c84e6e2d36b8b6d9aa81d0facd2a8a (patch) | |
tree | 2562c9be8fd2d78d7f8eb3530e4df5802478479e /VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py | |
parent | 63eeeaf4c2b27db28a0c4fb0c5806978b0a5796d (diff) |
Improved PROX cleanup when exiting
Sending now a 'quit' command to PROX, so that the thread running PROX in
an ssh session is now cleaned up correctly.
Also fixed a problem with the logging when running the code more than
once. We only create handlers now, when they do not yet exist.
Updated the rapid version.
Also added some more tests in the testcases.yaml for xtesting.
At the end of a run, the PROX.log files are copied in the results
directory.
The success criterium for a test 'pass_threshold' has been removed from
the test files and is to be controlled by the xtesting testcases.yaml
file.
Change-Id: Ifbbb1c91f32c9176f52025d9ae4c495b432a94c9
Signed-off-by: Luc Provoost <luc.provoost@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py')
-rwxr-xr-x | VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py b/VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py index 44f33c06..3bdb91d1 100755 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/runrapid.py @@ -62,8 +62,8 @@ class RapidTestManager(object): if 'gencores' in machine_params.keys(): machine = RapidGeneratorMachine(test_params['key'], test_params['user'], test_params['vim_type'], - test_params['rundir'], machine_params, - configonly, test_params['ipv6']) + test_params['rundir'], test_params['resultsdir'], + machine_params, configonly, test_params['ipv6']) if machine_params['monitor']: if monitor_gen: RapidLog.exception("Can only monitor 1 generator") @@ -76,7 +76,7 @@ class RapidTestManager(object): else: machine = RapidMachine(test_params['key'], test_params['user'], test_params['vim_type'], test_params['rundir'], - machine_params, configonly) + test_params['resultsdir'], machine_params, configonly) if machine_params['monitor']: if monitor_sut: RapidLog.exception("Can only monitor 1 sut") @@ -94,7 +94,7 @@ class RapidTestManager(object): with concurrent.futures.ThreadPoolExecutor(max_workers=len(self.machines)) as executor: future_to_connect_prox = {executor.submit(machine.connect_prox): machine for machine in self.machines} concurrent.futures.wait(future_to_connect_prox,return_when=ALL_COMPLETED) - result = True + result = 0 for test_param in test_params['tests']: RapidLog.info(test_param['test']) if test_param['test'] in ['flowsizetest', 'TST009test', @@ -128,8 +128,10 @@ class RapidTestManager(object): RapidLog.debug('Test name ({}) is not valid:'.format( test_param['test'])) single_test_result, result_details = test.run() - if not single_test_result: - result = False + result = result + single_test_result + for machine in self.machines: + machine.close_prox() + concurrent.futures.wait(self.future_to_prox,return_when=ALL_COMPLETED) return (result, result_details) def main(): @@ -145,7 +147,7 @@ def main(): test_params['screenloglevel'] , test_params['version'] ) test_manager = RapidTestManager() test_result, _ = test_manager.run_tests(test_params) - RapidLog.info('Test result is : {}'.format(test_result)) + RapidLog.log_close() if __name__ == "__main__": main() |