Normalize line endings and whitespace
This commit is contained in:

committed by
Andrey Kamaev

parent
69020da607
commit
04384a71e4
14
modules/ts/misc/report.py
Normal file → Executable file
14
modules/ts/misc/report.py
Normal file → Executable file
@@ -10,13 +10,13 @@ if __name__ == "__main__":
|
||||
parser.add_option("-f", "--filter", dest="filter", help="regex to filter tests", metavar="REGEX", default=None)
|
||||
parser.add_option("", "--show-all", action="store_true", dest="showall", default=False, help="also include empty and \"notrun\" lines")
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
|
||||
if len(args) < 1:
|
||||
print >> sys.stderr, "Usage:\n", os.path.basename(sys.argv[0]), "<log_name1>.xml"
|
||||
exit(0)
|
||||
|
||||
options.generateHtml = detectHtmlOutputType(options.format)
|
||||
|
||||
|
||||
# expand wildcards and filter duplicates
|
||||
files = []
|
||||
files1 = []
|
||||
@@ -44,8 +44,8 @@ if __name__ == "__main__":
|
||||
|
||||
if options.filter:
|
||||
expr = re.compile(options.filter)
|
||||
tests = [t for t in tests if expr.search(str(t))]
|
||||
|
||||
tests = [t for t in tests if expr.search(str(t))]
|
||||
|
||||
tbl = table(", ".join(files))
|
||||
if options.columns:
|
||||
metrics = [s.strip() for s in options.columns.split(",")]
|
||||
@@ -56,14 +56,14 @@ if __name__ == "__main__":
|
||||
metrics = ["name", "samples", "outliers", "min", "median", "gmean", "mean", "stddev"]
|
||||
if "name" not in metrics:
|
||||
metrics.insert(0, "name")
|
||||
|
||||
|
||||
for m in metrics:
|
||||
if m == "name":
|
||||
tbl.newColumn(m, metrix_table[m][0])
|
||||
else:
|
||||
tbl.newColumn(m, metrix_table[m][0], align = "center")
|
||||
|
||||
needNewRow = True
|
||||
needNewRow = True
|
||||
for case in sorted(tests):
|
||||
if needNewRow:
|
||||
tbl.newRow()
|
||||
@@ -88,7 +88,7 @@ if __name__ == "__main__":
|
||||
tbl.newCell(m, val, val)
|
||||
if not needNewRow:
|
||||
tbl.trimLastRow()
|
||||
|
||||
|
||||
# output table
|
||||
if options.generateHtml:
|
||||
if options.format == "moinwiki":
|
||||
|
Reference in New Issue
Block a user