case.py (eb8dc40360f0cfef56fb6947cc817a547d6d9bc6) case.py (c342db356d4f451821781eb24eb9f3d39d6c0c5e)
1#
1# Copyright (C) 2016 Intel Corporation
2# Copyright (C) 2016 Intel Corporation
2# Released under the MIT license (see COPYING.MIT)
3#
4# SPDX-License-Identifier: MIT
5#
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, universal_newlines=True)
6
7import os
8import subprocess
9
10from oeqa.utils import avoid_paths_in_environ
11from oeqa.sdk.case import OESDKTestCase
12
13class OESDKExtTestCase(OESDKTestCase):
14 def _run(self, cmd):
15 # extensible sdk shows a warning if found bitbake in the path
16 # because can cause contamination, i.e. use devtool from
17 # poky/scripts instead of eSDK one.
18 env = os.environ.copy()
19 paths_to_avoid = ['bitbake/bin', 'poky/scripts']
20 env['PATH'] = avoid_paths_in_environ(paths_to_avoid)
21
22 return subprocess.check_output(". %s > /dev/null;"\
23 " %s;" % (self.tc.sdk_env, cmd), stderr=subprocess.STDOUT,
24 shell=True, env=env, universal_newlines=True)