summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/sdkext
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/sdkext')
-rw-r--r--meta/lib/oeqa/sdkext/case.py21
-rw-r--r--meta/lib/oeqa/sdkext/context.py21
2 files changed, 42 insertions, 0 deletions
diff --git a/meta/lib/oeqa/sdkext/case.py b/meta/lib/oeqa/sdkext/case.py
new file mode 100644
index 0000000000..6f708aa4ca
--- /dev/null
+++ b/meta/lib/oeqa/sdkext/case.py
@@ -0,0 +1,21 @@
1# Copyright (C) 2016 Intel Corporation
2# Released under the MIT license (see COPYING.MIT)
3
4import os
5import subprocess
6
7from oeqa.utils import avoid_paths_in_environ
8from oeqa.sdk.case import OESDKTestCase
9
10class OESDKExtTestCase(OESDKTestCase):
11 def _run(self, cmd):
12 # extensible sdk shows a warning if found bitbake in the path
13 # because can cause contamination, i.e. use devtool from
14 # poky/scripts instead of eSDK one.
15 env = os.environ.copy()
16 paths_to_avoid = ['bitbake/bin', 'poky/scripts']
17 env['PATH'] = avoid_paths_in_environ(paths_to_avoid)
18
19 return subprocess.check_output(". %s > /dev/null;"\
20 " %s;" % (self.tc.sdk_env, cmd), stderr=subprocess.STDOUT,
21 shell=True, env=env).decode("utf-8")
diff --git a/meta/lib/oeqa/sdkext/context.py b/meta/lib/oeqa/sdkext/context.py
new file mode 100644
index 0000000000..8dbcd807b4
--- /dev/null
+++ b/meta/lib/oeqa/sdkext/context.py
@@ -0,0 +1,21 @@
1# Copyright (C) 2016 Intel Corporation
2# Released under the MIT license (see COPYING.MIT)
3
4import os
5from oeqa.sdk.context import OESDKTestContext, OESDKTestContextExecutor
6
7class OESDKExtTestContext(OESDKTestContext):
8 esdk_files_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "files")
9
10class OESDKExtTestContextExecutor(OESDKTestContextExecutor):
11 _context_class = OESDKExtTestContext
12
13 name = 'esdk'
14 help = 'esdk test component'
15 description = 'executes esdk tests'
16
17 default_cases = [OESDKTestContextExecutor.default_cases[0],
18 os.path.join(os.path.abspath(os.path.dirname(__file__)), 'cases')]
19 default_test_data = None
20
21_executor_class = OESDKExtTestContextExecutor