summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/sstatetests.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-30 14:46:28 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-10-01 07:43:35 +0100
commit6cfc7c0ce1d72a15012fa231e76d92b61d188644 (patch)
treed6d02f9d183ec99cb861401b5a2c2bede81143f5 /meta/lib/oeqa/selftest/sstatetests.py
parent5dbd0614f3ed139dddcdd70c0ab8b06cfb2ad711 (diff)
downloadpoky-6cfc7c0ce1d72a15012fa231e76d92b61d188644.tar.gz
oeqa/selftest/sstatetests: Add check for same sigs for SDKMACHINE
Extend one of the sstate tests to also ensure that changing SDKMACHINE doesn't change the target task checksums. Also fix a typo and improve debugging by turning the diff filtering off in all cases (if the test fails, we want to full list). (From OE-Core rev: 24bb41f273148db023721804b98676a92f9a5f9c) 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.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/meta/lib/oeqa/selftest/sstatetests.py b/meta/lib/oeqa/selftest/sstatetests.py
index c4efc47fe4..1940e662f8 100644
--- a/meta/lib/oeqa/selftest/sstatetests.py
+++ b/meta/lib/oeqa/selftest/sstatetests.py
@@ -211,6 +211,8 @@ class SStateTests(SStateBase):
211 they're built on a 32 or 64 bit system. Rather than requiring two different 211 they're built on a 32 or 64 bit system. Rather than requiring two different
212 build machines and running a builds, override the variables calling uname() 212 build machines and running a builds, override the variables calling uname()
213 manually and check using bitbake -S. 213 manually and check using bitbake -S.
214
215 Also check that SDKMACHINE changing doesn't change any of these stamps.
214 """ 216 """
215 217
216 topdir = get_bb_var('TOPDIR') 218 topdir = get_bb_var('TOPDIR')
@@ -219,6 +221,7 @@ class SStateTests(SStateBase):
219TMPDIR = \"${TOPDIR}/tmp-sstatesamehash\" 221TMPDIR = \"${TOPDIR}/tmp-sstatesamehash\"
220BUILD_ARCH = \"x86_64\" 222BUILD_ARCH = \"x86_64\"
221BUILD_OS = \"linux\" 223BUILD_OS = \"linux\"
224SDKMACHINE = \"x86_64\"
222""") 225""")
223 self.track_for_cleanup(topdir + "/tmp-sstatesamehash") 226 self.track_for_cleanup(topdir + "/tmp-sstatesamehash")
224 bitbake("core-image-sato -S none") 227 bitbake("core-image-sato -S none")
@@ -226,6 +229,7 @@ BUILD_OS = \"linux\"
226TMPDIR = \"${TOPDIR}/tmp-sstatesamehash2\" 229TMPDIR = \"${TOPDIR}/tmp-sstatesamehash2\"
227BUILD_ARCH = \"i686\" 230BUILD_ARCH = \"i686\"
228BUILD_OS = \"linux\" 231BUILD_OS = \"linux\"
232SDKMACHINE = \"i686\"
229""") 233""")
230 self.track_for_cleanup(topdir + "/tmp-sstatesamehash2") 234 self.track_for_cleanup(topdir + "/tmp-sstatesamehash2")
231 bitbake("core-image-sato -S none") 235 bitbake("core-image-sato -S none")
@@ -233,11 +237,16 @@ BUILD_OS = \"linux\"
233 def get_files(d): 237 def get_files(d):
234 f = [] 238 f = []
235 for root, dirs, files in os.walk(d): 239 for root, dirs, files in os.walk(d):
240 if "core-image-sato" in root:
241 # SDKMACHINE changing will change do_rootfs/do_testimage/do_build stamps of core-image-sato itself
242 # which is safe to ignore
243 continue
236 f.extend(os.path.join(root, name) for name in files) 244 f.extend(os.path.join(root, name) for name in files)
237 return f 245 return f
238 files1 = get_files(topdir + "/tmp-sstatesamehash/stamps/") 246 files1 = get_files(topdir + "/tmp-sstatesamehash/stamps/")
239 files2 = get_files(topdir + "/tmp-sstatesamehash2/stamps/") 247 files2 = get_files(topdir + "/tmp-sstatesamehash2/stamps/")
240 files2 = [x.replace("tmp-sstatesamehash2", "tmp-sstatesamehash").replace("i686-linux", "x86_64-linux").replace("i686" + targetvendor + "-linux", "x86_64" + targetvendor + "-linux", ) for x in files2] 248 files2 = [x.replace("tmp-sstatesamehash2", "tmp-sstatesamehash").replace("i686-linux", "x86_64-linux").replace("i686" + targetvendor + "-linux", "x86_64" + targetvendor + "-linux", ) for x in files2]
249 self.maxDiff = None
241 self.assertItemsEqual(files1, files2) 250 self.assertItemsEqual(files1, files2)
242 251
243 252
@@ -271,11 +280,12 @@ NATIVELSBSTRING = \"DistroB\"
271 files1 = get_files(topdir + "/tmp-sstatesamehash/stamps/") 280 files1 = get_files(topdir + "/tmp-sstatesamehash/stamps/")
272 files2 = get_files(topdir + "/tmp-sstatesamehash2/stamps/") 281 files2 = get_files(topdir + "/tmp-sstatesamehash2/stamps/")
273 files2 = [x.replace("tmp-sstatesamehash2", "tmp-sstatesamehash") for x in files2] 282 files2 = [x.replace("tmp-sstatesamehash2", "tmp-sstatesamehash") for x in files2]
283 self.maxDiff = None
274 self.assertItemsEqual(files1, files2) 284 self.assertItemsEqual(files1, files2)
275 285
276 def test_sstate_allarch_samesigs(self): 286 def test_sstate_allarch_samesigs(self):
277 """ 287 """
278 The sstate checksums off allarch packages should be independent of whichever 288 The sstate checksums of allarch packages should be independent of whichever
279 MACHINE is set. Check this using bitbake -S. 289 MACHINE is set. Check this using bitbake -S.
280 Also, rather than duplicate the test, check nativesdk stamps are the same between 290 Also, rather than duplicate the test, check nativesdk stamps are the same between
281 the two MACHINE values. 291 the two MACHINE values.