diff options
author | Julien Stephan <jstephan@baylibre.com> | 2024-04-15 14:03:17 +0200 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2024-06-19 08:34:58 -0700 |
commit | a4cd5dc1eedeff7117d883732cc8fdfb83afabaf (patch) | |
tree | 3d9f32f812a4e5796d49d5a123fa97a114cfd861 /scripts/lib/devtool/standard.py | |
parent | c3235e3ae96d24d07624b13d697d9ad922059266 (diff) | |
download | poky-a4cd5dc1eedeff7117d883732cc8fdfb83afabaf.tar.gz |
oeqa: selftest: context: run tests serially if testtools/subunit modules are not found
If testtools and/or subunit modules are not found we get the following backtrace
(example for testtools):
NOTE: Starting bitbake server...
Traceback (most recent call last):
File "<..>/poky/scripts/oe-selftest", line 60, in
<module>
ret = main()
File "<..>/poky/scripts/oe-selftest", line 47, in main
results = args.func(logger, args)
File "<..>/poky/meta/lib/oeqa/selftest/context.py",
line 391, in run
rc = self._internal_run(logger, args)
File "<..>/poky/meta/lib/oeqa/selftest/context.py",
line 377, in _internal_run
rc = self.tc.runTests(**self.tc_kwargs['run'])
File "<..>/poky/meta/lib/oeqa/selftest/context.py",
line 161, in runTests
return super(OESelftestTestContext, self).runTests(processes, skips)
File "<..>/poky/meta/lib/oeqa/core/context.py", line
91, in runTests
result = self.runner.run(self.prepareSuite(self.suites, processes))
File "<..>/poky/meta/lib/oeqa/selftest/context.py",
line 154, in prepareSuite
from oeqa.core.utils.concurrencytest import ConcurrentTestSuite
File
"<..>/poky/meta/lib/oeqa/core/utils/concurrencytest.py",
line 22, in <module>
import testtools
ModuleNotFoundError: No module named 'testtools'
Fix this by adding a custom callback on -j/--num-processes parameter to
check testtools and subunit modules. Fallback to serial testing if
missing. This strategy is already used in sdk/context.py
(From OE-Core rev: ffd1db7d7813f6da22c0d9ef5fde6738058f1eb2)
Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
(cherry picked from commit 35284404473b2c2d9f69594582868ed66ef3525e)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'scripts/lib/devtool/standard.py')
0 files changed, 0 insertions, 0 deletions