Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] oeqa/selftest/sstatetests: Add test that MACHINE doesn't change target sigs
@ 2015-09-30 13:49 Richard Purdie
  2015-09-30 16:21 ` Martin Jansa
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Purdie @ 2015-09-30 13:49 UTC (permalink / raw)
  To: openembedded-core

When we change between two machines with the same tune, we shouldn't see 
rebuilds of binaries. This adds a test for this using the qemux86copy 
machine. We also extend the test to cover multilibs.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

diff --git a/meta/lib/oeqa/selftest/sstatetests.py b/meta/lib/oeqa/selftest/sstatetests.py
index 1940e66..af68e02 100644
--- a/meta/lib/oeqa/selftest/sstatetests.py
+++ b/meta/lib/oeqa/selftest/sstatetests.py
@@ -329,4 +329,49 @@ MACHINE = \"qemuarm\"
         files2 = [x.replace("tmp-sstatesamehash2", "tmp-sstatesamehash") for x in files2]
         self.maxDiff = None
         self.assertItemsEqual(files1, files2)
-        
+
+    def test_sstate_sametune_samesigs(self):
+        """
+        The sstate checksums of two identical machines (using the same tune) should be the 
+        same, apart from changes within the machine specific stamps directory. We use the
+        qemux86copy machine to test this. Also include multilibs in the test.
+        """
+
+        topdir = get_bb_var('TOPDIR')
+        targetos = get_bb_var('TARGET_OS')
+        targetvendor = get_bb_var('TARGET_VENDOR')
+        self.write_config("""
+TMPDIR = \"${TOPDIR}/tmp-sstatesamehash\"
+MACHINE = \"qemux86\"
+require conf/multilib.conf
+MULTILIBS = "multilib:lib32"
+DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
+""")
+        self.track_for_cleanup(topdir + "/tmp-sstatesamehash")
+        bitbake("world meta-toolchain -S none")
+        self.write_config("""
+TMPDIR = \"${TOPDIR}/tmp-sstatesamehash2\"
+MACHINE = \"qemux86copy\"
+require conf/multilib.conf
+MULTILIBS = "multilib:lib32"
+DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
+""")
+        self.track_for_cleanup(topdir + "/tmp-sstatesamehash2")
+        bitbake("world meta-toolchain -S none")
+
+        def get_files(d):
+            f = []
+            for root, dirs, files in os.walk(d):
+                for name in files:
+                    if "meta-environment" in root or "cross-canadian" in root:
+                        continue
+                    if "qemux86copy-" in root or "qemux86-" in root:
+                        continue
+                    if "do_build" not in name and "do_populate_sdk" not in name:
+                        f.append(os.path.join(root, name))
+            return f
+        files1 = get_files(topdir + "/tmp-sstatesamehash/stamps")
+        files2 = get_files(topdir + "/tmp-sstatesamehash2/stamps")
+        files2 = [x.replace("tmp-sstatesamehash2", "tmp-sstatesamehash") for x in files2]
+        self.maxDiff = None
+        self.assertItemsEqual(files1, files2)




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] oeqa/selftest/sstatetests: Add test that MACHINE doesn't change target sigs
  2015-09-30 13:49 [PATCH] oeqa/selftest/sstatetests: Add test that MACHINE doesn't change target sigs Richard Purdie
@ 2015-09-30 16:21 ` Martin Jansa
  2015-09-30 16:43   ` Richard Purdie
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Jansa @ 2015-09-30 16:21 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 3321 bytes --]

On Wed, Sep 30, 2015 at 02:49:23PM +0100, Richard Purdie wrote:
> When we change between two machines with the same tune, we shouldn't see 
> rebuilds of binaries. This adds a test for this using the qemux86copy 
> machine. We also extend the test to cover multilibs.

2nd level of this test is to verify that all allarch recipes have the
same signatures even for 2 MACHINEs with different tunes.

Thanks for looking into this.

> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> 
> diff --git a/meta/lib/oeqa/selftest/sstatetests.py b/meta/lib/oeqa/selftest/sstatetests.py
> index 1940e66..af68e02 100644
> --- a/meta/lib/oeqa/selftest/sstatetests.py
> +++ b/meta/lib/oeqa/selftest/sstatetests.py
> @@ -329,4 +329,49 @@ MACHINE = \"qemuarm\"
>          files2 = [x.replace("tmp-sstatesamehash2", "tmp-sstatesamehash") for x in files2]
>          self.maxDiff = None
>          self.assertItemsEqual(files1, files2)
> -        
> +
> +    def test_sstate_sametune_samesigs(self):
> +        """
> +        The sstate checksums of two identical machines (using the same tune) should be the 
> +        same, apart from changes within the machine specific stamps directory. We use the
> +        qemux86copy machine to test this. Also include multilibs in the test.
> +        """
> +
> +        topdir = get_bb_var('TOPDIR')
> +        targetos = get_bb_var('TARGET_OS')
> +        targetvendor = get_bb_var('TARGET_VENDOR')
> +        self.write_config("""
> +TMPDIR = \"${TOPDIR}/tmp-sstatesamehash\"
> +MACHINE = \"qemux86\"
> +require conf/multilib.conf
> +MULTILIBS = "multilib:lib32"
> +DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
> +""")
> +        self.track_for_cleanup(topdir + "/tmp-sstatesamehash")
> +        bitbake("world meta-toolchain -S none")
> +        self.write_config("""
> +TMPDIR = \"${TOPDIR}/tmp-sstatesamehash2\"
> +MACHINE = \"qemux86copy\"
> +require conf/multilib.conf
> +MULTILIBS = "multilib:lib32"
> +DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
> +""")
> +        self.track_for_cleanup(topdir + "/tmp-sstatesamehash2")
> +        bitbake("world meta-toolchain -S none")
> +
> +        def get_files(d):
> +            f = []
> +            for root, dirs, files in os.walk(d):
> +                for name in files:
> +                    if "meta-environment" in root or "cross-canadian" in root:
> +                        continue
> +                    if "qemux86copy-" in root or "qemux86-" in root:
> +                        continue
> +                    if "do_build" not in name and "do_populate_sdk" not in name:
> +                        f.append(os.path.join(root, name))
> +            return f
> +        files1 = get_files(topdir + "/tmp-sstatesamehash/stamps")
> +        files2 = get_files(topdir + "/tmp-sstatesamehash2/stamps")
> +        files2 = [x.replace("tmp-sstatesamehash2", "tmp-sstatesamehash") for x in files2]
> +        self.maxDiff = None
> +        self.assertItemsEqual(files1, files2)
> 
> 
> -- 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] oeqa/selftest/sstatetests: Add test that MACHINE doesn't change target sigs
  2015-09-30 16:21 ` Martin Jansa
@ 2015-09-30 16:43   ` Richard Purdie
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2015-09-30 16:43 UTC (permalink / raw)
  To: Martin Jansa; +Cc: openembedded-core

On Wed, 2015-09-30 at 18:21 +0200, Martin Jansa wrote:
> On Wed, Sep 30, 2015 at 02:49:23PM +0100, Richard Purdie wrote:
> > When we change between two machines with the same tune, we shouldn't see 
> > rebuilds of binaries. This adds a test for this using the qemux86copy 
> > machine. We also extend the test to cover multilibs.
> 
> 2nd level of this test is to verify that all allarch recipes have the
> same signatures even for 2 MACHINEs with different tunes.
> 
> Thanks for looking into this.

There is already another test in the file which covers that and some
nativesdk constraints too.

Cheers,

Richard



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-09-30 16:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-30 13:49 [PATCH] oeqa/selftest/sstatetests: Add test that MACHINE doesn't change target sigs Richard Purdie
2015-09-30 16:21 ` Martin Jansa
2015-09-30 16:43   ` Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox