diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-08-02 15:32:27 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-08-06 11:21:32 +0100 |
commit | fd79638046891fb5ab6091f7ef3e7ae6df12c39b (patch) | |
tree | 04a256b8a35158fbb1d90b6d4fbcb84cb2301066 /bitbake/lib/bb/tests/runqueue-tests/classes | |
parent | 347c2056022d21deea6e2e7359eca2b96c6f01fe (diff) | |
download | poky-fd79638046891fb5ab6091f7ef3e7ae6df12c39b.tar.gz |
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>
Diffstat (limited to 'bitbake/lib/bb/tests/runqueue-tests/classes')
-rw-r--r-- | bitbake/lib/bb/tests/runqueue-tests/classes/base.bbclass | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/bitbake/lib/bb/tests/runqueue-tests/classes/base.bbclass b/bitbake/lib/bb/tests/runqueue-tests/classes/base.bbclass index 3a0f151c9a..138edc3fa9 100644 --- a/bitbake/lib/bb/tests/runqueue-tests/classes/base.bbclass +++ b/bitbake/lib/bb/tests/runqueue-tests/classes/base.bbclass | |||
@@ -5,7 +5,8 @@ def stamptask(d): | |||
5 | import time | 5 | import time |
6 | 6 | ||
7 | thistask = d.expand("${PN}:${BB_CURRENTTASK}") | 7 | thistask = d.expand("${PN}:${BB_CURRENTTASK}") |
8 | with open(d.expand("${TOPDIR}/%s.run") % thistask, "a+") as f: | 8 | stampname = d.expand("${TOPDIR}/%s.run" % thistask) |
9 | with open(stampname, "a+") as f: | ||
9 | f.write("\n") | 10 | f.write("\n") |
10 | 11 | ||
11 | if d.getVar("BB_CURRENT_MC") != "default": | 12 | if d.getVar("BB_CURRENT_MC") != "default": |
@@ -13,10 +14,21 @@ def stamptask(d): | |||
13 | if thistask in d.getVar("SLOWTASKS").split(): | 14 | if thistask in d.getVar("SLOWTASKS").split(): |
14 | bb.note("Slowing task %s" % thistask) | 15 | bb.note("Slowing task %s" % thistask) |
15 | time.sleep(0.5) | 16 | time.sleep(0.5) |
17 | if d.getVar("BB_HASHSERVE"): | ||
18 | task = d.getVar("BB_CURRENTTASK") | ||
19 | if task in ['package', 'package_qa', 'packagedata', 'package_write_ipk', 'package_write_rpm', 'populate_lic', 'populate_sysroot']: | ||
20 | bb.parse.siggen.report_unihash(os.getcwd(), d.getVar("BB_CURRENTTASK"), d) | ||
16 | 21 | ||
17 | with open(d.expand("${TOPDIR}/task.log"), "a+") as f: | 22 | with open(d.expand("${TOPDIR}/task.log"), "a+") as f: |
18 | f.write(thistask + "\n") | 23 | f.write(thistask + "\n") |
19 | 24 | ||
25 | |||
26 | def sstate_output_hash(path, sigfile, task, d): | ||
27 | import hashlib | ||
28 | h = hashlib.sha256() | ||
29 | h.update(d.expand("${PN}:${BB_CURRENTTASK}").encode('utf-8')) | ||
30 | return h.hexdigest() | ||
31 | |||
20 | python do_fetch() { | 32 | python do_fetch() { |
21 | # fetch | 33 | # fetch |
22 | stamptask(d) | 34 | stamptask(d) |