[oe-commits] [openembedded-core] 02/33: oeqa/context: Only set buffer mode for non-concurrent tests
git at git.openembedded.org
git at git.openembedded.org
Thu Aug 23 06:51:26 UTC 2018
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master
in repository openembedded-core.
commit e2c66aa0f74d19fbc7e56af1fb440ad6473d3a8e
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Tue Aug 21 21:45:31 2018 +0000
oeqa/context: Only set buffer mode for non-concurrent tests
Periodically we'd see:
NOTE: core-image-sato-1.0-r0 do_testsdk: ======================================================================
NOTE: core-image-sato-1.0-r0 do_testsdk: ERROR: broken-runner
NOTE: core-image-sato-1.0-r0 do_testsdk: ----------------------------------------------------------------------
NOTE: core-image-sato-1.0-r0 do_testsdk: testtools.testresult.real._StringException: Traceback (most recent call last):
File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-mips/build/meta/lib/oeqa/core/utils/concurrencytest.py", line 122, in _run_test
test.run(process_result)
File "/usr/lib/python3.6/site-packages/subunit/__init__.py", line 1194, in run
protocol = TestProtocolServer(result, self._passthrough, self._forward)
File "/usr/lib/python3.6/site-packages/subunit/__init__.py", line 514, in __init__
stream = stream.buffer
AttributeError: '_io.StringIO' object has no attribute 'buffer'
which seems to occur if a result arrives before all the runner threads
have started. The runner's result handling changes sys.stdout to a buffer
temporarily which can be seen in other threads and it can sometimes fail.
Since the tests are running in a separate process we don't need this buffer
handling in the concurrent case so only set when not parallelising. The
concurrent class handle setting buffer mode internally.
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/lib/oeqa/core/context.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/meta/lib/oeqa/core/context.py b/meta/lib/oeqa/core/context.py
index f174c4b..821aec8 100644
--- a/meta/lib/oeqa/core/context.py
+++ b/meta/lib/oeqa/core/context.py
@@ -58,7 +58,7 @@ class OETestContext(object):
self.suites = self.loader.discover()
def runTests(self, processes=None, skips=[]):
- self.runner = self.runnerClass(self, descriptions=False, verbosity=2, buffer=True)
+ self.runner = self.runnerClass(self, descriptions=False, verbosity=2)
# Dinamically skip those tests specified though arguments
self.skipTests(skips)
@@ -70,6 +70,7 @@ class OETestContext(object):
concurrent_suite = ConcurrentTestSuite(self.suites, processes)
result = self.runner.run(concurrent_suite)
else:
+ self.runner.buffer = True
result = self.runner.run(self.suites)
self._run_end_time = time.time()
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list