exit(0)
parser = OptionParser()
- parser.add_option("-o", "--output", dest="format", help="output results in text format (can be 'txt', 'html', 'markdown' or 'auto' - default)", metavar="FMT", default="auto")
+ parser.add_option("-o", "--output", dest="format", help="output results in text format (can be 'txt', 'html', 'markdown', 'tabs' or 'auto' - default)", metavar="FMT", default="auto")
parser.add_option("-m", "--metric", dest="metric", help="output metric", metavar="NAME", default="gmean")
parser.add_option("-u", "--units", dest="units", help="units for output values (s, ms (default), us, ns or ticks)", metavar="UNITS", default="ms")
parser.add_option("-f", "--filter", dest="filter", help="regex to filter tests", metavar="REGEX", default=None)
def __init__(self, caption = None, format=None):
self.format = format
self.is_markdown = self.format == 'markdown'
+ self.is_tabs = self.format == 'tabs'
self.columns = {}
self.rows = []
self.ridx = -1;
def consolePrintTable(self, out):
columns = self.layoutTable()
- colrizer = getColorizer(out) if not self.is_markdown else dummyColorizer(out)
+ colrizer = getColorizer(out) if not (self.is_markdown or self.is_tabs) else dummyColorizer(out)
if self.caption:
out.write("%s%s%s" % ( os.linesep, os.linesep.join(self.reformatTextValue(self.caption)), os.linesep * 2))
text = ' '.join(self.getValue('text', c) or [])
out.write(text + "|")
out.write(os.linesep)
+ elif self.is_tabs:
+ cols_to_join=[' '.join(self.getValue('text', c) or []) for c in row.cells]
+ out.write('\t'.join(cols_to_join))
+ out.write(os.linesep)
else:
for ln in range(row.minheight):
i = 0