/[fenfire]/fenfire/org/fenfire/test/test.py
ViewVC logotype

Diff of /fenfire/org/fenfire/test/test.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by tjl, Sun Apr 6 10:20:32 2003 UTC revision 1.8 by benja, Tue Apr 22 11:04:34 2003 UTC
# Line 75  def test(module): Line 75  def test(module):
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    
# Line 171  def startGraphicsAPI(dirs): Line 171  def startGraphicsAPI(dirs):
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    

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26