Univention Bugzilla – Attachment 5765 Details for
Bug 34014
Invalid Jenkins-Format
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix JUnit output format
3xxxx_ucs-test-junit.diff (text/plain), 2.20 KB, created by
Philipp Hahn
on 2014-01-29 17:32 CET
(
hide
)
Description:
Fix JUnit output format
Filename:
MIME Type:
Creator:
Philipp Hahn
Created:
2014-01-29 17:32 CET
Size:
2.20 KB
patch
obsolete
>diff --git a/branches/ucs-3.2/ucs-3.2-0/test/ucs-test/univention/testing/format/junit.py b/branches/ucs-3.2/ucs-3.2-0/test/ucs-test/univention/testing/format/junit.py >index e132fa4..0861e79 100644 >--- a/branches/ucs-3.2/ucs-3.2-0/test/ucs-test/univention/testing/format/junit.py >+++ b/branches/ucs-3.2/ucs-3.2-0/test/ucs-test/univention/testing/format/junit.py >@@ -25,7 +25,7 @@ class Junit(TestFormatInterface): > def begin_test(self, case, prefix=''): > """Called before each test.""" > super(Junit, self).begin_test(case, prefix) >- self.now = datetime.today() >+ self.now = datetime.today().replace(microsecond=0) > > def end_test(self, result): > """Called after each test.""" >@@ -40,6 +40,7 @@ class Junit(TestFormatInterface): > errors = 1 > else: > errors = 1 >+ classname = encode(result.case.uid.replace("/", ".")) > > filename = os.path.join(self.outdir, '%s.xml' % (result.case.uid,)) > dirname = os.path.dirname(filename) >@@ -53,7 +54,7 @@ class Junit(TestFormatInterface): > xml = XMLGenerator(f_report, encoding='utf-8') > xml.startDocument() > xml.startElement('testsuite', { >- 'name': encode(result.case.description or result.case.uid), >+ 'name': classname, > 'tests': '%d' % (1,), > 'failures': '%d' % (failures,), > 'errors': '%d' % (errors,), >@@ -62,8 +63,6 @@ class Junit(TestFormatInterface): > 'skipped': '%d' % (skipped,), > 'timestamp': self.now.isoformat(), > 'hostname': os.uname()[1], >- 'id': result.case.uid, >- 'package': self.section, > }) > > xml.startElement('properties', {}) >@@ -87,13 +86,19 @@ class Junit(TestFormatInterface): > 'value': '%s' % (result.environment.ucs_version,), > }) > xml.endElement('property') >+ if result.case.description: >+ xml.startElement('property', { >+ 'name': 'description', >+ 'value': encode(result.case.description or result.case.uid), >+ }) >+ xml.endElement('property') > xml.endElement('properties') > > xml.startElement('testcase', { >- 'name': encode(result.case.description or result.case.uid), >+ 'name': 'test', > #'assertions': '%d' % (0,), > 'time': '%0.3f' % (result.duration / 1000.0,), >- 'classname': result.case.uid, >+ 'classname': classname, > #'status': '???', > }) >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 34014
: 5765