mirror of
https://git.yoctoproject.org/poky
synced 2026-04-26 00:32:12 +02:00
bitbake: tests/runqueue: Add hashserv+runqueue test
Add a test which tests the runqueue adaptations for hash equivalency. (Bitbake rev: 477321d0780df177c1582db119c2bb6795912fc6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -5,7 +5,8 @@ def stamptask(d):
|
||||
import time
|
||||
|
||||
thistask = d.expand("${PN}:${BB_CURRENTTASK}")
|
||||
with open(d.expand("${TOPDIR}/%s.run") % thistask, "a+") as f:
|
||||
stampname = d.expand("${TOPDIR}/%s.run" % thistask)
|
||||
with open(stampname, "a+") as f:
|
||||
f.write("\n")
|
||||
|
||||
if d.getVar("BB_CURRENT_MC") != "default":
|
||||
@@ -13,10 +14,21 @@ def stamptask(d):
|
||||
if thistask in d.getVar("SLOWTASKS").split():
|
||||
bb.note("Slowing task %s" % thistask)
|
||||
time.sleep(0.5)
|
||||
if d.getVar("BB_HASHSERVE"):
|
||||
task = d.getVar("BB_CURRENTTASK")
|
||||
if task in ['package', 'package_qa', 'packagedata', 'package_write_ipk', 'package_write_rpm', 'populate_lic', 'populate_sysroot']:
|
||||
bb.parse.siggen.report_unihash(os.getcwd(), d.getVar("BB_CURRENTTASK"), d)
|
||||
|
||||
with open(d.expand("${TOPDIR}/task.log"), "a+") as f:
|
||||
f.write(thistask + "\n")
|
||||
|
||||
|
||||
def sstate_output_hash(path, sigfile, task, d):
|
||||
import hashlib
|
||||
h = hashlib.sha256()
|
||||
h.update(d.expand("${PN}:${BB_CURRENTTASK}").encode('utf-8'))
|
||||
return h.hexdigest()
|
||||
|
||||
python do_fetch() {
|
||||
# fetch
|
||||
stamptask(d)
|
||||
|
||||
Reference in New Issue
Block a user