<div dir="ltr">On 4 August 2017 at 19:57, <span dir="ltr"><<a href="mailto:leonardo.sandoval.gonzalez@linux.intel.com" target="_blank">leonardo.sandoval.gonzalez@linux.intel.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">+ i_sigfile, max_sigfiles_to_compare = 0, 20<br>
for k in files1.keys() | files2.keys():<br>
if k in files1 and k in files2:<br>
+ i_sigfile += 1<br>
print("%s differs:" % k)<br>
+ # this is an expensive computation, thus just compare the first<br>
+ # 'max_sigfiles_to_compare' k files<br>
+ if i_sigfile > max_sigfiles_to_compare:<br>
+ continue<br>
sigdatafile1 = self.topdir + "/tmp-sstatesamehash/stamps/" + k + "." + files1[k]<br>
sigdatafile2 = self.topdir + "/tmp-sstatesamehash2/stamps/" + k + "." + files2[k]<br>
output = bb.siggen.compare_sigfiles(<wbr>sigdatafile1, sigdatafile2)<br></blockquote><div><br></div><div>A neater way to do this:</div><div><br></div><div>-for k in files1.keys() | files2.keys():</div>+for k in list(files1.keys() | files2.key())[:20];</div><div class="gmail_quote"><br></div><div class="gmail_quote">(take the union of the files1 and files2 keys, turn it into a list, and slice off up to the first 20)</div><div class="gmail_quote"><br></div><div class="gmail_quote">Ross</div></div></div>