summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes')
-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"
75TESTSDKEXTLOCK = "${TMPDIR}/testsdkext.lock" 75TESTSDKEXTLOCK = "${TMPDIR}/testsdkext.lock"
76 76
77def testsdkext_main(d): 77def testsdkext_main(d):
78 import unittest
79 import os 78 import os
80 import glob
81 import oeqa.sdkext 79 import oeqa.sdkext
82 import time
83 import subprocess 80 import subprocess
84 from oeqa.oetest import loadTests, runTests, get_test_suites, get_tests_list 81 from oeqa.oetest import SDKTestContext, SDKExtTestContext
85 from bb.utils import export_proxies 82 from bb.utils import export_proxies
86 83
84 # extensible sdk use network
87 export_proxies(d) 85 export_proxies(d)
88 86
87 # extensible sdk shows a warning if found bitbake in the path
88 # because can cause problems so clean it
89 new_path = ''
90 for p in os.environ['PATH'].split(':'):
91 if 'bitbake/bin' in p or 'poky/scripts' in p:
92 continue
93 new_path = new_path + p + ':'
94 new_path = new_path[:-1]
95 os.environ['PATH'] = new_path
96
89 pn = d.getVar("PN", True) 97 pn = d.getVar("PN", True)
90 bb.utils.mkdirhier(d.getVar("TEST_LOG_SDKEXT_DIR", True)) 98 bb.utils.mkdirhier(d.getVar("TEST_LOG_SDKEXT_DIR", True))
91 99
@@ -98,10 +106,16 @@ def testsdkext_main(d):
98 bb.utils.remove(testdir, True) 106 bb.utils.remove(testdir, True)
99 bb.utils.mkdirhier(testdir) 107 bb.utils.mkdirhier(testdir)
100 try: 108 try:
101 subprocess.check_output("%s -y -d %s" % (tcname, testdir), shell=True) 109 subprocess.check_output("%s -y -d %s/tc" % (tcname, testdir), shell=True)
102 except subprocess.CalledProcessError as e: 110 except subprocess.CalledProcessError as e:
103 bb.fatal("Couldn't install the SDK EXT:\n%s" % e.output) 111 bb.fatal("Couldn't install the SDK EXT:\n%s" % e.output)
104 112
113 try:
114 bb.plain("Running SDK Compatibility tests ...")
115 run_test_context(SDKTestContext, d, testdir, tcname, pn)
116 finally:
117 bb.utils.remove(testdir, True)
118
105testsdkext_main[vardepsexclude] =+ "BB_ORIGENV" 119testsdkext_main[vardepsexclude] =+ "BB_ORIGENV"
106 120
107python do_testsdkext() { 121python do_testsdkext() {