diff options
-rw-r--r-- | scripts/LocalDriver.py | 20 |
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. |