diff options
| -rw-r--r-- | meta/lib/oeqa/selftest/sstatetests.py | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/meta/lib/oeqa/selftest/sstatetests.py b/meta/lib/oeqa/selftest/sstatetests.py index 6906b21237..c4efc47fe4 100644 --- a/meta/lib/oeqa/selftest/sstatetests.py +++ b/meta/lib/oeqa/selftest/sstatetests.py | |||
| @@ -3,6 +3,7 @@ import unittest | |||
| 3 | import os | 3 | import os |
| 4 | import re | 4 | import re |
| 5 | import shutil | 5 | import shutil |
| 6 | import glob | ||
| 6 | 7 | ||
| 7 | import oeqa.utils.ftools as ftools | 8 | import oeqa.utils.ftools as ftools |
| 8 | from oeqa.selftest.base import oeSelfTest | 9 | from oeqa.selftest.base import oeSelfTest |
| @@ -276,6 +277,8 @@ NATIVELSBSTRING = \"DistroB\" | |||
| 276 | """ | 277 | """ |
| 277 | The sstate checksums off allarch packages should be independent of whichever | 278 | The sstate checksums off allarch packages should be independent of whichever |
| 278 | MACHINE is set. Check this using bitbake -S. | 279 | MACHINE is set. Check this using bitbake -S. |
| 280 | Also, rather than duplicate the test, check nativesdk stamps are the same between | ||
| 281 | the two MACHINE values. | ||
| 279 | """ | 282 | """ |
| 280 | 283 | ||
| 281 | topdir = get_bb_var('TOPDIR') | 284 | topdir = get_bb_var('TOPDIR') |
| @@ -286,18 +289,20 @@ TMPDIR = \"${TOPDIR}/tmp-sstatesamehash\" | |||
| 286 | MACHINE = \"qemux86\" | 289 | MACHINE = \"qemux86\" |
| 287 | """) | 290 | """) |
| 288 | self.track_for_cleanup(topdir + "/tmp-sstatesamehash") | 291 | self.track_for_cleanup(topdir + "/tmp-sstatesamehash") |
| 289 | bitbake("world -S none") | 292 | bitbake("world meta-toolchain -S none") |
| 290 | self.write_config(""" | 293 | self.write_config(""" |
| 291 | TMPDIR = \"${TOPDIR}/tmp-sstatesamehash2\" | 294 | TMPDIR = \"${TOPDIR}/tmp-sstatesamehash2\" |
| 292 | MACHINE = \"qemuarm\" | 295 | MACHINE = \"qemuarm\" |
| 293 | """) | 296 | """) |
| 294 | self.track_for_cleanup(topdir + "/tmp-sstatesamehash2") | 297 | self.track_for_cleanup(topdir + "/tmp-sstatesamehash2") |
| 295 | bitbake("world -S none") | 298 | bitbake("world meta-toolchain -S none") |
| 296 | 299 | ||
| 297 | def get_files(d): | 300 | def get_files(d): |
| 298 | f = [] | 301 | f = [] |
| 299 | for root, dirs, files in os.walk(d): | 302 | for root, dirs, files in os.walk(d): |
| 300 | for name in files: | 303 | for name in files: |
| 304 | if "meta-environment" in root or "cross-canadian" in root: | ||
| 305 | continue | ||
| 301 | if "do_build" not in name: | 306 | if "do_build" not in name: |
| 302 | f.append(os.path.join(root, name)) | 307 | f.append(os.path.join(root, name)) |
| 303 | return f | 308 | return f |
| @@ -306,3 +311,12 @@ MACHINE = \"qemuarm\" | |||
| 306 | files2 = [x.replace("tmp-sstatesamehash2", "tmp-sstatesamehash") for x in files2] | 311 | files2 = [x.replace("tmp-sstatesamehash2", "tmp-sstatesamehash") for x in files2] |
| 307 | self.maxDiff = None | 312 | self.maxDiff = None |
| 308 | self.assertItemsEqual(files1, files2) | 313 | self.assertItemsEqual(files1, files2) |
| 314 | |||
| 315 | nativesdkdir = os.path.basename(glob.glob(topdir + "/tmp-sstatesamehash/stamps/*-nativesdk*-linux")[0]) | ||
| 316 | |||
| 317 | files1 = get_files(topdir + "/tmp-sstatesamehash/stamps/" + nativesdkdir) | ||
| 318 | files2 = get_files(topdir + "/tmp-sstatesamehash2/stamps/" + nativesdkdir) | ||
| 319 | files2 = [x.replace("tmp-sstatesamehash2", "tmp-sstatesamehash") for x in files2] | ||
| 320 | self.maxDiff = None | ||
| 321 | self.assertItemsEqual(files1, files2) | ||
| 322 | |||
