diff options
author | Aníbal Limón <anibal.limon@linux.intel.com> | 2016-11-30 11:33:26 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-23 12:03:55 +0000 |
commit | 1f0bb99249744b87dd39227a4cf37f2341f5499c (patch) | |
tree | 2ee5df428e593de06c66f52bd04c037b83cc0efa /meta/lib/oeqa/sdkext | |
parent | bdb92fa4d9bd2e4a0a14e3adc62a6b9e9bf639d3 (diff) | |
download | openembedded-core-1f0bb99249744b87dd39227a4cf37f2341f5499c.tar.gz openembedded-core-1f0bb99249744b87dd39227a4cf37f2341f5499c.tar.bz2 openembedded-core-1f0bb99249744b87dd39227a4cf37f2341f5499c.zip |
oeqa/sdkext: Adds case and context modules.
The extensible sdk context and case modules extends the sdk ones,
this means that the tests from sdk are run also the sdkext tests.
Enables support in context for use oe-test esdk command for run
the test suites, the same options of sdk are required for run esdk tests.
Removes old related to case and context inside oetest.py.
[YOCTO #10599]
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Diffstat (limited to 'meta/lib/oeqa/sdkext')
-rw-r--r-- | meta/lib/oeqa/sdkext/case.py | 21 | ||||
-rw-r--r-- | meta/lib/oeqa/sdkext/context.py | 21 |
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 @@ +# Copyright (C) 2016 Intel Corporation +# Released under the MIT license (see COPYING.MIT) + +import os +import subprocess + +from oeqa.utils import avoid_paths_in_environ +from oeqa.sdk.case import OESDKTestCase + +class OESDKExtTestCase(OESDKTestCase): + def _run(self, cmd): + # extensible sdk shows a warning if found bitbake in the path + # because can cause contamination, i.e. use devtool from + # poky/scripts instead of eSDK one. + env = os.environ.copy() + paths_to_avoid = ['bitbake/bin', 'poky/scripts'] + env['PATH'] = avoid_paths_in_environ(paths_to_avoid) + + return subprocess.check_output(". %s > /dev/null;"\ + " %s;" % (self.tc.sdk_env, cmd), stderr=subprocess.STDOUT, + 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 @@ +# Copyright (C) 2016 Intel Corporation +# Released under the MIT license (see COPYING.MIT) + +import os +from oeqa.sdk.context import OESDKTestContext, OESDKTestContextExecutor + +class OESDKExtTestContext(OESDKTestContext): + esdk_files_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "files") + +class OESDKExtTestContextExecutor(OESDKTestContextExecutor): + _context_class = OESDKExtTestContext + + name = 'esdk' + help = 'esdk test component' + description = 'executes esdk tests' + + default_cases = [OESDKTestContextExecutor.default_cases[0], + os.path.join(os.path.abspath(os.path.dirname(__file__)), 'cases')] + default_test_data = None + +_executor_class = OESDKExtTestContextExecutor |