From dc12d38f04ef967c81a1f41878f1e579b92f9ee4 Mon Sep 17 00:00:00 2001 From: Ben Greear Date: Wed, 8 Apr 2020 09:07:50 -0700 Subject: [PATCH] tos: Create shell file to communicate directories and fnames. Easily parsed by shell script for automated testing. --- lf_tos_plus_test.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/lf_tos_plus_test.py b/lf_tos_plus_test.py index bcf66ce0..472df9fa 100755 --- a/lf_tos_plus_test.py +++ b/lf_tos_plus_test.py @@ -413,9 +413,9 @@ def main(): # Station is up, create connection # Create connections. # First, delete any old ones - cxn = "scr-tos+-%i"%count - ena = "scr-tos+-%i-A"%count - enb = "scr-tos+-%i-B"%count + cxn = "scr-tos-%i"%count + ena = "scr-tos-%i-A"%count + enb = "scr-tos-%i-B"%count cxnames.append(cxn) endpnames.append(ena) @@ -769,6 +769,7 @@ def main(): csv.close() print("CSV report data saved to: %s"%(csvfname)) + tstr = "" if sniffer_radios != "": now = time.time() if now < sniff_done_at: @@ -786,6 +787,16 @@ def main(): print("Sniffer will complete in %f seconds."%(waitfor)) + # Create a file easily sourced by a shell script to communicate the directory + # name and such. + fname = "TOS_PLUS.sh" + sh = open(fname, "w") + sh.write("CAPTURE_DIR=%s\n"%(tstr)) + sh.write("CSV_FILE=%s\n"%(csvfname)) + sh.write("XLSX_FILE=%s\n"%(outfile)) + + sh.close() + # ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- if __name__ == '__main__': main()