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