From 9822834527c84e6e2d36b8b6d9aa81d0facd2a8a Mon Sep 17 00:00:00 2001 From: Luc Provoost Date: Wed, 16 Dec 2020 15:47:49 +0100 Subject: 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 --- VNFs/DPPD-PROX/helper-scripts/rapid/rapidxt.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'VNFs/DPPD-PROX/helper-scripts/rapid/rapidxt.py') diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapidxt.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapidxt.py index b472f367..2a82df5c 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapidxt.py +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapidxt.py @@ -36,6 +36,7 @@ class RapidXt(testcase.TestCase): for key in kwargs: test_params[key] = kwargs[key] os.makedirs(self.res_dir, exist_ok=True) + test_params['resultsdir'] = self.res_dir log_file = '{}/RUN{}.{}.log'.format(self.res_dir, test_params['environment_file'], test_params['test_file']) RapidLog.log_init(log_file, test_params['loglevel'], @@ -43,9 +44,9 @@ class RapidXt(testcase.TestCase): test_manager = RapidTestManager() self.start_time = time.time() self.result, self.details = test_manager.run_tests(test_params) - self.result = 100 * self.result - RapidLog.info('Test result is : {}'.format(self.result)) self.stop_time = time.time() + RapidLog.log_close() + except Exception: # pylint: disable=broad-except print("Unexpected error:", sys.exc_info()[0]) self.result = 0 -- cgit 1.2.3-korg