| | |
| | | if len(issuesList)==0: |
| | | _status='FAIL' |
| | | else: |
| | | _status='KNOWN ISSUES (%s)' % ','.join(issuesList) |
| | | _status='KNOWN ISSUES %s' % str(issuesList) |
| | | </script> |
| | | <message level="'status'">'## Test Verdict: %s ##' % _status</message> |
| | | <call function="'testCase_EndBanner'" /> |
| | |
| | | self.log='%s/test.log' % TMPDIR |
| | | self.errors='%s/error.log' % TMPDIR |
| | | self.access='%s/access.log' % TMPDIR |
| | | open(self.log,'w').write('') |
| | | open(self.errors,'w').write('') |
| | | open(self.access,'w').write('') |
| | | for f in [self.log,self.errors,self.access]: |
| | | fh=open(f,'w') |
| | | fh.write('') |
| | | fh.close() |
| | | self.group=group |
| | | self.suite=suite |
| | | self.fullname=fullname |
| | |
| | | for issue in self.issues: |
| | | xml += ' <issue>%s</issue>%s' % (issue,newLine) |
| | | xml += ' </issues>%s' % newLine |
| | | xml += ' <log>\n<![CDATA[%s' % newLine |
| | | xml += open(self.log).read() |
| | | xml += ' ]]></log>%s' % newLine |
| | | xml += ' <error>\n<![CDATA[%s' % newLine |
| | | xml += open(self.errors).read() |
| | | xml += ' ]]></error>%s' % newLine |
| | | xml += ' <access>\n<![CDATA[%s' % newLine |
| | | xml += open(self.access).read() |
| | | xml += ' ]]></access>%s' % newLine |
| | | xml += ' <log>%s' % newLine |
| | | xml += ' <![CDATA[%s' % newLine |
| | | if self.result!='pass': |
| | | # TODO: wrap with try catch to get IOError without stopping the tests |
| | | fh=open(self.log) |
| | | xml += fh.read() |
| | | fh.close() |
| | | xml += ' ]]>%s' % newLine |
| | | xml += ' </log>%s' % newLine |
| | | xml += ' <error>%s' % newLine |
| | | xml += ' <![CDATA[%s' % newLine |
| | | if self.result!='pass': |
| | | # TODO: wrap with try catch to get IOError without stopping the tests |
| | | fh=open(self.errors) |
| | | xml += fh.read() |
| | | fh.close() |
| | | xml += ' ]]>%s' % newLine |
| | | xml += ' </error>%s' % newLine |
| | | xml += ' <access>%s' % newLine |
| | | xml += ' <![CDATA[%s' % newLine |
| | | if self.result!='pass': |
| | | # TODO: wrap with try catch to get IOError without stopping the tests |
| | | fh=open(self.access) |
| | | xml += fh.read() |
| | | fh.close() |
| | | xml += ' ]]>%s' % newLine |
| | | xml += ' </access>%s' % newLine |
| | | xml += ' </test>%s' % newLine |
| | | return xml |
| | | |