##// END OF EJS Templates
run-tests: skip threading for a single test (issue5040)...
timeless -
r27880:b04df9ce default
parent child Browse files
Show More
@@ -1442,6 +1442,8 class TestSuite(unittest.TestSuite):
1442 1442 executes on its own thread. Tests actually spawn new processes, so
1443 1443 state mutation should not be an issue.
1444 1444
1445 If there is only one job, it will use the main thread.
1446
1445 1447 whitelist and blacklist denote tests that have been whitelisted and
1446 1448 blacklisted, respectively. These arguments don't belong in TestSuite.
1447 1449 Instead, whitelist and blacklist should be handled by the thing that
@@ -1558,10 +1560,6 class TestSuite(unittest.TestSuite):
1558 1560 statthread.start()
1559 1561
1560 1562 try:
1561 if len(tests) == 1:
1562 test = tests.pop(0)
1563 test.run(result)
1564 else:
1565 1563 while tests or running:
1566 1564 if not done.empty() or running == self._jobs or not tests:
1567 1565 try:
@@ -1581,6 +1579,9 class TestSuite(unittest.TestSuite):
1581 1579 self._loadtest(test.name, num_tests[0]))
1582 1580 else:
1583 1581 tests.append(test)
1582 if self._jobs == 1:
1583 job(test, result)
1584 else:
1584 1585 t = threading.Thread(target=job, name=test.name,
1585 1586 args=(test, result))
1586 1587 t.start()
General Comments 0
You need to be logged in to leave comments. Login now