summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorLeonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>2017-01-23 14:41:32 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-26 10:41:10 +0000
commit41f02cb7307faec32b13733e41f78a0ebdc1b52b (patch)
tree88fc0c56a46889a846912485754fc29c0d55e781 /meta
parent899680840d497343095d0e7d7264e3e278ba4602 (diff)
downloadopenembedded-core-41f02cb7307faec32b13733e41f78a0ebdc1b52b.tar.gz
openembedded-core-41f02cb7307faec32b13733e41f78a0ebdc1b52b.tar.bz2
openembedded-core-41f02cb7307faec32b13733e41f78a0ebdc1b52b.zip
selftest: sstatetests: skip glibc-initial tests in case of non-glibc distro
Some distros uses non-glibc so skip those tests requiring glibc-initial as target Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oeqa/selftest/sstate.py1
-rw-r--r--meta/lib/oeqa/selftest/sstatetests.py25
2 files changed, 20 insertions, 6 deletions
diff --git a/meta/lib/oeqa/selftest/sstate.py b/meta/lib/oeqa/selftest/sstate.py
index d27a45cd73..742f4d053b 100644
--- a/meta/lib/oeqa/selftest/sstate.py
+++ b/meta/lib/oeqa/selftest/sstate.py
@@ -16,6 +16,7 @@ class SStateBase(oeSelfTest):
self.sstate_path = get_bb_var('SSTATE_DIR')
self.hostdistro = get_bb_var('NATIVELSBSTRING')
self.distro_specific_sstate = os.path.join(self.sstate_path, self.hostdistro)
+ self.tclibc = get_bb_var('TCLIBC')
# Creates a special sstate configuration with the option to add sstate mirrors
def config_sstate(self, temp_sstate_location=False, add_local_mirrors=[]):
diff --git a/meta/lib/oeqa/selftest/sstatetests.py b/meta/lib/oeqa/selftest/sstatetests.py
index 6642539ebf..e3f819c634 100644
--- a/meta/lib/oeqa/selftest/sstatetests.py
+++ b/meta/lib/oeqa/selftest/sstatetests.py
@@ -51,12 +51,15 @@ class SStateTests(SStateBase):
@testcase(976)
def test_sstate_creation_distro_nonspecific_pass(self):
- self.run_test_sstate_creation(['glibc-initial'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True)
+ # glibc-initial is intended only for the glibc C library
+ if self.tclibc == 'glibc':
+ self.run_test_sstate_creation(['glibc-initial'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True)
@testcase(1375)
def test_sstate_creation_distro_nonspecific_fail(self):
- self.run_test_sstate_creation(['glibc-initial'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True, should_pass=False)
-
+ # glibc-initial is intended only for the glibc C library
+ if self.tclibc == 'glibc':
+ self.run_test_sstate_creation(['glibc-initial'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True, should_pass=False)
# Test the sstate files deletion part of the do_cleansstate task
def run_test_cleansstate_task(self, targets, distro_specific=True, distro_nonspecific=True, temp_sstate_location=True):
@@ -78,16 +81,26 @@ class SStateTests(SStateBase):
@testcase(977)
def test_cleansstate_task_distro_specific_nonspecific(self):
targetarch = get_bb_var('TUNE_ARCH')
- self.run_test_cleansstate_task(['binutils-cross-' + targetarch, 'binutils-native', 'glibc-initial'], distro_specific=True, distro_nonspecific=True, temp_sstate_location=True)
+ targets = ['binutils-cross-'+ targetarch, 'binutils-native']
+ # glibc-initial is intended only for the glibc C library
+ if self.tclibc == 'glibc':
+ targets.append('glibc-initial')
+ self.run_test_cleansstate_task(targets, distro_specific=True, distro_nonspecific=True, temp_sstate_location=True)
@testcase(1376)
def test_cleansstate_task_distro_nonspecific(self):
- self.run_test_cleansstate_task(['glibc-initial'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True)
+ # glibc-initial is intended only for the glibc C library
+ if self.tclibc == 'glibc':
+ self.run_test_cleansstate_task(['glibc-initial'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True)
@testcase(1377)
def test_cleansstate_task_distro_specific(self):
targetarch = get_bb_var('TUNE_ARCH')
- self.run_test_cleansstate_task(['binutils-cross-'+ targetarch, 'binutils-native', 'glibc-initial'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True)
+ targets = ['binutils-cross-'+ targetarch, 'binutils-native']
+ # glibc-initial is intended only for the glibc C library
+ if self.tclibc == 'glibc':
+ targets.append('glibc-initial')
+ self.run_test_cleansstate_task(targets, distro_specific=True, distro_nonspecific=False, temp_sstate_location=True)
# Test rebuilding of distro-specific sstate files