test_l3_longevity.py - update for making the index.html

lf_report.py - update method for index.html

Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
Chuck SmileyRekiere
2021-11-10 16:01:57 -07:00
parent d3023a5d2d
commit 980101dabc
2 changed files with 14 additions and 0 deletions

View File

@@ -76,6 +76,7 @@ class lf_report():
self.output_html=_output_html
self.path_date_time = _path_date_time
self.write_output_html = ""
self.write_output_index_html = ""
self.output_pdf=_output_pdf
self.write_output_pdf = ""
self.banner_html = ""
@@ -270,6 +271,18 @@ class lf_report():
print("write_html failed")
return self.write_output_html
def write_index_html(self):
self.write_output_index_html = str(self.path_date_time)+'/'+ str("index.html")
print("write_output_index_html: {}".format(self.write_output_index_html))
try:
test_file = open(self.write_output_index_html, "w")
test_file.write(self.html)
test_file.close()
except:
print("write_index_html failed")
return self.write_output_index_html
def write_html_with_timestamp(self):
self.write_output_html = "{}/{}-{}".format(self.path_date_time,self.date,self.output_html)
print("write_output_html: {}".format(self.write_output_html))