summaryrefslogtreecommitdiff
path: root/meta/classes/testsdk.bbclass
diff options
context:
space:
mode:
authorAníbal Limón <limon.anibal@gmail.com>2016-01-30 21:23:33 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-10 15:51:03 +0000
commitfb9db1698039ca51ae52ea623d2ca845753f8260 (patch)
tree394eeabf6c255d547ccf176a7ffa5356fdc8338f /meta/classes/testsdk.bbclass
parent7defb10d10861501947b4a686510e957c72313e6 (diff)
downloadopenembedded-core-fb9db1698039ca51ae52ea623d2ca845753f8260.tar.gz
openembedded-core-fb9db1698039ca51ae52ea623d2ca845753f8260.tar.bz2
openembedded-core-fb9db1698039ca51ae52ea623d2ca845753f8260.zip
classes/testsdk: Add compatibility SDK testsuite to eSDK
Extensible SDK is compatible with SDK test suite so it need to execute the same tests over it. Signed-off-by: Aníbal Limón <limon.anibal@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/classes/testsdk.bbclass')
-rw-r--r--meta/classes/testsdk.bbclass24
1 files changed, 19 insertions, 5 deletions
diff --git a/meta/classes/testsdk.bbclass b/meta/classes/testsdk.bbclass
index 88057e5a2e..a0c50fe4a9 100644
--- a/meta/classes/testsdk.bbclass
+++ b/meta/classes/testsdk.bbclass
@@ -75,17 +75,25 @@ TEST_LOG_SDKEXT_DIR ?= "${WORKDIR}/testsdkext"
TESTSDKEXTLOCK = "${TMPDIR}/testsdkext.lock"
def testsdkext_main(d):
- import unittest
import os
- import glob
import oeqa.sdkext
- import time
import subprocess
- from oeqa.oetest import loadTests, runTests, get_test_suites, get_tests_list
+ from oeqa.oetest import SDKTestContext, SDKExtTestContext
from bb.utils import export_proxies
+ # extensible sdk use network
export_proxies(d)
+ # extensible sdk shows a warning if found bitbake in the path
+ # because can cause problems so clean it
+ new_path = ''
+ for p in os.environ['PATH'].split(':'):
+ if 'bitbake/bin' in p or 'poky/scripts' in p:
+ continue
+ new_path = new_path + p + ':'
+ new_path = new_path[:-1]
+ os.environ['PATH'] = new_path
+
pn = d.getVar("PN", True)
bb.utils.mkdirhier(d.getVar("TEST_LOG_SDKEXT_DIR", True))
@@ -98,10 +106,16 @@ def testsdkext_main(d):
bb.utils.remove(testdir, True)
bb.utils.mkdirhier(testdir)
try:
- subprocess.check_output("%s -y -d %s" % (tcname, testdir), shell=True)
+ subprocess.check_output("%s -y -d %s/tc" % (tcname, testdir), shell=True)
except subprocess.CalledProcessError as e:
bb.fatal("Couldn't install the SDK EXT:\n%s" % e.output)
+ try:
+ bb.plain("Running SDK Compatibility tests ...")
+ run_test_context(SDKTestContext, d, testdir, tcname, pn)
+ finally:
+ bb.utils.remove(testdir, True)
+
testsdkext_main[vardepsexclude] =+ "BB_ORIGENV"
python do_testsdkext() {