Code Review
/
csit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Report: 2n-clx graphs
[csit.git]
/
resources
/
tools
/
presentation
/
generator_tables.py
diff --git
a/resources/tools/presentation/generator_tables.py
b/resources/tools/presentation/generator_tables.py
index
6f075d1
..
ef2f3c5
100644
(file)
--- a/
resources/tools/presentation/generator_tables.py
+++ b/
resources/tools/presentation/generator_tables.py
@@
-264,7
+264,7
@@
def table_oper_data_html(table, input_data):
if not html_table:
continue
try:
if not html_table:
continue
try:
- file_name = f"{table[u'output-file']}
_
{suite[u'name']}.rst"
+ file_name = f"{table[u'output-file']}{suite[u'name']}.rst"
with open(f"{file_name}", u'w') as html_file:
logging.info(f" Writing file: {file_name}")
html_file.write(u".. raw:: html\n\n\t")
with open(f"{file_name}", u'w') as html_file:
logging.info(f" Writing file: {file_name}")
html_file.write(u".. raw:: html\n\n\t")
@@
-287,6
+287,7
@@
def table_merged_details(table, input_data):
"""
logging.info(f" Generating the table {table.get(u'title', u'')} ...")
"""
logging.info(f" Generating the table {table.get(u'title', u'')} ...")
+
# Transform the data
logging.info(
f" Creating the data set for the {table.get(u'type', u'')} "
# Transform the data
logging.info(
f" Creating the data set for the {table.get(u'type', u'')} "
@@
-341,9
+342,15
@@
def table_merged_details(table, input_data):
f"{u'-'.join(col_data_lst[half:])}"
col_data = f" |prein| {col_data} |preout| "
elif column[u"data"].split(u" ")[1] in (u"msg", ):
f"{u'-'.join(col_data_lst[half:])}"
col_data = f" |prein| {col_data} |preout| "
elif column[u"data"].split(u" ")[1] in (u"msg", ):
+ # Temporary solution: remove NDR results from message:
+ if bool(table.get(u'remove-ndr', False)):
+ try:
+ col_data = col_data.split(u" |br| ", 1)[1]
+ except IndexError:
+ pass
col_data = f" |prein| {col_data} |preout| "
elif column[u"data"].split(u" ")[1] in \
col_data = f" |prein| {col_data} |preout| "
elif column[u"data"].split(u" ")[1] in \
- (u"conf-history", u"show-run"):
+
(u"conf-history", u"show-run"):
col_data = col_data.replace(u" |br| ", u"", 1)
col_data = f" |prein| {col_data[:-5]} |preout| "
row_lst.append(f'"{col_data}"')
col_data = col_data.replace(u" |br| ", u"", 1)
col_data = f" |prein| {col_data[:-5]} |preout| "
row_lst.append(f'"{col_data}"')
@@
-354,7
+361,8
@@
def table_merged_details(table, input_data):
# Write the data to file
if table_lst:
# Write the data to file
if table_lst:
- file_name = f"{table[u'output-file']}_{suite_name}.csv"
+ separator = u"" if table[u'output-file'].endswith(u"/") else u"_"
+ file_name = f"{table[u'output-file']}{separator}{suite_name}.csv"
logging.info(f" Writing file: {file_name}")
with open(file_name, u"wt") as file_handler:
file_handler.write(u",".join(header) + u"\n")
logging.info(f" Writing file: {file_name}")
with open(file_name, u"wt") as file_handler:
file_handler.write(u",".join(header) + u"\n")
@@
-440,7
+448,6
@@
def _tpc_sort_table(table):
:rtype: list
"""
:rtype: list
"""
-
tbl_new = list()
tbl_see = list()
tbl_delta = list()
tbl_new = list()
tbl_see = list()
tbl_delta = list()
@@
-461,7
+468,8
@@
def _tpc_sort_table(table):
# Put the tables together:
table = list()
# Put the tables together:
table = list()
- table.extend(tbl_new)
+ # We do not want "New in CSIT":
+ # table.extend(tbl_new)
table.extend(tbl_see)
table.extend(tbl_delta)
table.extend(tbl_see)
table.extend(tbl_delta)