X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=resources%2Ftools%2Frobot_output_parser_publish.py;h=92038b59038d24e5f5cc072f7283b173b9e1594d;hb=0bc4ce082bf7ec59dd371ba81d040ebad7b090fd;hp=f9eab8ce08f974ff0f02f4cafa8d0359e913d219;hpb=33e58e512b91d57f0ccab05d6e57de11d7c9fd37;p=csit.git
diff --git a/resources/tools/robot_output_parser_publish.py b/resources/tools/robot_output_parser_publish.py
index f9eab8ce08..92038b5903 100755
--- a/resources/tools/robot_output_parser_publish.py
+++ b/resources/tools/robot_output_parser_publish.py
@@ -18,6 +18,7 @@ robot framework output file (output.xml) and print in specified format (wiki,
html) to stdout or, if specified by parameter, redirect to file."""
import argparse
+import re
import sys
from robot.api import ExecutionResult, ResultVisitor
@@ -40,14 +41,20 @@ class ExecutionChecker(ResultVisitor):
if self.start_suite(suite) is not False:
if suite.tests:
if self.formatting == 'html':
- sys.stdout.write('
'+'\n')
- sys.stdout.write('Name | '+\
- 'Documentation | '+\
- 'Message | '+\
- 'Status |
---|
'+'\n')
+ sys.stdout.write(''+'\n')
+ sys.stdout.write('Name | '+'\n')
+ sys.stdout.write('Documentation | '+'\n')
+ if "Perf" and "Long" in suite.longname:
+ sys.stdout.write('Message | '+'\n')
+ sys.stdout.write('Status |
'+'\n')
+ sys.stdout.write('')
elif self.formatting == 'wiki':
sys.stdout.write('{| class="wikitable"'+'\n')
- sys.stdout.write('!Name!!Documentation!!Message!!Status'+'\n')
+ if "Perf" and "Long" in suite.longname:
+ header = '!Name!!Documentation!!Message!!Status'
+ else:
+ header = '!Name!!Documentation!!Status'
+ sys.stdout.write(header+'\n')
else:
pass
@@ -78,9 +85,15 @@ class ExecutionChecker(ResultVisitor):
mark_l = ''
mark_r = ''
sys.stdout.write(mark_l+suite.name+mark_r+'\n')
+ sys.stdout.write(''+re.sub(r"(\*)(.*?)(\*)", r"\2",\
+ suite.doc, 0, flags=re.MULTILINE).replace(\
+ '[', '
[')+'
\n')
+
elif self.formatting == 'wiki':
mark = "=" * (level+2)
sys.stdout.write(mark+suite.name+mark+'\n')
+ sys.stdout.write(re.sub(r"(\*)(.*?)(\*)", r"\n*'''\2'''",\
+ suite.doc.replace('\n', ' '), 0, flags=re.MULTILINE)+'\n')
else:
pass
@@ -117,13 +130,15 @@ class ExecutionChecker(ResultVisitor):
sys.stdout.write(''+'\n')
sys.stdout.write(''+test.name+' | '+'\n')
sys.stdout.write(''+test.doc+' | '+'\n')
- sys.stdout.write(''+test.message+' | '+'\n')
+ if any("PERFTEST_LONG" in tag for tag in test.tags):
+ sys.stdout.write(''+test.message+' | '+'\n')
sys.stdout.write(''+test.status+' | '+'\n')
elif self.formatting == 'wiki':
sys.stdout.write('|-'+'\n')
sys.stdout.write('|'+test.name+'\n')
sys.stdout.write('|'+test.doc+'\n')
- sys.stdout.write('|'+test.message+'\n')
+ if any("PERFTEST_LONG" in tag for tag in test.tags):
+ sys.stdout.write('|'+test.message+'\n')
sys.stdout.write('|'+test.status+'\n')
else:
pass