diff options
| author | Aníbal Limón <limon.anibal@gmail.com> | 2016-01-30 21:23:33 -0600 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-02-10 16:06:23 +0000 |
| commit | 5580d7bd6250bd1494d72435738a9c9d70f5465c (patch) | |
| tree | 58ce7c160926e48950fa3f2906a564b7e79c9506 /meta/classes/testsdk.bbclass | |
| parent | 7181da7192d83a43294d80edd61a1dce5543bc71 (diff) | |
| download | poky-5580d7bd6250bd1494d72435738a9c9d70f5465c.tar.gz | |
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.
(From OE-Core rev: fb9db1698039ca51ae52ea623d2ca845753f8260)
Signed-off-by: Aníbal Limón <limon.anibal@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/testsdk.bbclass')
| -rw-r--r-- | meta/classes/testsdk.bbclass | 24 |
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" | |||
| 75 | TESTSDKEXTLOCK = "${TMPDIR}/testsdkext.lock" | 75 | TESTSDKEXTLOCK = "${TMPDIR}/testsdkext.lock" |
| 76 | 76 | ||
| 77 | def testsdkext_main(d): | 77 | def 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 | |||
| 105 | testsdkext_main[vardepsexclude] =+ "BB_ORIGENV" | 119 | testsdkext_main[vardepsexclude] =+ "BB_ORIGENV" |
| 106 | 120 | ||
| 107 | python do_testsdkext() { | 121 | python do_testsdkext() { |
