summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest
diff options
context:
space:
mode:
authorLeonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>2017-08-07 14:33:50 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-09 09:24:15 +0100
commitd97b2bdb0b468903a61041e163f203577b88986e (patch)
treed2852c45b1d205e96e9b0506f1a247d6d092a307 /meta/lib/oeqa/selftest
parentcb31b000767aa95ad0a177211271ab9bfc3b2fdb (diff)
downloadpoky-d97b2bdb0b468903a61041e163f203577b88986e.tar.gz
sstatetests: Use python function instead of bitbake-diffsigs script
Using a python function instead of launching a subprocess fasten the diffsigs computation. [YOCTO #11651] (From OE-Core rev: 5dd65cf50273519fa45bd056b9ff342d9984a382) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest')
-rw-r--r--meta/lib/oeqa/selftest/cases/sstatetests.py10
1 files 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
8from oeqa.selftest.cases.sstate import SStateBase 8from oeqa.selftest.cases.sstate import SStateBase
9from oeqa.core.decorator.oeid import OETestID 9from oeqa.core.decorator.oeid import OETestID
10 10
11import bb.siggen
12
11class SStateTests(SStateBase): 13class SStateTests(SStateBase):
12 14
13 # Test sstate files creation and their location 15 # Test sstate files creation and their location
@@ -469,9 +471,11 @@ http_proxy = "http://example.com/"
469 for k in files1.keys() | files2.keys(): 471 for k in files1.keys() | files2.keys():
470 if k in files1 and k in files2: 472 if k in files1 and k in files2:
471 print("%s differs:" % k) 473 print("%s differs:" % k)
472 print(subprocess.check_output(("bitbake-diffsigs", 474 sigdatafile1 = self.topdir + "/tmp-sstatesamehash/stamps/" + k + "." + files1[k]
473 self.topdir + "/tmp-sstatesamehash/stamps/" + k + "." + files1[k], 475 sigdatafile2 = self.topdir + "/tmp-sstatesamehash2/stamps/" + k + "." + files2[k]
474 self.topdir + "/tmp-sstatesamehash2/stamps/" + k + "." + files2[k]))) 476 output = bb.siggen.compare_sigfiles(sigdatafile1, sigdatafile2)
477 if output:
478 print('\n'.join(output))
475 elif k in files1 and k not in files2: 479 elif k in files1 and k not in files2:
476 print("%s in files1" % k) 480 print("%s in files1" % k)
477 elif k not in files1 and k in files2: 481 elif k not in files1 and k in files2: