75 |
if hasattr(module, 'tearDown'): module.tearDown() |
if hasattr(module, 'tearDown'): module.tearDown() |
76 |
except: |
except: |
77 |
print "failed." |
print "failed." |
78 |
exceptions.append({ |
exceptions.append([name, { |
79 |
'exception': sys.exc_info(), |
'exception': sys.exc_info(), |
80 |
'test': test, |
'test': test, |
81 |
'testname': name, |
'testname': name, |
82 |
}) |
}]) |
83 |
else: |
else: |
84 |
print "ok." |
print "ok." |
85 |
|
|
171 |
except org.fenfire.test.gfx.GLNeeded, e: |
except org.fenfire.test.gfx.GLNeeded, e: |
172 |
print "Skipping, needs GL." |
print "Skipping, needs GL." |
173 |
|
|
174 |
for exc in exceptions: |
if exceptions: |
175 |
|
print "Java stack traces:" |
176 |
|
for name, exc in exceptions: |
177 |
|
print 75 * '-' |
178 |
|
print name |
179 |
|
#exc['exception'][1].printStackTrace() |
180 |
|
|
181 |
print 75 * '-' |
print 75 * '-' |
182 |
traceback.print_exception(*exc['exception']) |
print |
183 |
if isinstance(exc["exception"][1], java.lang.Throwable): |
|
184 |
exc["exception"][1].printStackTrace() |
print "Python stack traces:" |
185 |
|
for name, exc in exceptions: |
186 |
print 75 * '-' |
print 75 * '-' |
187 |
print |
print name |
188 |
print "%s test failures." % len(exceptions) |
traceback.print_exception(*exc['exception']) |
189 |
|
|
190 |
|
print 75 * '-' |
191 |
|
print |
192 |
|
|
193 |
|
print "%s test failures." % len(exceptions) |
194 |
|
|
195 |
java.lang.System.exit(exceptions != []) |
java.lang.System.exit(exceptions != []) |
196 |
|
|