blob: 2ac2bf6ff730735fbc789b811a6ffdc8f62a651f [file] [log] [blame]
Brad Bishopc342db32019-05-15 21:57:59 -04001#
Brad Bishop6e60e8b2018-02-01 10:27:11 -05002# Copyright (C) 2016 Intel Corporation
Brad Bishopc342db32019-05-15 21:57:59 -04003#
4# SPDX-License-Identifier: MIT
5#
Brad Bishop6e60e8b2018-02-01 10:27:11 -05006
7import os
8from oeqa.sdk.context import OESDKTestContext, OESDKTestContextExecutor
9
10class 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
21class 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