From 2c87df6ec30477ea42478287c2b5b22cf22c7fc4 Mon Sep 17 00:00:00 2001 From: Chuck SmileyRekiere Date: Mon, 5 Jul 2021 08:59:31 -0600 Subject: [PATCH] test_l3_longevity.py : when running a test suite put the results with the other results from the test suite Signed-off-by: Chuck SmileyRekiere --- py-scripts/test_l3_longevity.py | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/py-scripts/test_l3_longevity.py b/py-scripts/test_l3_longevity.py index ceeaee76..b91ce872 100755 --- a/py-scripts/test_l3_longevity.py +++ b/py-scripts/test_l3_longevity.py @@ -1016,8 +1016,11 @@ python3 .\\test_l3_longevity.py --test_duration 4m --endp_type \"lf_tcp lf_udp m ''') - parser.add_argument('--tty', help='--tty \"/dev/ttyUSB2\" the serial interface to the AP') - parser.add_argument('--baud', help='--baud \"9600\" baud rate for the serial interface',default="9600") + parser.add_argument('--local_lf_report_dir', help='--local_lf_report_dir override the report path, primary use when running test in test suite',default="") + parser.add_argument('-o','--csv_outfile', help="--csv_outfile ", default="") + + parser.add_argument('--tty', help='--tty \"/dev/ttyUSB2\" the serial interface to the AP',default="") + parser.add_argument('--baud', help='--baud \"9600\" AP baud rate for the serial interface',default="9600") parser.add_argument('--amount_ports_to_reset', help='--amount_ports_to_reset \" \" ', default=None) parser.add_argument('--port_reset_seconds', help='--ports_reset_seconds \" \" ', default="10 30") @@ -1029,7 +1032,6 @@ python3 .\\test_l3_longevity.py --test_duration 4m --endp_type \"lf_tcp lf_udp m default='lf_udp', type=valid_endp_types) parser.add_argument('-u', '--upstream_port', help='--upstream_port example: --upstream_port eth1',default='eth1') parser.add_argument('--downstream_port', help='--downstream_port example: --downstream_port eth2') - parser.add_argument('-o','--csv_outfile', help="--csv_outfile ", default="") parser.add_argument('--polling_interval', help="--polling_interval ", default='60s') parser.add_argument('-r','--radio', action='append', nargs=1, help='--radio \ @@ -1045,9 +1047,6 @@ python3 .\\test_l3_longevity.py --test_duration 4m --endp_type \"lf_tcp lf_udp m parser.add_argument('--ap_test_mode', help='ap_test_mode flag present use ap canned data', action='store_true') - parser.add_argument('-tty', help='-tty serial interface to AP -tty \"/dev/ttyUSB2\"',default="") - parser.add_argument('-baud', help='-baud serial interface baud rate to AP -baud ',default='9600') - parser.add_argument('-amr','--side_a_min_bps', help='--side_a_min_bps, requested downstream min tx rate, comma separated list for multiple iterations. Default 256k', default="256000") parser.add_argument('-amp','--side_a_min_pdu', @@ -1075,6 +1074,11 @@ python3 .\\test_l3_longevity.py --test_duration 4m --endp_type \"lf_tcp lf_udp m #print("args: {}".format(args)) debug = args.debug + if args.local_lf_report_dir != "": + local_lf_report_dir = args.local_lf_report_dir + else: + local_lf_report_dir = "" + if args.ap_read: ap_read = args.ap_read else: @@ -1132,8 +1136,13 @@ python3 .\\test_l3_longevity.py --test_duration 4m --endp_type \"lf_tcp lf_udp m else: radios = None - # Create report, instanciate a reporting class - report = lf_report(_results_dir_name = "test_l3_longevity",_output_html="test_l3_longevity.html",_output_pdf="test_l3_longevity.pdf") + # Create report, when running with the test framework (lf_check.py) results need to be in the same directory + if local_lf_report_dir != "": + report = lf_report(_path=local_lf_report_dir, _results_dir_name = "test_l3_longevity",_output_html="test_l3_longevity.html",_output_pdf="test_l3_longevity.pdf") + else: + report = lf_report(_results_dir_name = "test_l3_longevity",_output_html="test_l3_longevity.html",_output_pdf="test_l3_longevity.pdf") + + if args.csv_outfile != None: current_time = time.strftime("%Y-%m-%d-%H-%M-%S", time.localtime())