[svn-commits] pabelanger: testsuite/asterisk/trunk r866 - /asterisk/trunk/runtests.py
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Thu Nov 18 21:58:04 CST 2010
Author: pabelanger
Date: Thu Nov 18 21:58:00 2010
New Revision: 866
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=866
Log:
Format (JUnit) xml to include 'failures'
This _should_ cause Bamboo to properly record
unit test failures.
Modified:
asterisk/trunk/runtests.py
Modified: asterisk/trunk/runtests.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/runtests.py?view=diff&rev=866&r1=865&r2=866
==============================================================================
--- asterisk/trunk/runtests.py (original)
+++ asterisk/trunk/runtests.py Thu Nov 18 21:58:00 2010
@@ -246,6 +246,7 @@
f.close()
self.total_time = 0.0
+ self.total_failures = 0
self.tests = [
TestConfig(t["test"], ast_version) for t in self.config["tests"]
@@ -306,6 +307,8 @@
t.run()
self.total_time += t.time
+ if t.passed is False:
+ self.total_failures += 1
def write_results_xml(self, fn, stdout=False):
try:
@@ -318,9 +321,9 @@
return
f.write('<?xml version="1.0" encoding="UTF-8"?>\n')
- f.write('<testsuite errors="0" time="%.2f" tests="%d" '
+ f.write('<testsuite errors="0" failures="%d" time="%.2f" tests="%d" '
'name="AsteriskTestSuite">\n' %
- (self.total_time, len(self.tests)))
+ (self.total_failures, self.total_time, len(self.tests)))
for t in self.tests:
if t.did_run is False:
continue
More information about the svn-commits
mailing list