summaryrefslogtreecommitdiff
path: root/scripts/LocalDriver.py
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2017-05-04 11:54:48 +0200
committerBenoit Foucher <benoit@zeroc.com>2017-05-04 11:54:48 +0200
commitbe2f79ea91594ad960e58d019b75ff90bb70fe6a (patch)
tree9e2b50ec7d9521201cb27dfbe65864567e041aa1 /scripts/LocalDriver.py
parentFix (ICE-7860) - local class inherit local interface broken in Java (diff)
downloadice-be2f79ea91594ad960e58d019b75ff90bb70fe6a.tar.bz2
ice-be2f79ea91594ad960e58d019b75ff90bb70fe6a.tar.xz
ice-be2f79ea91594ad960e58d019b75ff90bb70fe6a.zip
Fixed allTests.py to support --workers even when cross testing
Diffstat (limited to 'scripts/LocalDriver.py')
-rw-r--r--scripts/LocalDriver.py20
1 files changed, 17 insertions, 3 deletions
diff --git a/scripts/LocalDriver.py b/scripts/LocalDriver.py
index 71f8d4a4791..c85a58e396d 100644
--- a/scripts/LocalDriver.py
+++ b/scripts/LocalDriver.py
@@ -25,8 +25,22 @@ class Executor:
self.continueOnFailure = continueOnFailure
self.lock = threading.Lock()
- def submit(self, testsuite):
- if testsuite.isMainThreadOnly() or self.workers == 0:
+ def submit(self, testsuite, crossMappings):
+ mainThreadOnly = testsuite.isMainThreadOnly() or self.workers == 0
+
+ #
+ # If the test supports workers and we are cross testing, ensure that all the cross
+ # testing mappings support workers as well.
+ #
+ if not mainThreadOnly:
+ for cross in crossMappings:
+ if cross:
+ t = cross.findTestSuite(testsuite)
+ if t and t.isMainThreadOnly():
+ mainThreadOnly = True
+ break
+
+ if mainThreadOnly:
self.mainThreadQueue.append(testsuite)
else:
self.queue.append(testsuite)
@@ -376,7 +390,7 @@ class LocalDriver(Driver):
continue
elif isinstance(self.runner, RemoteTestCaseRunner) and not testsuite.isMultiHost():
continue
- executor.submit(testsuite)
+ executor.submit(testsuite, Mapping.getAll() if self.allCross else [self.cross])
#
# Run all the tests and wait for the executor to complete.