Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 1 | # Copyright (C) 2016 Intel Corporation |
| 2 | # Released under the MIT license (see COPYING.MIT) |
| 3 | |
| 4 | import os |
| 5 | from oeqa.sdk.context import OESDKTestContext, OESDKTestContextExecutor |
| 6 | |
| 7 | class OESDKExtTestContext(OESDKTestContext): |
| 8 | esdk_files_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "files") |
| 9 | |
| 10 | # FIXME - We really need to do better mapping of names here, this at |
| 11 | # least allows some tests to run |
| 12 | def hasHostPackage(self, pkg): |
| 13 | # We force a toolchain to be installed into the eSDK even if its minimal |
| 14 | if pkg.startswith("packagegroup-cross-canadian-"): |
| 15 | return True |
| 16 | return self._hasPackage(self.host_pkg_manifest, pkg) |
| 17 | |
| 18 | class OESDKExtTestContextExecutor(OESDKTestContextExecutor): |
| 19 | _context_class = OESDKExtTestContext |
| 20 | |
| 21 | name = 'esdk' |
| 22 | help = 'esdk test component' |
| 23 | description = 'executes esdk tests' |
| 24 | |
| 25 | default_cases = OESDKTestContextExecutor.default_cases + \ |
| 26 | [os.path.join(os.path.abspath(os.path.dirname(__file__)), 'cases')] |
| 27 | default_test_data = None |
| 28 | |
| 29 | _executor_class = OESDKExtTestContextExecutor |