diff options
author | Aníbal Limón <limon.anibal@gmail.com> | 2016-02-21 12:31:50 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-02-28 11:33:06 +0000 |
commit | 2a410b225ab90d3655a4fd637ae77965c4c9fbfb (patch) | |
tree | b3256cd3fe21fe16cf14a9144b7c15db45b2433e | |
parent | eb1f8b9427c1b346c1113f74df678883e9b2c729 (diff) | |
download | poky-2a410b225ab90d3655a4fd637ae77965c4c9fbfb.tar.gz |
classes/testsdk: Move the removal of bitbake PATH to eSDK context only
The removal of bitbake and scripts PATH is only needed by eSDK tests
so move to eSDK context only.
This also it's a support for eSDK update test because it needs to
execute oe-publish-sdk from scripts.
(From OE-Core rev: 4ae0c84568f39661722cbceba8ddab22cffe5003)
Signed-off-by: Aníbal Limón <limon.anibal@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/testsdk.bbclass | 9 | ||||
-rw-r--r-- | meta/lib/oeqa/oetest.py | 12 |
2 files changed, 15 insertions, 6 deletions
diff --git a/meta/classes/testsdk.bbclass b/meta/classes/testsdk.bbclass index 41e03d6e06..157077e18e 100644 --- a/meta/classes/testsdk.bbclass +++ b/meta/classes/testsdk.bbclass | |||
@@ -96,11 +96,10 @@ def testsdkext_main(d): | |||
96 | # extensible sdk use network | 96 | # extensible sdk use network |
97 | export_proxies(d) | 97 | export_proxies(d) |
98 | 98 | ||
99 | # extensible sdk shows a warning if found bitbake in the path | 99 | # extensible sdk can be contaminated if native programs are |
100 | # because can cause problems so clean it | 100 | # in PATH, i.e. use perl-native instead of eSDK one. |
101 | paths_to_avoid = ['bitbake/bin', 'poky/scripts', | 101 | paths_to_avoid = [d.getVar('STAGING_DIR', True), |
102 | d.getVar('STAGING_DIR', True), | 102 | d.getVar('BASE_WORKDIR', True)] |
103 | d.getVar('BASE_WORKDIR', True)] | ||
104 | os.environ['PATH'] = avoid_paths_in_environ(paths_to_avoid) | 103 | os.environ['PATH'] = avoid_paths_in_environ(paths_to_avoid) |
105 | 104 | ||
106 | pn = d.getVar("PN", True) | 105 | pn = d.getVar("PN", True) |
diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py index 3e2ea0f874..3809ed722b 100644 --- a/meta/lib/oeqa/oetest.py +++ b/meta/lib/oeqa/oetest.py | |||
@@ -21,6 +21,7 @@ import logging | |||
21 | import oeqa.runtime | 21 | import oeqa.runtime |
22 | import oeqa.sdkext | 22 | import oeqa.sdkext |
23 | from oeqa.utils.decorators import LogResults, gettag, getResults | 23 | from oeqa.utils.decorators import LogResults, gettag, getResults |
24 | from oeqa.utils import avoid_paths_in_environ | ||
24 | 25 | ||
25 | logger = logging.getLogger("BitBake") | 26 | logger = logging.getLogger("BitBake") |
26 | 27 | ||
@@ -128,7 +129,16 @@ class oeSDKTest(oeTest): | |||
128 | return subprocess.check_output(". %s > /dev/null; %s;" % (self.tc.sdkenv, cmd), shell=True) | 129 | return subprocess.check_output(". %s > /dev/null; %s;" % (self.tc.sdkenv, cmd), shell=True) |
129 | 130 | ||
130 | class oeSDKExtTest(oeSDKTest): | 131 | class oeSDKExtTest(oeSDKTest): |
131 | pass | 132 | def _run(self, cmd): |
133 | # extensible sdk shows a warning if found bitbake in the path | ||
134 | # because can cause contamination, i.e. use devtool from | ||
135 | # poky/scripts instead of eSDK one. | ||
136 | env = os.environ.copy() | ||
137 | paths_to_avoid = ['bitbake/bin', 'poky/scripts'] | ||
138 | env['PATH'] = avoid_paths_in_environ(paths_to_avoid) | ||
139 | |||
140 | return subprocess.check_output(". %s > /dev/null;"\ | ||
141 | " %s;" % (self.tc.sdkenv, cmd), shell=True, env=env) | ||
132 | 142 | ||
133 | def getmodule(pos=2): | 143 | def getmodule(pos=2): |
134 | # stack returns a list of tuples containg frame information | 144 | # stack returns a list of tuples containg frame information |