Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH v3 1/2] sstatetests: Use python function instead of bitbake-diffsigs script
@ 2017-08-07 21:33 leonardo.sandoval.gonzalez
  2017-08-07 21:33 ` [PATCH v3 2/2] sstatetests: limit the number of signature comparisons when differ leonardo.sandoval.gonzalez
  0 siblings, 1 reply; 4+ messages in thread
From: leonardo.sandoval.gonzalez @ 2017-08-07 21:33 UTC (permalink / raw)
  To: openembedded-core

From: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>

Using a python function instead of launching a subprocess fasten the
diffsigs computation.

[YOCTO #11651]

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
---
 meta/lib/oeqa/selftest/cases/sstatetests.py | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/meta/lib/oeqa/selftest/cases/sstatetests.py b/meta/lib/oeqa/selftest/cases/sstatetests.py
index 07a206824a..0b36027918 100644
--- a/meta/lib/oeqa/selftest/cases/sstatetests.py
+++ b/meta/lib/oeqa/selftest/cases/sstatetests.py
@@ -8,6 +8,8 @@ from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_test_layer
 from oeqa.selftest.cases.sstate import SStateBase
 from oeqa.core.decorator.oeid import OETestID
 
+import bb.siggen
+
 class SStateTests(SStateBase):
 
     # Test sstate files creation and their location
@@ -469,9 +471,11 @@ http_proxy = "http://example.com/"
         for k in files1.keys() | files2.keys():
             if k in files1 and k in files2:
                 print("%s differs:" % k)
-                print(subprocess.check_output(("bitbake-diffsigs",
-                                               self.topdir + "/tmp-sstatesamehash/stamps/" + k + "." + files1[k],
-                                               self.topdir + "/tmp-sstatesamehash2/stamps/" + k + "." + files2[k])))
+                sigdatafile1 = self.topdir + "/tmp-sstatesamehash/stamps/" + k + "." + files1[k]
+                sigdatafile2 = self.topdir + "/tmp-sstatesamehash2/stamps/" + k + "." + files2[k]
+                output = bb.siggen.compare_sigfiles(sigdatafile1, sigdatafile2)
+                if output:
+                    print('\n'.join(output))
             elif k in files1 and k not in files2:
                 print("%s in files1" % k)
             elif k not in files1 and k in files2:
-- 
2.12.3



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

end of thread, other threads:[~2017-08-08 16:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-07 21:33 [PATCH v3 1/2] sstatetests: Use python function instead of bitbake-diffsigs script leonardo.sandoval.gonzalez
2017-08-07 21:33 ` [PATCH v3 2/2] sstatetests: limit the number of signature comparisons when differ leonardo.sandoval.gonzalez
2017-08-08 14:40   ` Burton, Ross
2017-08-08 16:34     ` Leonardo Sandoval

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