Commit d0fcbf42 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

attach the detail of failed tests only.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14162 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c0af2c93
...@@ -92,9 +92,11 @@ def sendResult(): ...@@ -92,9 +92,11 @@ def sendResult():
file_content = urllib2.urlopen(result_uri).read() file_content = urllib2.urlopen(result_uri).read()
passes_re = re.compile('<th[^>]*>Tests passed</th>\n\s*<td[^>]*>([^<]*)') passes_re = re.compile('<th[^>]*>Tests passed</th>\n\s*<td[^>]*>([^<]*)')
failures_re = re.compile('<th[^>]*>Tests failed</th>\n\s*<td[^>]*>([^<]*)') failures_re = re.compile('<th[^>]*>Tests failed</th>\n\s*<td[^>]*>([^<]*)')
check_re = re.compile('<img[^>]*?/check.gif"\s*[^>]*?>', re.M) check_re = re.compile('<img[^>]*?/check.gif"\s*[^>]*?>')
error_re = re.compile('<img[^>]*?/error.gif"\s*[^>]*?>', re.M) error_re = re.compile('<img[^>]*?/error.gif"\s*[^>]*?>')
error_title_re = re.compile('error.gif.*?>([^>]*?)</td></tr>', re.S) error_title_re = re.compile('error.gif.*?>([^>]*?)</td></tr>', re.S)
pass_test_re = re.compile('<div style="padding-top: 10px;">\s*<p>\s*<img[^>]*?/check.gif".*?</div>\s.*?</div>\s*', re.S)
footer_re = re.compile('<h2> Remote Client Data </h2>.*</table>', re.S)
passes = passes_re.search(file_content).group(1) passes = passes_re.search(file_content).group(1)
failures = failures_re.search(file_content).group(1) failures = failures_re.search(file_content).group(1)
...@@ -112,6 +114,8 @@ Tests failed: %4s ...@@ -112,6 +114,8 @@ Tests failed: %4s
Following tests failed: Following tests failed:
%s""" % (passes, failures, "\n".join(error_titles)) %s""" % (passes, failures, "\n".join(error_titles))
file_content = pass_test_re.sub('', file_content)
file_content = footer_re.sub('', file_content)
file_content = check_re.sub('<span style="color: green">PASS</span>', file_content) file_content = check_re.sub('<span style="color: green">PASS</span>', file_content)
file_content = error_re.sub('<span style="color: red">FAIL</span>', file_content) file_content = error_re.sub('<span style="color: red">FAIL</span>', file_content)
status = (not failures) status = (not failures)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment