summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/sstatetests.py
diff options
context:
space:
mode:
authorLucian Musat <georgex.l.musat@intel.com>2014-07-09 11:36:47 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-07-10 17:38:35 +0100
commitd8364371b2987d1396cfb85658565096ff72a2cd (patch)
tree3b4d13b34f9486fde32e42bdf7ce20d4066f4a4d /meta/lib/oeqa/selftest/sstatetests.py
parent79dae067d99393967c1d565dc7ca2081c966a558 (diff)
downloadpoky-d8364371b2987d1396cfb85658565096ff72a2cd.tar.gz
oeqs/selftest: Added test case decorators for the rest of selftest testcases except toaster
(From OE-Core rev: 3c820db4624a062644a26de1866123a10a78a006) Signed-off-by: Lucian Musat <georgex.l.musat@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest/sstatetests.py')
-rw-r--r--meta/lib/oeqa/selftest/sstatetests.py25
1 files changed, 15 insertions, 10 deletions
diff --git a/meta/lib/oeqa/selftest/sstatetests.py b/meta/lib/oeqa/selftest/sstatetests.py
index 44dcea847f..3789426797 100644
--- a/meta/lib/oeqa/selftest/sstatetests.py
+++ b/meta/lib/oeqa/selftest/sstatetests.py
@@ -8,7 +8,7 @@ import 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_var, get_test_layer
10from oeqa.selftest.sstate import SStateBase 10from oeqa.selftest.sstate import SStateBase
11 11from oeqa.utils.decorators import testcase
12 12
13class SStateTests(SStateBase): 13class SStateTests(SStateBase):
14 14
@@ -28,17 +28,21 @@ class SStateTests(SStateBase):
28 else: 28 else:
29 self.assertTrue(not file_tracker , msg="Found sstate files in the wrong place for: %s" % ', '.join(map(str, targets))) 29 self.assertTrue(not file_tracker , msg="Found sstate files in the wrong place for: %s" % ', '.join(map(str, targets)))
30 30
31 @testcase(975)
31 def test_sstate_creation_distro_specific_pass(self): 32 def test_sstate_creation_distro_specific_pass(self):
32 targetarch = get_bb_var('TUNE_ARCH') 33 targetarch = get_bb_var('TUNE_ARCH')
33 self.run_test_sstate_creation(['binutils-cross-'+ targetarch, 'binutils-native'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True) 34 self.run_test_sstate_creation(['binutils-cross-'+ targetarch, 'binutils-native'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True)
34 35
36 @testcase(975)
35 def test_sstate_creation_distro_specific_fail(self): 37 def test_sstate_creation_distro_specific_fail(self):
36 targetarch = get_bb_var('TUNE_ARCH') 38 targetarch = get_bb_var('TUNE_ARCH')
37 self.run_test_sstate_creation(['binutils-cross-'+ targetarch, 'binutils-native'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True, should_pass=False) 39 self.run_test_sstate_creation(['binutils-cross-'+ targetarch, 'binutils-native'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True, should_pass=False)
38 40
41 @testcase(976)
39 def test_sstate_creation_distro_nonspecific_pass(self): 42 def test_sstate_creation_distro_nonspecific_pass(self):
40 self.run_test_sstate_creation(['eglibc-initial'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True) 43 self.run_test_sstate_creation(['eglibc-initial'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True)
41 44
45 @testcase(976)
42 def test_sstate_creation_distro_nonspecific_fail(self): 46 def test_sstate_creation_distro_nonspecific_fail(self):
43 self.run_test_sstate_creation(['eglibc-initial'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True, should_pass=False) 47 self.run_test_sstate_creation(['eglibc-initial'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True, should_pass=False)
44 48
@@ -60,13 +64,16 @@ class SStateTests(SStateBase):
60 tgz_removed = self.search_sstate('|'.join(map(str, [s + '.*?\.tgz$' for s in targets])), distro_specific, distro_nonspecific) 64 tgz_removed = self.search_sstate('|'.join(map(str, [s + '.*?\.tgz$' for s in targets])), distro_specific, distro_nonspecific)
61 self.assertTrue(not tgz_removed, msg="do_cleansstate didn't remove .tgz sstate files for: %s" % ', '.join(map(str, targets))) 65 self.assertTrue(not tgz_removed, msg="do_cleansstate didn't remove .tgz sstate files for: %s" % ', '.join(map(str, targets)))
62 66
67 @testcase(977)
63 def test_cleansstate_task_distro_specific_nonspecific(self): 68 def test_cleansstate_task_distro_specific_nonspecific(self):
64 targetarch = get_bb_var('TUNE_ARCH') 69 targetarch = get_bb_var('TUNE_ARCH')
65 self.run_test_cleansstate_task(['binutils-cross-' + targetarch, 'binutils-native', 'eglibc-initial'], distro_specific=True, distro_nonspecific=True, temp_sstate_location=True) 70 self.run_test_cleansstate_task(['binutils-cross-' + targetarch, 'binutils-native', 'eglibc-initial'], distro_specific=True, distro_nonspecific=True, temp_sstate_location=True)
66 71
72 @testcase(977)
67 def test_cleansstate_task_distro_nonspecific(self): 73 def test_cleansstate_task_distro_nonspecific(self):
68 self.run_test_cleansstate_task(['eglibc-initial'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True) 74 self.run_test_cleansstate_task(['eglibc-initial'], distro_specific=False, distro_nonspecific=True, temp_sstate_location=True)
69 75
76 @testcase(977)
70 def test_cleansstate_task_distro_specific(self): 77 def test_cleansstate_task_distro_specific(self):
71 targetarch = get_bb_var('TUNE_ARCH') 78 targetarch = get_bb_var('TUNE_ARCH')
72 self.run_test_cleansstate_task(['binutils-cross-'+ targetarch, 'binutils-native', 'eglibc-initial'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True) 79 self.run_test_cleansstate_task(['binutils-cross-'+ targetarch, 'binutils-native', 'eglibc-initial'], distro_specific=True, distro_nonspecific=False, temp_sstate_location=True)
@@ -98,14 +105,17 @@ class SStateTests(SStateBase):
98 created_once = [x for x in file_tracker_2 if x not in file_tracker_1] 105 created_once = [x for x in file_tracker_2 if x not in file_tracker_1]
99 self.assertTrue(created_once == [], msg="The following sstate files ware created only in the second run: %s" % ', '.join(map(str, created_once))) 106 self.assertTrue(created_once == [], msg="The following sstate files ware created only in the second run: %s" % ', '.join(map(str, created_once)))
100 107
108 @testcase(175)
101 def test_rebuild_distro_specific_sstate_cross_native_targets(self): 109 def test_rebuild_distro_specific_sstate_cross_native_targets(self):
102 targetarch = get_bb_var('TUNE_ARCH') 110 targetarch = get_bb_var('TUNE_ARCH')
103 self.run_test_rebuild_distro_specific_sstate(['binutils-cross-' + targetarch, 'binutils-native'], temp_sstate_location=True) 111 self.run_test_rebuild_distro_specific_sstate(['binutils-cross-' + targetarch, 'binutils-native'], temp_sstate_location=True)
104 112
113 @testcase(175)
105 def test_rebuild_distro_specific_sstate_cross_target(self): 114 def test_rebuild_distro_specific_sstate_cross_target(self):
106 targetarch = get_bb_var('TUNE_ARCH') 115 targetarch = get_bb_var('TUNE_ARCH')
107 self.run_test_rebuild_distro_specific_sstate(['binutils-cross-' + targetarch], temp_sstate_location=True) 116 self.run_test_rebuild_distro_specific_sstate(['binutils-cross-' + targetarch], temp_sstate_location=True)
108 117
118 @testcase(175)
109 def test_rebuild_distro_specific_sstate_native_target(self): 119 def test_rebuild_distro_specific_sstate_native_target(self):
110 self.run_test_rebuild_distro_specific_sstate(['binutils-native'], temp_sstate_location=True) 120 self.run_test_rebuild_distro_specific_sstate(['binutils-native'], temp_sstate_location=True)
111 121
@@ -153,7 +163,7 @@ class SStateTests(SStateBase):
153 expected_not_actual = [x for x in expected_remaining_sstate if x not in actual_remaining_sstate] 163 expected_not_actual = [x for x in expected_remaining_sstate if x not in actual_remaining_sstate]
154 self.assertFalse(expected_not_actual, msg="Extra files ware removed: %s" ', '.join(map(str, expected_not_actual))) 164 self.assertFalse(expected_not_actual, msg="Extra files ware removed: %s" ', '.join(map(str, expected_not_actual)))
155 165
156 166 @testcase(973)
157 def test_sstate_cache_management_script_using_pr_1(self): 167 def test_sstate_cache_management_script_using_pr_1(self):
158 global_config = [] 168 global_config = []
159 target_config = [] 169 target_config = []
@@ -161,6 +171,7 @@ class SStateTests(SStateBase):
161 target_config.append('PR = "0"') 171 target_config.append('PR = "0"')
162 self.run_test_sstate_cache_management_script('m4', global_config, target_config, ignore_patterns=['populate_lic']) 172 self.run_test_sstate_cache_management_script('m4', global_config, target_config, ignore_patterns=['populate_lic'])
163 173
174 @testcase(978)
164 def test_sstate_cache_management_script_using_pr_2(self): 175 def test_sstate_cache_management_script_using_pr_2(self):
165 global_config = [] 176 global_config = []
166 target_config = [] 177 target_config = []
@@ -170,6 +181,7 @@ class SStateTests(SStateBase):
170 target_config.append('PR = "1"') 181 target_config.append('PR = "1"')
171 self.run_test_sstate_cache_management_script('m4', global_config, target_config, ignore_patterns=['populate_lic']) 182 self.run_test_sstate_cache_management_script('m4', global_config, target_config, ignore_patterns=['populate_lic'])
172 183
184 @testcase(979)
173 def test_sstate_cache_management_script_using_pr_3(self): 185 def test_sstate_cache_management_script_using_pr_3(self):
174 global_config = [] 186 global_config = []
175 target_config = [] 187 target_config = []
@@ -181,6 +193,7 @@ class SStateTests(SStateBase):
181 target_config.append('PR = "1"') 193 target_config.append('PR = "1"')
182 self.run_test_sstate_cache_management_script('m4', global_config, target_config, ignore_patterns=['populate_lic']) 194 self.run_test_sstate_cache_management_script('m4', global_config, target_config, ignore_patterns=['populate_lic'])
183 195
196 @testcase(974)
184 def test_sstate_cache_management_script_using_machine(self): 197 def test_sstate_cache_management_script_using_machine(self):
185 global_config = [] 198 global_config = []
186 target_config = [] 199 target_config = []
@@ -189,11 +202,3 @@ class SStateTests(SStateBase):
189 global_config.append('MACHINE = "qemux86"') 202 global_config.append('MACHINE = "qemux86"')
190 target_config.append('') 203 target_config.append('')
191 self.run_test_sstate_cache_management_script('m4', global_config, target_config, ignore_patterns=['populate_lic']) 204 self.run_test_sstate_cache_management_script('m4', global_config, target_config, ignore_patterns=['populate_lic'])
192
193
194
195
196
197
198
199