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