1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-01 00:59:48 +00:00

oeqa: Add selftest parallelisation support

This allows oe-selftest to take a -j option which specifies how much test
parallelisation to use. Currently this is "module" based with each module
being split and run in a separate build directory. Further splitting could
be done but this seems a good compromise between test setup and parallelism.

You need python-testtools and python-subunit installed to use this but only
when the -j option is specified.

See notes posted to the openedmbedded-architecture list for more details
about the design choices here.

Some of this functionality may make more sense in the oeqa core ultimately.

(From OE-Core rev: 326ababfd620ae5ea29bf486b9d68ba3d60cad30)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2018-07-09 15:20:34 +00:00
parent 05c32d2de1
commit ebd97e728a
4 changed files with 288 additions and 8 deletions
+8 -2
View File
@@ -58,14 +58,20 @@ class OETestContext(object):
modules_required, filters)
self.suites = self.loader.discover()
def runTests(self, skips=[]):
def runTests(self, processes=None, skips=[]):
self.runner = self.runnerClass(self, descriptions=False, verbosity=2, buffer=True)
# Dinamically skip those tests specified though arguments
self.skipTests(skips)
self._run_start_time = time.time()
result = self.runner.run(self.suites)
if processes:
from oeqa.core.utils.concurrencytest import ConcurrentTestSuite
concurrent_suite = ConcurrentTestSuite(self.suites, processes)
result = self.runner.run(concurrent_suite)
else:
result = self.runner.run(self.suites)
self._run_end_time = time.time()
return result