From 2a410b225ab90d3655a4fd637ae77965c4c9fbfb Mon Sep 17 00:00:00 2001 From: Aníbal Limón Date: Sun, 21 Feb 2016 12:31:50 -0600 Subject: classes/testsdk: Move the removal of bitbake PATH to eSDK context only MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- meta/lib/oeqa/oetest.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'meta/lib/oeqa/oetest.py') 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 import oeqa.runtime import oeqa.sdkext from oeqa.utils.decorators import LogResults, gettag, getResults +from oeqa.utils import avoid_paths_in_environ logger = logging.getLogger("BitBake") @@ -128,7 +129,16 @@ class oeSDKTest(oeTest): return subprocess.check_output(". %s > /dev/null; %s;" % (self.tc.sdkenv, cmd), shell=True) class oeSDKExtTest(oeSDKTest): - pass + 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.sdkenv, cmd), shell=True, env=env) def getmodule(pos=2): # stack returns a list of tuples containg frame information -- cgit v1.2.3-54-g00ecf