summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/testsdk.bbclass6
-rw-r--r--meta/lib/oeqa/oetest.py13
2 files changed, 13 insertions, 6 deletions
diff --git a/meta/classes/testsdk.bbclass b/meta/classes/testsdk.bbclass
index 417510ce3d..453ce4056d 100644
--- a/meta/classes/testsdk.bbclass
+++ b/meta/classes/testsdk.bbclass
@@ -5,14 +5,14 @@
5TEST_LOG_DIR ?= "${WORKDIR}/testimage" 5TEST_LOG_DIR ?= "${WORKDIR}/testimage"
6TESTSDKLOCK = "${TMPDIR}/testsdk.lock" 6TESTSDKLOCK = "${TMPDIR}/testsdk.lock"
7 7
8def run_test_context(CTestContext, d, testdir, tcname, pn): 8def run_test_context(CTestContext, d, testdir, tcname, pn, *args):
9 import glob 9 import glob
10 import time 10 import time
11 11
12 targets = glob.glob(d.expand(testdir + "/tc/environment-setup-*")) 12 targets = glob.glob(d.expand(testdir + "/tc/environment-setup-*"))
13 for sdkenv in targets: 13 for sdkenv in targets:
14 bb.plain("Testing %s" % sdkenv) 14 bb.plain("Testing %s" % sdkenv)
15 tc = CTestContext(d, testdir, sdkenv) 15 tc = CTestContext(d, testdir, sdkenv, args)
16 16
17 # this is a dummy load of tests 17 # this is a dummy load of tests
18 # we are doing that to find compile errors in the tests themselves 18 # we are doing that to find compile errors in the tests themselves
@@ -112,7 +112,7 @@ def testsdkext_main(d):
112 112
113 try: 113 try:
114 bb.plain("Running SDK Compatibility tests ...") 114 bb.plain("Running SDK Compatibility tests ...")
115 run_test_context(SDKTestContext, d, testdir, tcname, pn) 115 run_test_context(SDKExtTestContext, d, testdir, tcname, pn, True)
116 finally: 116 finally:
117 pass 117 pass
118 118
diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py
index 80b40b6fa9..3e2ea0f874 100644
--- a/meta/lib/oeqa/oetest.py
+++ b/meta/lib/oeqa/oetest.py
@@ -376,7 +376,7 @@ class ImageTestContext(TestContext):
376 setattr(oeRuntimeTest, "pscmd", "ps -ef" if oeTest.hasPackage("procps") else "ps") 376 setattr(oeRuntimeTest, "pscmd", "ps -ef" if oeTest.hasPackage("procps") else "ps")
377 377
378class SDKTestContext(TestContext): 378class SDKTestContext(TestContext):
379 def __init__(self, d, sdktestdir, sdkenv): 379 def __init__(self, d, sdktestdir, sdkenv, *args):
380 super(SDKTestContext, self).__init__(d) 380 super(SDKTestContext, self).__init__(d)
381 381
382 self.sdktestdir = sdktestdir 382 self.sdktestdir = sdktestdir
@@ -409,9 +409,13 @@ class SDKTestContext(TestContext):
409 "auto").split() if t != "auto"] 409 "auto").split() if t != "auto"]
410 410
411class SDKExtTestContext(SDKTestContext): 411class SDKExtTestContext(SDKTestContext):
412 def __init__(self, d, sdktestdir, sdkenv): 412 def __init__(self, d, sdktestdir, sdkenv, *args):
413 self.target_manifest = d.getVar("SDK_EXT_TARGET_MANIFEST", True) 413 self.target_manifest = d.getVar("SDK_EXT_TARGET_MANIFEST", True)
414 self.host_manifest = d.getVar("SDK_EXT_HOST_MANIFEST", True) 414 self.host_manifest = d.getVar("SDK_EXT_HOST_MANIFEST", True)
415 if args:
416 self.cm = args[0] # Compatibility mode for run SDK tests
417 else:
418 self.cm = False
415 419
416 super(SDKExtTestContext, self).__init__(d, sdktestdir, sdkenv) 420 super(SDKExtTestContext, self).__init__(d, sdktestdir, sdkenv)
417 421
@@ -419,7 +423,10 @@ class SDKExtTestContext(SDKTestContext):
419 oeqa.sdkext.__file__)), "files") 423 oeqa.sdkext.__file__)), "files")
420 424
421 def _get_test_namespace(self): 425 def _get_test_namespace(self):
422 return "sdkext" 426 if self.cm:
427 return "sdk"
428 else:
429 return "sdkext"
423 430
424 def _get_test_suites(self): 431 def _get_test_suites(self):
425 return (self.d.getVar("TEST_SUITES_SDK_EXT", True) or "auto").split() 432 return (self.d.getVar("TEST_SUITES_SDK_EXT", True) or "auto").split()