summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/sstate.py
diff options
context:
space:
mode:
authorLeonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>2016-11-18 11:27:19 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-12-16 10:23:22 +0000
commit009adf73fa8e300dd8807506352162f4c234639a (patch)
treea562eb2b11fd2f6f761ca554017e8053bb6594c5 /meta/lib/oeqa/selftest/sstate.py
parenta92d27acd8f42b61a2fc575311838b45d171f0af (diff)
downloadpoky-009adf73fa8e300dd8807506352162f4c234639a.tar.gz
selftest: base: new object member to store the DISTRO value
Instead of quering it multiple times, query once and use it on test method skip checks. Also, rename current distro sstate object member to a more meaninful name. (From OE-Core rev: bde9d99575a63ad2d7fd5974ce6ce19aad9a8984) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest/sstate.py')
-rw-r--r--meta/lib/oeqa/selftest/sstate.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/meta/lib/oeqa/selftest/sstate.py b/meta/lib/oeqa/selftest/sstate.py
index 5989724432..d27a45cd73 100644
--- a/meta/lib/oeqa/selftest/sstate.py
+++ b/meta/lib/oeqa/selftest/sstate.py
@@ -14,8 +14,8 @@ class SStateBase(oeSelfTest):
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 self.sstate_path = get_bb_var('SSTATE_DIR')
17 self.distro = get_bb_var('NATIVELSBSTRING') 17 self.hostdistro = get_bb_var('NATIVELSBSTRING')
18 self.distro_specific_sstate = os.path.join(self.sstate_path, self.distro) 18 self.distro_specific_sstate = os.path.join(self.sstate_path, self.hostdistro)
19 19
20 # Creates a special sstate configuration with the option to add sstate mirrors 20 # Creates a special sstate configuration with the option to add sstate mirrors
21 def config_sstate(self, temp_sstate_location=False, add_local_mirrors=[]): 21 def config_sstate(self, temp_sstate_location=False, add_local_mirrors=[]):
@@ -27,8 +27,8 @@ class SStateBase(oeSelfTest):
27 self.append_config(config_temp_sstate) 27 self.append_config(config_temp_sstate)
28 self.track_for_cleanup(temp_sstate_path) 28 self.track_for_cleanup(temp_sstate_path)
29 self.sstate_path = get_bb_var('SSTATE_DIR') 29 self.sstate_path = get_bb_var('SSTATE_DIR')
30 self.distro = get_bb_var('NATIVELSBSTRING') 30 self.hostdistro = get_bb_var('NATIVELSBSTRING')
31 self.distro_specific_sstate = os.path.join(self.sstate_path, self.distro) 31 self.distro_specific_sstate = os.path.join(self.sstate_path, self.hostdistro)
32 32
33 if add_local_mirrors: 33 if add_local_mirrors:
34 config_set_sstate_if_not_set = 'SSTATE_MIRRORS ?= ""' 34 config_set_sstate_if_not_set = 'SSTATE_MIRRORS ?= ""'
@@ -42,7 +42,7 @@ class SStateBase(oeSelfTest):
42 def search_sstate(self, filename_regex, distro_specific=True, distro_nonspecific=True): 42 def search_sstate(self, filename_regex, distro_specific=True, distro_nonspecific=True):
43 result = [] 43 result = []
44 for root, dirs, files in os.walk(self.sstate_path): 44 for root, dirs, files in os.walk(self.sstate_path):
45 if distro_specific and re.search("%s/[a-z0-9]{2}$" % self.distro, root): 45 if distro_specific and re.search("%s/[a-z0-9]{2}$" % self.hostdistro, root):
46 for f in files: 46 for f in files:
47 if re.search(filename_regex, f): 47 if re.search(filename_regex, f):
48 result.append(f) 48 result.append(f)