]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/sstate: Fix allarch samesigs test
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 8 Jan 2022 23:17:28 +0000 (23:17 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 11 Jan 2022 15:47:11 +0000 (15:47 +0000)
The allarch sstate sigs test is supposed to compare the allarch sigs but
does not. Fix this.

Also rename the common function to make it clear it isn't just used by
the allarch test.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/selftest/cases/sstatetests.py

index 70ef10cda53a7252d9c7e45f6cbeeae3de6a80fd..96b2d115ed7bd9c3a628ea4cba4cc40f88184853 100644 (file)
@@ -350,7 +350,7 @@ MACHINE = \"qemuarm\"
 OLDEST_KERNEL = \"3.3.0\"
 BB_SIGNATURE_HANDLER = "OEBasicHash"
 """
-        self.sstate_allarch_samesigs(configA, configB)
+        self.sstate_common_samesigs(configA, configB, allarch=True)
 
     def test_sstate_nativesdk_samesigs_multilib(self):
         """
@@ -374,9 +374,9 @@ require conf/multilib.conf
 MULTILIBS = \"\"
 BB_SIGNATURE_HANDLER = "OEBasicHash"
 """
-        self.sstate_allarch_samesigs(configA, configB)
+        self.sstate_common_samesigs(configA, configB)
 
-    def sstate_allarch_samesigs(self, configA, configB):
+    def sstate_common_samesigs(self, configA, configB, allarch=False):
 
         self.write_config(configA)
         self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash")
@@ -404,6 +404,13 @@ BB_SIGNATURE_HANDLER = "OEBasicHash"
         self.maxDiff = None
         self.assertEqual(files1, files2)
 
+        if allarch:
+            allarchdir = os.path.basename(glob.glob(self.topdir + "/tmp-sstatesamehash/stamps/all-*-linux")[0])
+
+            files1 = get_files(self.topdir + "/tmp-sstatesamehash/stamps/" + allarchdir)
+            files2 = get_files(self.topdir + "/tmp-sstatesamehash2/stamps/" + allarchdir)
+            self.assertEqual(files1, files2)
+
     def test_sstate_sametune_samesigs(self):
         """
         The sstate checksums of two identical machines (using the same tune) should be the