From 8b25bb3ac4e49c13b3759a8003df974fbc1649a6 Mon Sep 17 00:00:00 2001 From: Chuck SmileyRekiere Date: Sat, 21 Aug 2021 19:47:34 -0600 Subject: [PATCH] lf_qa.py : test-tag read from meta.txt for Test Suite and Suite Summary Signed-off-by: Chuck SmileyRekiere --- py-scripts/tools/lf_qa.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/py-scripts/tools/lf_qa.py b/py-scripts/tools/lf_qa.py index dd78c993..16d5cca2 100755 --- a/py-scripts/tools/lf_qa.py +++ b/py-scripts/tools/lf_qa.py @@ -102,6 +102,7 @@ class csv_sqlite_dash(): def get_test_id_test_tag(self,_kpi_path): test_tag = "NA" + use_meta_test_tag = False try: kpi_df = pd.read_csv(_kpi_path, sep='\t') test_id_list = list(kpi_df['test-id']) @@ -111,7 +112,16 @@ class csv_sqlite_dash(): test_tag = list(set(test_tag_list)) test_tag = test_tag[-1] # done to get element of list except: - print("exception reading csv _kpi_path {}".format(_kpi_path)) + print("exception reading csv _kpi_path {kpi_path}".format(kpi_path=_kpi_path)) + + #if test_tag still NA then try meta file + try: + if test_tag == "NA": + use_meta_test_tag, test_tag = self.get_test_tag_from_meta(_kpi_path) + except: + print("exception reading meta.txt _kpi_path: {kpi_path}".format(kpi_path=_kpi_path)) + if use_meta_test_tag: + print("test_tag from meta.txt _kpi_path: {kpi_path}".format(kpi_path=_kpi_path)) return test_id , test_tag # could enter on the command line, except there may be other exceptions @@ -183,8 +193,8 @@ class csv_sqlite_dash(): test_id, test_tag = self.get_test_id_test_tag(kpi_path) suite_html_results += """ - {}{}html / pdf - """.format(test_id,test_tag,html_path,pdf_path) + {test_id}{test_tag}html / pdf + """.format(test_id=test_id,test_tag=test_tag,html_path=html_path,pdf_path=pdf_path) suite_html_results += """