From 99736ceaaafc6b5e15351b1af9a948d960cfd2f3 Mon Sep 17 00:00:00 2001 From: Chuck SmileyRekiere Date: Tue, 29 Jun 2021 06:03:50 -0600 Subject: [PATCH] lf_check.py : added the ability to use the lf_report path name to be passed in a report Signed-off-by: Chuck SmileyRekiere --- py-scripts/tools/lf_check.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/py-scripts/tools/lf_check.py b/py-scripts/tools/lf_check.py index 8fd1c884..03fe47ad 100755 --- a/py-scripts/tools/lf_check.py +++ b/py-scripts/tools/lf_check.py @@ -80,12 +80,14 @@ class lf_check(): _test_suite, _production, _csv_results, - _outfile): + _outfile, + _report_path): self.use_json = _use_json self.json_data = _json_data self.config_ini = _config_ini self.test_suite = _test_suite self.production_run = _production + self.report_path = _report_path self.lf_mgr_ip = "" self.lf_mgr_port = "" self.radio_dict = {} @@ -552,6 +554,11 @@ NOTE: for now to see stdout and stderr remove /home/lanforge from path. if 'UPSTREAM_PORT' in self.test_dict[test]['args']: self.test_dict[test]['args'] = self.test_dict[test]['args'].replace('UPSTREAM_PORT',self.col_names) + # lf_dataplane_test.py and lf_wifi_capacity_test.py use a parameter --local_path for the location + # of the reports when the reports are pulled. + if 'REPORT_PATH' in self.test_dict[test]['args']: + self.test_dict[test]['args'] = self.test_dict[test]['args'].replace('REPORT_PATH',self.report_path) + if 'load_db' in self.test_dict[test]: self.logger.info("load_db : {}".format(self.test_dict[test]['load_db'])) if str(self.test_dict[test]['load_db']).lower() != "none" and str(self.test_dict[test]['load_db']).lower() != "skip": @@ -729,6 +736,7 @@ Example : csv_results = report.file_add_path(csv_results) outfile = "lf_check-{}-{}".format(args.outfile,current_time) outfile_path = report.file_add_path(outfile) + report_path = report.get_report_path() # lf_check() class created check = lf_check(_use_json = use_json, @@ -737,7 +745,8 @@ Example : _test_suite = test_suite, _production = production, _csv_results = csv_results, - _outfile = outfile_path) + _outfile = outfile_path, + _report_path = report_path) # get git sha process = subprocess.Popen(["git", "rev-parse", "HEAD"], stdout=subprocess.PIPE)