Show More
@@ -1076,6 +1076,7 b' class TestRunner(object):' | |||||
1076 | '~': [], |
|
1076 | '~': [], | |
1077 | 's': [], |
|
1077 | 's': [], | |
1078 | 'i': [], |
|
1078 | 'i': [], | |
|
1079 | 'u': [], | |||
1079 | } |
|
1080 | } | |
1080 | self.abort = [False] |
|
1081 | self.abort = [False] | |
1081 | self._createdfiles = [] |
|
1082 | self._createdfiles = [] | |
@@ -1534,13 +1535,23 b' class TestRunner(object):' | |||||
1534 | os.mkdir(adir) |
|
1535 | os.mkdir(adir) | |
1535 | covrun('-i', '-a', '"--directory=%s"' % adir, '"--omit=%s"' % omit) |
|
1536 | covrun('-i', '-a', '"--directory=%s"' % adir, '"--omit=%s"' % omit) | |
1536 |
|
1537 | |||
1537 | def _executetests(self, tests): |
|
1538 | def _executetests(self, tests, result=None): | |
|
1539 | # We copy because we modify the list. | |||
|
1540 | tests = list(tests) | |||
|
1541 | ||||
1538 | jobs = self.options.jobs |
|
1542 | jobs = self.options.jobs | |
1539 | done = queue.Queue() |
|
1543 | done = queue.Queue() | |
1540 | running = 0 |
|
1544 | running = 0 | |
1541 |
|
1545 | |||
1542 | def job(test): |
|
1546 | def job(test, result): | |
1543 | try: |
|
1547 | try: | |
|
1548 | # If in unittest mode. | |||
|
1549 | if result: | |||
|
1550 | test(result) | |||
|
1551 | # We need to put something here to make the logic happy. | |||
|
1552 | # This will get cleaned up later. | |||
|
1553 | done.put(('u', None, None)) | |||
|
1554 | else: | |||
1544 | done.put(test.run()) |
|
1555 | done.put(test.run()) | |
1545 | test.cleanup() |
|
1556 | test.cleanup() | |
1546 | except KeyboardInterrupt: |
|
1557 | except KeyboardInterrupt: | |
@@ -1565,7 +1576,7 b' class TestRunner(object):' | |||||
1565 | if self.options.loop: |
|
1576 | if self.options.loop: | |
1566 | tests.append(test) |
|
1577 | tests.append(test) | |
1567 | t = threading.Thread(target=job, name=test.name, |
|
1578 | t = threading.Thread(target=job, name=test.name, | |
1568 |
args= |
|
1579 | args=(test, result)) | |
1569 | t.start() |
|
1580 | t.start() | |
1570 | running += 1 |
|
1581 | running += 1 | |
1571 | except KeyboardInterrupt: |
|
1582 | except KeyboardInterrupt: |
General Comments 0
You need to be logged in to leave comments.
Login now