mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-02 19:58:03 +00:00
lf_report.py , lf_snp_test.py : add name to results directory
Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
@@ -37,6 +37,7 @@ class lf_report():
|
|||||||
#_path the report directory under which the report directories will be created.
|
#_path the report directory under which the report directories will be created.
|
||||||
_path = "/home/lanforge/report-data",
|
_path = "/home/lanforge/report-data",
|
||||||
_alt_path = "",
|
_alt_path = "",
|
||||||
|
_results_dir_name = "LANforge_Test_Results",
|
||||||
_output_format = 'html', # pass in on the write functionality, current not used
|
_output_format = 'html', # pass in on the write functionality, current not used
|
||||||
_dataframe="",
|
_dataframe="",
|
||||||
_title="LANForge Test Run Heading",
|
_title="LANForge Test Run Heading",
|
||||||
@@ -87,7 +88,7 @@ class lf_report():
|
|||||||
self.current_path = os.path.dirname(os.path.abspath(__file__))
|
self.current_path = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
|
||||||
# pass in _date to allow to change after construction
|
# pass in _date to allow to change after construction
|
||||||
self.set_date_time_directory(_date)
|
self.set_date_time_directory(_date,_results_dir_name)
|
||||||
self.build_date_time_directory()
|
self.build_date_time_directory()
|
||||||
|
|
||||||
# move the banners and candela images to report path
|
# move the banners and candela images to report path
|
||||||
@@ -118,13 +119,14 @@ class lf_report():
|
|||||||
|
|
||||||
def set_path(self,_path):
|
def set_path(self,_path):
|
||||||
self.path = _path
|
self.path = _path
|
||||||
|
|
||||||
def set_date_time_directory(self,_date):
|
def set_date_time_directory(self,_date,_results_dir_name):
|
||||||
self.date = _date
|
self.date = _date
|
||||||
|
self.results_dir_name = _results_dir_name
|
||||||
if self.date != "":
|
if self.date != "":
|
||||||
self.date_time_directory = self.date
|
self.date_time_directory = str(self.date) + str("_") + str(self.results_dir_name)
|
||||||
else:
|
else:
|
||||||
self.date_time_directory = str(datetime.datetime.now().strftime("%Y-%m-%d-%H-h-%M-m-%S-s")).replace(':','-')
|
self.date_time_directory = str(datetime.datetime.now().strftime("%Y_%m_%d_%H_%M_%S_")).replace(':','-') + str(self.results_dir_name)
|
||||||
|
|
||||||
#def set_date_time_directory(self,date_time_directory):
|
#def set_date_time_directory(self,date_time_directory):
|
||||||
# self.date_time_directory = date_time_directory
|
# self.date_time_directory = date_time_directory
|
||||||
@@ -133,7 +135,6 @@ class lf_report():
|
|||||||
def build_date_time_directory(self):
|
def build_date_time_directory(self):
|
||||||
if self.date_time_directory == "":
|
if self.date_time_directory == "":
|
||||||
self.set_date_time_directory()
|
self.set_date_time_directory()
|
||||||
#try:
|
|
||||||
self.path_date_time = os.path.join(self.path, self.date_time_directory)
|
self.path_date_time = os.path.join(self.path, self.date_time_directory)
|
||||||
print("path_date_time {}".format(self.path_date_time))
|
print("path_date_time {}".format(self.path_date_time))
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -2432,6 +2432,17 @@ LANforge GUI what is displayed in the Column and how to access the value with cl
|
|||||||
else:
|
else:
|
||||||
ip_var_test.passes()
|
ip_var_test.passes()
|
||||||
logg.info("Full test passed, all connections increased rx rate")
|
logg.info("Full test passed, all connections increased rx rate")
|
||||||
|
##########################################
|
||||||
|
#
|
||||||
|
# Print out location of results
|
||||||
|
#
|
||||||
|
##########################################
|
||||||
|
if args.csv_outfile != None:
|
||||||
|
logg.info("Report CSV: {}".format(csv_outfile))
|
||||||
|
logg.info("Report CSV Results: {}".format(csv_results))
|
||||||
|
|
||||||
|
if args.log:
|
||||||
|
logg.info("output_log: {}".format(outfile_log))
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|||||||
Reference in New Issue
Block a user