summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/testsdk.bbclass7
-rw-r--r--meta/lib/oeqa/sdk/context.py4
2 files changed, 10 insertions, 1 deletions
diff --git a/meta/classes/testsdk.bbclass b/meta/classes/testsdk.bbclass
index 2b5d66b193..5df17bfa9e 100644
--- a/meta/classes/testsdk.bbclass
+++ b/meta/classes/testsdk.bbclass
@@ -42,6 +42,8 @@ def testsdk_main(d):
42 host_pkg_manifest = OESDKTestContextExecutor._load_manifest( 42 host_pkg_manifest = OESDKTestContextExecutor._load_manifest(
43 d.expand("${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest")) 43 d.expand("${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest"))
44 44
45 processes = d.getVar("TESTIMAGE_NUMBER_THREADS") or d.getVar("BB_NUMBER_THREADS")
46
45 sdk_dir = d.expand("${WORKDIR}/testimage-sdk/") 47 sdk_dir = d.expand("${WORKDIR}/testimage-sdk/")
46 bb.utils.remove(sdk_dir, True) 48 bb.utils.remove(sdk_dir, True)
47 bb.utils.mkdirhier(sdk_dir) 49 bb.utils.mkdirhier(sdk_dir)
@@ -65,7 +67,10 @@ def testsdk_main(d):
65 import traceback 67 import traceback
66 bb.fatal("Loading tests failed:\n%s" % traceback.format_exc()) 68 bb.fatal("Loading tests failed:\n%s" % traceback.format_exc())
67 69
68 result = tc.runTests() 70 if processes:
71 result = tc.runTests(processes=int(processes))
72 else:
73 result = tc.runTests()
69 74
70 component = "%s %s" % (pn, OESDKTestContextExecutor.name) 75 component = "%s %s" % (pn, OESDKTestContextExecutor.name)
71 context_msg = "%s:%s" % (os.path.basename(tcname), os.path.basename(sdk_env)) 76 context_msg = "%s:%s" % (os.path.basename(tcname), os.path.basename(sdk_env))
diff --git a/meta/lib/oeqa/sdk/context.py b/meta/lib/oeqa/sdk/context.py
index 82e4c19bfc..7c091c0534 100644
--- a/meta/lib/oeqa/sdk/context.py
+++ b/meta/lib/oeqa/sdk/context.py
@@ -65,6 +65,9 @@ class OESDKTestContextExecutor(OETestContextExecutor):
65 sdk_rgroup.add_argument('--sdk-dir', required=False, action='store', 65 sdk_rgroup.add_argument('--sdk-dir', required=False, action='store',
66 help='sdk installed directory') 66 help='sdk installed directory')
67 67
68 self.parser.add_argument('-j', '--num-processes', dest='processes', action='store',
69 type=int, help="number of processes to execute in parallel with")
70
68 @staticmethod 71 @staticmethod
69 def _load_manifest(manifest): 72 def _load_manifest(manifest):
70 pkg_manifest = {} 73 pkg_manifest = {}
@@ -85,6 +88,7 @@ class OESDKTestContextExecutor(OETestContextExecutor):
85 OESDKTestContextExecutor._load_manifest(args.target_manifest) 88 OESDKTestContextExecutor._load_manifest(args.target_manifest)
86 self.tc_kwargs['init']['host_pkg_manifest'] = \ 89 self.tc_kwargs['init']['host_pkg_manifest'] = \
87 OESDKTestContextExecutor._load_manifest(args.host_manifest) 90 OESDKTestContextExecutor._load_manifest(args.host_manifest)
91 self.tc_kwargs['run']['processes'] = args.processes
88 92
89 @staticmethod 93 @staticmethod
90 def _get_sdk_environs(sdk_dir): 94 def _get_sdk_environs(sdk_dir):