diff options
Diffstat (limited to 'meta/lib/oeqa/sdkext')
-rw-r--r-- | meta/lib/oeqa/sdkext/cases/devtool.py | 9 | ||||
-rw-r--r-- | meta/lib/oeqa/sdkext/context.py | 4 | ||||
-rw-r--r-- | meta/lib/oeqa/sdkext/testsdk.py | 10 |
3 files changed, 12 insertions, 11 deletions
diff --git a/meta/lib/oeqa/sdkext/cases/devtool.py b/meta/lib/oeqa/sdkext/cases/devtool.py index a5c6a76e02..d0746e68eb 100644 --- a/meta/lib/oeqa/sdkext/cases/devtool.py +++ b/meta/lib/oeqa/sdkext/cases/devtool.py | |||
@@ -69,10 +69,9 @@ class DevtoolTest(OESDKExtTestCase): | |||
69 | self._test_devtool_build(self.myapp_cmake_dst) | 69 | self._test_devtool_build(self.myapp_cmake_dst) |
70 | 70 | ||
71 | def test_extend_autotools_recipe_creation(self): | 71 | def test_extend_autotools_recipe_creation(self): |
72 | req = 'https://github.com/rdfa/librdfa' | 72 | recipe = "test-dbus-wait" |
73 | recipe = "librdfa" | 73 | self._run('devtool sdk-install dbus') |
74 | self._run('devtool sdk-install libxml2') | 74 | self._run('devtool add %s https://git.yoctoproject.org/git/dbus-wait' % (recipe) ) |
75 | self._run('devtool add %s %s' % (recipe, req) ) | ||
76 | try: | 75 | try: |
77 | self._run('devtool build %s' % recipe) | 76 | self._run('devtool build %s' % recipe) |
78 | finally: | 77 | finally: |
@@ -112,7 +111,7 @@ class SdkUpdateTest(OESDKExtTestCase): | |||
112 | cmd = 'oe-publish-sdk %s %s' % (tcname_new, self.publish_dir) | 111 | cmd = 'oe-publish-sdk %s %s' % (tcname_new, self.publish_dir) |
113 | subprocess.check_output(cmd, shell=True) | 112 | subprocess.check_output(cmd, shell=True) |
114 | 113 | ||
115 | self.http_service = HTTPService(self.publish_dir) | 114 | self.http_service = HTTPService(self.publish_dir, logger=self.logger) |
116 | self.http_service.start() | 115 | self.http_service.start() |
117 | 116 | ||
118 | self.http_url = "http://127.0.0.1:%d" % self.http_service.port | 117 | self.http_url = "http://127.0.0.1:%d" % self.http_service.port |
diff --git a/meta/lib/oeqa/sdkext/context.py b/meta/lib/oeqa/sdkext/context.py index 2ac2bf6ff7..2da57e2ccf 100644 --- a/meta/lib/oeqa/sdkext/context.py +++ b/meta/lib/oeqa/sdkext/context.py | |||
@@ -12,11 +12,11 @@ class OESDKExtTestContext(OESDKTestContext): | |||
12 | 12 | ||
13 | # FIXME - We really need to do better mapping of names here, this at | 13 | # FIXME - We really need to do better mapping of names here, this at |
14 | # least allows some tests to run | 14 | # least allows some tests to run |
15 | def hasHostPackage(self, pkg): | 15 | def hasHostPackage(self, pkg, regex=False): |
16 | # We force a toolchain to be installed into the eSDK even if its minimal | 16 | # We force a toolchain to be installed into the eSDK even if its minimal |
17 | if pkg.startswith("packagegroup-cross-canadian-"): | 17 | if pkg.startswith("packagegroup-cross-canadian-"): |
18 | return True | 18 | return True |
19 | return self._hasPackage(self.host_pkg_manifest, pkg) | 19 | return self._hasPackage(self.host_pkg_manifest, pkg, regex) |
20 | 20 | ||
21 | class OESDKExtTestContextExecutor(OESDKTestContextExecutor): | 21 | class OESDKExtTestContextExecutor(OESDKTestContextExecutor): |
22 | _context_class = OESDKExtTestContext | 22 | _context_class = OESDKExtTestContext |
diff --git a/meta/lib/oeqa/sdkext/testsdk.py b/meta/lib/oeqa/sdkext/testsdk.py index ffd185ec55..6dc23065a4 100644 --- a/meta/lib/oeqa/sdkext/testsdk.py +++ b/meta/lib/oeqa/sdkext/testsdk.py | |||
@@ -16,6 +16,7 @@ class TestSDKExt(TestSDKBase): | |||
16 | from bb.utils import export_proxies | 16 | from bb.utils import export_proxies |
17 | from oeqa.utils import avoid_paths_in_environ, make_logger_bitbake_compatible, subprocesstweak | 17 | from oeqa.utils import avoid_paths_in_environ, make_logger_bitbake_compatible, subprocesstweak |
18 | from oeqa.sdkext.context import OESDKExtTestContext, OESDKExtTestContextExecutor | 18 | from oeqa.sdkext.context import OESDKExtTestContext, OESDKExtTestContextExecutor |
19 | from oeqa.utils import get_json_result_dir | ||
19 | 20 | ||
20 | pn = d.getVar("PN") | 21 | pn = d.getVar("PN") |
21 | logger = make_logger_bitbake_compatible(logging.getLogger("BitBake")) | 22 | logger = make_logger_bitbake_compatible(logging.getLogger("BitBake")) |
@@ -67,10 +68,10 @@ class TestSDKExt(TestSDKBase): | |||
67 | # and we don't spend hours downloading kernels for the kernel module test | 68 | # and we don't spend hours downloading kernels for the kernel module test |
68 | # Abuse auto.conf since local.conf would be overwritten by the SDK | 69 | # Abuse auto.conf since local.conf would be overwritten by the SDK |
69 | with open(os.path.join(sdk_dir, 'conf', 'auto.conf'), 'a+') as f: | 70 | with open(os.path.join(sdk_dir, 'conf', 'auto.conf'), 'a+') as f: |
70 | f.write('SSTATE_MIRRORS += " \\n file://.* file://%s/PATH"\n' % test_data.get('SSTATE_DIR')) | 71 | f.write('SSTATE_MIRRORS += "file://.* file://%s/PATH"\n' % test_data.get('SSTATE_DIR')) |
71 | f.write('SOURCE_MIRROR_URL = "file://%s"\n' % test_data.get('DL_DIR')) | 72 | f.write('SOURCE_MIRROR_URL = "file://%s"\n' % test_data.get('DL_DIR')) |
72 | f.write('INHERIT += "own-mirrors"\n') | 73 | f.write('INHERIT += "own-mirrors"\n') |
73 | f.write('PREMIRRORS_prepend = " git://git.yoctoproject.org/.* git://%s/git2/git.yoctoproject.org.BASENAME \\n "\n' % test_data.get('DL_DIR')) | 74 | f.write('PREMIRRORS:prepend = "git://git.yoctoproject.org/.* git://%s/git2/git.yoctoproject.org.BASENAME "\n' % test_data.get('DL_DIR')) |
74 | 75 | ||
75 | # We need to do this in case we have a minimal SDK | 76 | # We need to do this in case we have a minimal SDK |
76 | subprocess.check_output(". %s > /dev/null; devtool sdk-install meta-extsdk-toolchain" % \ | 77 | subprocess.check_output(". %s > /dev/null; devtool sdk-install meta-extsdk-toolchain" % \ |
@@ -81,7 +82,8 @@ class TestSDKExt(TestSDKBase): | |||
81 | host_pkg_manifest=host_pkg_manifest) | 82 | host_pkg_manifest=host_pkg_manifest) |
82 | 83 | ||
83 | try: | 84 | try: |
84 | tc.loadTests(OESDKExtTestContextExecutor.default_cases) | 85 | modules = (d.getVar("TESTSDK_SUITES") or "").split() |
86 | tc.loadTests(OESDKExtTestContextExecutor.default_cases, modules) | ||
85 | except Exception as e: | 87 | except Exception as e: |
86 | import traceback | 88 | import traceback |
87 | bb.fatal("Loading tests failed:\n%s" % traceback.format_exc()) | 89 | bb.fatal("Loading tests failed:\n%s" % traceback.format_exc()) |
@@ -91,7 +93,7 @@ class TestSDKExt(TestSDKBase): | |||
91 | component = "%s %s" % (pn, OESDKExtTestContextExecutor.name) | 93 | component = "%s %s" % (pn, OESDKExtTestContextExecutor.name) |
92 | context_msg = "%s:%s" % (os.path.basename(tcname), os.path.basename(sdk_env)) | 94 | context_msg = "%s:%s" % (os.path.basename(tcname), os.path.basename(sdk_env)) |
93 | configuration = self.get_sdk_configuration(d, 'sdkext') | 95 | configuration = self.get_sdk_configuration(d, 'sdkext') |
94 | result.logDetails(self.get_sdk_json_result_dir(d), | 96 | result.logDetails(get_json_result_dir(d), |
95 | configuration, | 97 | configuration, |
96 | self.get_sdk_result_id(configuration)) | 98 | self.get_sdk_result_id(configuration)) |
97 | result.logSummary(component, context_msg) | 99 | result.logSummary(component, context_msg) |