/[storm]/storm/test.py
ViewVC logotype

Diff of /storm/test.py

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

revision 1.2 by benja, Thu Apr 17 08:36:34 2003 UTC revision 1.3 by benja, Mon Apr 21 21:07:40 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 166  def run(dirs): Line 166  def run(dirs):
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()  

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

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