Trees | Indices | Help |
|
---|
|
1 # This file is part of Buildbot. Buildbot is free software: you can 2 # redistribute it and/or modify it under the terms of the GNU General Public 3 # License as published by the Free Software Foundation, version 2. 4 # 5 # This program is distributed in the hope that it will be useful, but WITHOUT 6 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 # details. 9 # 10 # You should have received a copy of the GNU General Public License along with 11 # this program; if not, write to the Free Software Foundation, Inc., 51 12 # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 # 14 # Copyright Buildbot Team Members 15 16 17 import urllib 18 from buildbot.status.web.base import HtmlResource, path_to_builder, \ 19 path_to_build, css_classes 20 from buildbot.status.builder import Results 21 22 # /builders/$builder/builds/$buildnum/steps/$stepname24 pageTitle = "Test Result" 25 addSlash = True 26 3160 61 62 63 # /builders/$builder/builds/$buildnum/steps33 tr = self.test_result 34 b = self.status 35 36 cxt['b'] = self.status 37 logs = cxt['logs'] = [] 38 for lname, log in tr.getLogs().items(): 39 if isinstance(log, str): 40 log = log.decode('utf-8') 41 logs.append({'name': lname, 42 'log': log, 43 'link': req.childLink("logs/%s" % urllib.quote(lname)) }) 44 45 cxt['text'] = tr.text 46 cxt['result_word'] = Results[tr.getResults()] 47 cxt.update(dict(builder_link = path_to_builder(req, b.getBuilder()), 48 build_link = path_to_build(req, b), 49 result_css = css_classes[tr.getResults()], 50 b = b, 51 tr = tr)) 52 53 template = req.site.buildbot_service.templates.get_template("testresult.html") 54 return template.render(**cxt)5557 # if path == "logs": 58 # return LogsResource(self.step_status) #TODO we need another class 59 return HtmlResource.getChild(self, path, req)65 addSlash = True 66 nameDelim = '.' # Test result have names like a.b.c 67 71 758577 tpath = None 78 if path: 79 tpath = tuple(path.split(self.nameDelim)) 80 if tpath: 81 tr = self.build_status.getTestResults().get(tpath) 82 if tr: 83 return StatusResourceBuildTest(self.build_status, tr) 84 return HtmlResource.getChild(self, path, req)
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Wed Nov 21 16:22:56 2012 | http://epydoc.sourceforge.net |