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 |
|
|
166 |
print |
print |
167 |
#except org.fenfire.test.gfx.GLNeeded, e: |
#except org.fenfire.test.gfx.GLNeeded, e: |
168 |
# print "Skipping, needs GL." |
# print "Skipping, needs GL." |
169 |
|
|
170 |
for exc in exceptions: |
if exceptions: |
171 |
|
print "Java stack traces:" |
172 |
|
for name, exc in exceptions: |
173 |
|
print name |
174 |
print 75 * '-' |
print 75 * '-' |
175 |
traceback.print_exception(*exc['exception']) |
exc['exception'][1].printStackTrace() |
176 |
|
|
177 |
|
print 75 * '-' |
178 |
|
print |
179 |
|
|
180 |
|
print "Python stack traces:" |
181 |
|
for name, exc in exceptions: |
182 |
print 75 * '-' |
print 75 * '-' |
183 |
print |
print name |
184 |
print "%s test failures." % len(exceptions) |
traceback.print_exception(*exc['exception']) |
185 |
|
|
186 |
|
print 75 * '-' |
187 |
|
print |
188 |
|
|
189 |
|
print "%s test failures." % len(exceptions) |
190 |
|
|
191 |
java.lang.System.exit(exceptions != []) |
java.lang.System.exit(exceptions != []) |
192 |
|
|
193 |
|
|
194 |
if __name__ == '__main__': |
if __name__ == '__main__': |
195 |
main(sys.argv[1:]) |
main(sys.argv[1:]) |
|
sys.exit() |
|