]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/sdk: Enable usage of OEQA thread mode
authorAníbal Limón <anibal.limon@linux.intel.com>
Fri, 26 May 2017 20:37:43 +0000 (15:37 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 30 May 2017 09:15:22 +0000 (10:15 +0100)
oeqa/sdk/context.py - Use OETestContextThreaded.
classes/testsdk.bbclass - Enable bb event thread mode to avoid
corrupt the PIPE when multiple threads writes.

[YOCTO #11450]

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/testsdk.bbclass
meta/lib/oeqa/sdk/context.py

index edea89cbf410686fd9d011215203f3fa07a3ca49..8a9e680328c63cbffe561957801bba30387c2696 100644 (file)
@@ -24,6 +24,8 @@ def testsdk_main(d):
     from oeqa.sdk.context import OESDKTestContext, OESDKTestContextExecutor
     from oeqa.utils import make_logger_bitbake_compatible
 
+    bb.event.enable_threadlock()
+
     pn = d.getVar("PN")
     logger = make_logger_bitbake_compatible(logging.getLogger("BitBake"))
 
@@ -97,6 +99,8 @@ def testsdkext_main(d):
     from oeqa.utils import avoid_paths_in_environ, make_logger_bitbake_compatible, subprocesstweak
     from oeqa.sdkext.context import OESDKExtTestContext, OESDKExtTestContextExecutor
 
+    bb.event.enable_threadlock()
+
     pn = d.getVar("PN")
     logger = make_logger_bitbake_compatible(logging.getLogger("BitBake"))
 
index 82e4c19bfc129a74e1a8b61ad9bfb039e58ece04..b3d7c75183736e6b2d3d8ed53989f017eb9f9bfd 100644 (file)
@@ -6,9 +6,10 @@ import sys
 import glob
 import re
 
-from oeqa.core.context import OETestContext, OETestContextExecutor
+from oeqa.core.context import OETestContextExecutor
+from oeqa.core.threaded import OETestContextThreaded
 
-class OESDKTestContext(OETestContext):
+class OESDKTestContext(OETestContextThreaded):
     sdk_files_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "files")
 
     def __init__(self, td=None, logger=None, sdk_dir=None, sdk_env=None,