diff options
Diffstat (limited to 'meta/lib/oeqa/selftest/sstatetests.py')
| -rw-r--r-- | meta/lib/oeqa/selftest/sstatetests.py | 12 |
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): | |||
| 219 | TMPDIR = \"${TOPDIR}/tmp-sstatesamehash\" | 221 | TMPDIR = \"${TOPDIR}/tmp-sstatesamehash\" |
| 220 | BUILD_ARCH = \"x86_64\" | 222 | BUILD_ARCH = \"x86_64\" |
| 221 | BUILD_OS = \"linux\" | 223 | BUILD_OS = \"linux\" |
| 224 | SDKMACHINE = \"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\" | |||
| 226 | TMPDIR = \"${TOPDIR}/tmp-sstatesamehash2\" | 229 | TMPDIR = \"${TOPDIR}/tmp-sstatesamehash2\" |
| 227 | BUILD_ARCH = \"i686\" | 230 | BUILD_ARCH = \"i686\" |
| 228 | BUILD_OS = \"linux\" | 231 | BUILD_OS = \"linux\" |
| 232 | SDKMACHINE = \"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. |
