summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/sstate.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/selftest/sstate.py')
-rw-r--r--meta/lib/oeqa/selftest/sstate.py20
1 files changed, 14 insertions, 6 deletions
diff --git a/meta/lib/oeqa/selftest/sstate.py b/meta/lib/oeqa/selftest/sstate.py
index 742f4d053b..f54bc41465 100644
--- a/meta/lib/oeqa/selftest/sstate.py
+++ b/meta/lib/oeqa/selftest/sstate.py
@@ -6,17 +6,24 @@ import shutil
6 6
7import oeqa.utils.ftools as ftools 7import oeqa.utils.ftools as ftools
8from oeqa.selftest.base import oeSelfTest 8from oeqa.selftest.base import oeSelfTest
9from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_test_layer 9from oeqa.utils.commands import runCmd, bitbake, get_bb_vars, get_test_layer
10 10
11 11
12class SStateBase(oeSelfTest): 12class SStateBase(oeSelfTest):
13 13
14 def setUpLocal(self): 14 def setUpLocal(self):
15 self.temp_sstate_location = None 15 self.temp_sstate_location = None
16 self.sstate_path = get_bb_var('SSTATE_DIR') 16 needed_vars = ['SSTATE_DIR', 'NATIVELSBSTRING', 'TCLIBC', 'TUNE_ARCH',
17 self.hostdistro = get_bb_var('NATIVELSBSTRING') 17 'TOPDIR', 'TARGET_VENDOR', 'TARGET_OS']
18 bb_vars = get_bb_vars(needed_vars)
19 self.sstate_path = bb_vars['SSTATE_DIR']
20 self.hostdistro = bb_vars['NATIVELSBSTRING']
21 self.tclibc = bb_vars['TCLIBC']
22 self.tune_arch = bb_vars['TUNE_ARCH']
23 self.topdir = bb_vars['TOPDIR']
24 self.target_vendor = bb_vars['TARGET_VENDOR']
25 self.target_os = bb_vars['TARGET_OS']
18 self.distro_specific_sstate = os.path.join(self.sstate_path, self.hostdistro) 26 self.distro_specific_sstate = os.path.join(self.sstate_path, self.hostdistro)
19 self.tclibc = get_bb_var('TCLIBC')
20 27
21 # Creates a special sstate configuration with the option to add sstate mirrors 28 # Creates a special sstate configuration with the option to add sstate mirrors
22 def config_sstate(self, temp_sstate_location=False, add_local_mirrors=[]): 29 def config_sstate(self, temp_sstate_location=False, add_local_mirrors=[]):
@@ -27,8 +34,9 @@ class SStateBase(oeSelfTest):
27 config_temp_sstate = "SSTATE_DIR = \"%s\"" % temp_sstate_path 34 config_temp_sstate = "SSTATE_DIR = \"%s\"" % temp_sstate_path
28 self.append_config(config_temp_sstate) 35 self.append_config(config_temp_sstate)
29 self.track_for_cleanup(temp_sstate_path) 36 self.track_for_cleanup(temp_sstate_path)
30 self.sstate_path = get_bb_var('SSTATE_DIR') 37 bb_vars = get_bb_vars(['SSTATE_DIR', 'NATIVELSBSTRING'])
31 self.hostdistro = get_bb_var('NATIVELSBSTRING') 38 self.sstate_path = bb_vars['SSTATE_DIR']
39 self.hostdistro = bb_vars['NATIVELSBSTRING']
32 self.distro_specific_sstate = os.path.join(self.sstate_path, self.hostdistro) 40 self.distro_specific_sstate = os.path.join(self.sstate_path, self.hostdistro)
33 41
34 if add_local_mirrors: 42 if add_local_mirrors: