##// END OF EJS Templates
run-tests: pass Test instances into TestRunner._executetests()...
Gregory Szorc -
r21437:d9532be2 default
parent child Browse files
Show More
@@ -1240,11 +1240,11 b' class TestRunner(object):'
1240 1240 print "running all tests"
1241 1241 tests = orig
1242 1242
1243 tests = [self._gettest(t, i, asunit=self.options.unittest)
1244 for i, t in enumerate(tests)]
1245
1243 1246 if self.options.unittest:
1244 suite = unittest.TestSuite()
1245 for count, testpath in enumerate(tests):
1246 suite.addTest(self._gettest(testpath, count, asunit=True))
1247
1247 suite = unittest.TestSuite(tests=tests)
1248 1248 verbosity = 1
1249 1249 if self.options.verbose:
1250 1250 verbosity = 2
@@ -1538,13 +1538,11 b' class TestRunner(object):'
1538 1538 jobs = self.options.jobs
1539 1539 done = queue.Queue()
1540 1540 running = 0
1541 count = 0
1542 1541
1543 def job(test, count):
1542 def job(test):
1544 1543 try:
1545 t = self._gettest(test, count)
1546 done.put(t.run())
1547 t.cleanup()
1544 done.put(test.run())
1545 test.cleanup()
1548 1546 except KeyboardInterrupt:
1549 1547 pass
1550 1548 except: # re-raises
@@ -1566,11 +1564,10 b' class TestRunner(object):'
1566 1564 test = tests.pop(0)
1567 1565 if self.options.loop:
1568 1566 tests.append(test)
1569 t = threading.Thread(target=job, name=test,
1570 args=(test, count))
1567 t = threading.Thread(target=job, name=test.name,
1568 args=[test])
1571 1569 t.start()
1572 1570 running += 1
1573 count += 1
1574 1571 except KeyboardInterrupt:
1575 1572 self.abort[0] = True
1576 1573
General Comments 0
You need to be logged in to leave comments. Login now