tests/run-tests.py
branchstable
changeset 1240 3ee0bfc336f7
parent 1239 02112fca2ff3
child 1241 bc56ed64a2c8
equal deleted inserted replaced
1239:02112fca2ff3 1240:3ee0bfc336f7
   834     return ret, output.splitlines(True)
   834     return ret, output.splitlines(True)
   835 
   835 
   836 def runone(options, test):
   836 def runone(options, test):
   837     '''returns a result element: (code, test, msg)'''
   837     '''returns a result element: (code, test, msg)'''
   838 
   838 
   839     global iolock
       
   840 
       
   841     def skip(msg):
   839     def skip(msg):
   842         if options.verbose:
   840         if options.verbose:
   843             log("\nSkipping %s: %s" % (testpath, msg))
   841             log("\nSkipping %s: %s" % (testpath, msg))
   844         return 's', test, msg
   842         return 's', test, msg
   845 
   843 
  1150 resultslock = threading.Lock()
  1148 resultslock = threading.Lock()
  1151 times = []
  1149 times = []
  1152 iolock = threading.Lock()
  1150 iolock = threading.Lock()
  1153 
  1151 
  1154 def runqueue(options, tests):
  1152 def runqueue(options, tests):
  1155     global results, resultslock
       
  1156 
       
  1157     for test in tests:
  1153     for test in tests:
  1158         code, test, msg = runone(options, test)
  1154         code, test, msg = runone(options, test)
  1159         resultslock.acquire()
  1155         resultslock.acquire()
  1160         results[code].append((test, msg))
  1156         results[code].append((test, msg))
  1161         resultslock.release()
  1157         resultslock.release()