diff options
author | Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> | 2017-01-23 14:41:32 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-26 10:44:27 +0000 |
commit | 70a30d9770cb2e9bc0dea4293d5957efe22ea86e (patch) | |
tree | a25457cf83203a3009945a3b3ae44f4e40ffe8af | |
parent | 6702c7b08940691736f66f411e292cd4da1c6001 (diff) | |
download | poky-70a30d9770cb2e9bc0dea4293d5957efe22ea86e.tar.gz |
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
(From OE-Core rev: 41f02cb7307faec32b13733e41f78a0ebdc1b52b)
Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/lib/oeqa/selftest/sstate.py | 1 | ||||
-rw-r--r-- | meta/lib/oeqa/selftest/sstatetests.py | 25 |
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): | |||
16 | self.sstate_path = get_bb_var('SSTATE_DIR') | 16 | self.sstate_path = get_bb_var('SSTATE_DIR') |
17 | self.hostdistro = get_bb_var('NATIVELSBSTRING') | 17 | self.hostdistro = get_bb_var('NATIVELSBSTRING') |
18 | self.distro_specific_sstate = os.path.join(self.sstate_path, self.hostdistro) | 18 | self.distro_specific_sstate = os.path.join(self.sstate_path, self.hostdistro) |
19 | self.tclibc = get_bb_var('TCLIBC') | ||
19 | 20 | ||
20 | # Creates a special sstate configuration with the option to add sstate mirrors | 21 | # Creates a special sstate configuration with the option to add sstate mirrors |
21 | def config_sstate(self, temp_sstate_location=False, add_local_mirrors=[]): | 22 | 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): | |||
51 | 51 | ||
52 | @testcase(976) | 52 | @testcase(976) |
53 | def test_sstate_creation_distro_nonspecific_pass(self): | 53 | def test_sstate_creation_distro_nonspecific_pass(self): |
54 | self.run_test_sstate_creation(['glibc-initial'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True) | 54 | # glibc-initial is intended only for the glibc C library |
55 | if self.tclibc == 'glibc': | ||
56 | self.run_test_sstate_creation(['glibc-initial'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True) | ||
55 | 57 | ||
56 | @testcase(1375) | 58 | @testcase(1375) |
57 | def test_sstate_creation_distro_nonspecific_fail(self): | 59 | def test_sstate_creation_distro_nonspecific_fail(self): |
58 | self.run_test_sstate_creation(['glibc-initial'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True, should_pass=False) | 60 | # glibc-initial is intended only for the glibc C library |
59 | 61 | if self.tclibc == 'glibc': | |
62 | self.run_test_sstate_creation(['glibc-initial'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True, should_pass=False) | ||
60 | 63 | ||
61 | # Test the sstate files deletion part of the do_cleansstate task | 64 | # Test the sstate files deletion part of the do_cleansstate task |
62 | def run_test_cleansstate_task(self, targets, distro_specific=True, distro_nonspecific=True, temp_sstate_location=True): | 65 | def run_test_cleansstate_task(self, targets, distro_specific=True, distro_nonspecific=True, temp_sstate_location=True): |
@@ -78,16 +81,26 @@ class SStateTests(SStateBase): | |||
78 | @testcase(977) | 81 | @testcase(977) |
79 | def test_cleansstate_task_distro_specific_nonspecific(self): | 82 | def test_cleansstate_task_distro_specific_nonspecific(self): |
80 | targetarch = get_bb_var('TUNE_ARCH') | 83 | targetarch = get_bb_var('TUNE_ARCH') |
81 | self.run_test_cleansstate_task(['binutils-cross-' + targetarch, 'binutils-native', 'glibc-initial'], distro_specific=True, distro_nonspecific=True, temp_sstate_location=True) | 84 | targets = ['binutils-cross-'+ targetarch, 'binutils-native'] |
85 | # glibc-initial is intended only for the glibc C library | ||
86 | if self.tclibc == 'glibc': | ||
87 | targets.append('glibc-initial') | ||
88 | self.run_test_cleansstate_task(targets, distro_specific=True, distro_nonspecific=True, temp_sstate_location=True) | ||
82 | 89 | ||
83 | @testcase(1376) | 90 | @testcase(1376) |
84 | def test_cleansstate_task_distro_nonspecific(self): | 91 | def test_cleansstate_task_distro_nonspecific(self): |
85 | self.run_test_cleansstate_task(['glibc-initial'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True) | 92 | # glibc-initial is intended only for the glibc C library |
93 | if self.tclibc == 'glibc': | ||
94 | self.run_test_cleansstate_task(['glibc-initial'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True) | ||
86 | 95 | ||
87 | @testcase(1377) | 96 | @testcase(1377) |
88 | def test_cleansstate_task_distro_specific(self): | 97 | def test_cleansstate_task_distro_specific(self): |
89 | targetarch = get_bb_var('TUNE_ARCH') | 98 | targetarch = get_bb_var('TUNE_ARCH') |
90 | self.run_test_cleansstate_task(['binutils-cross-'+ targetarch, 'binutils-native', 'glibc-initial'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True) | 99 | targets = ['binutils-cross-'+ targetarch, 'binutils-native'] |
100 | # glibc-initial is intended only for the glibc C library | ||
101 | if self.tclibc == 'glibc': | ||
102 | targets.append('glibc-initial') | ||
103 | self.run_test_cleansstate_task(targets, distro_specific=True, distro_nonspecific=False, temp_sstate_location=True) | ||
91 | 104 | ||
92 | 105 | ||
93 | # Test rebuilding of distro-specific sstate files | 106 | # Test rebuilding of distro-specific sstate files |