diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-08-15 08:41:21 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-08-15 08:43:22 +0100 |
commit | a3c53bff11671f470b76caa2902642a3be9d086a (patch) | |
tree | 9eab995708143e853ff1df3130b2ea9e27ca35f5 /bitbake | |
parent | 209f89ab8ed51ac2867ca8f749336af1ee24ab25 (diff) | |
download | poky-a3c53bff11671f470b76caa2902642a3be9d086a.tar.gz |
bitbake: tests/runqueue: Fix tests
There were paths being accidentally included in some of the hashserv tests. Remove
that and update the hashes so the tests work independently of paths.
(Bitbake rev: 6ddb9f09cb60c2354fa6a67cce412c4dc1e7dc2d)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/tests/runqueue-tests/conf/bitbake.conf | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/tests/runqueue.py | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/bitbake/lib/bb/tests/runqueue-tests/conf/bitbake.conf b/bitbake/lib/bb/tests/runqueue-tests/conf/bitbake.conf index ab0f6bcfac..5e451fc2c0 100644 --- a/bitbake/lib/bb/tests/runqueue-tests/conf/bitbake.conf +++ b/bitbake/lib/bb/tests/runqueue-tests/conf/bitbake.conf | |||
@@ -11,6 +11,6 @@ STAMP = "${TMPDIR}/stamps/${PN}" | |||
11 | T = "${TMPDIR}/workdir/${PN}/temp" | 11 | T = "${TMPDIR}/workdir/${PN}/temp" |
12 | BB_NUMBER_THREADS = "4" | 12 | BB_NUMBER_THREADS = "4" |
13 | 13 | ||
14 | BB_HASHBASE_WHITELIST = "BB_CURRENT_MC BB_HASHSERVE TMPDIR TOPDIR SLOWTASKS SSTATEVALID" | 14 | BB_HASHBASE_WHITELIST = "BB_CURRENT_MC BB_HASHSERVE TMPDIR TOPDIR SLOWTASKS SSTATEVALID FILE" |
15 | 15 | ||
16 | include conf/multiconfig/${BB_CURRENT_MC}.conf | 16 | include conf/multiconfig/${BB_CURRENT_MC}.conf |
diff --git a/bitbake/lib/bb/tests/runqueue.py b/bitbake/lib/bb/tests/runqueue.py index 493516355d..c7f5e55726 100644 --- a/bitbake/lib/bb/tests/runqueue.py +++ b/bitbake/lib/bb/tests/runqueue.py | |||
@@ -37,6 +37,7 @@ class RunQueueTests(unittest.TestCase): | |||
37 | env["BB_ENV_EXTRAWHITE"] = env["BB_ENV_EXTRAWHITE"] + " " + k | 37 | env["BB_ENV_EXTRAWHITE"] = env["BB_ENV_EXTRAWHITE"] + " " + k |
38 | try: | 38 | try: |
39 | output = subprocess.check_output(cmd, env=env, stderr=subprocess.STDOUT,universal_newlines=True, cwd=builddir) | 39 | output = subprocess.check_output(cmd, env=env, stderr=subprocess.STDOUT,universal_newlines=True, cwd=builddir) |
40 | print(output) | ||
40 | except subprocess.CalledProcessError as e: | 41 | except subprocess.CalledProcessError as e: |
41 | self.fail("Command %s failed with %s" % (cmd, e.output)) | 42 | self.fail("Command %s failed with %s" % (cmd, e.output)) |
42 | tasks = [] | 43 | tasks = [] |
@@ -326,7 +327,7 @@ class RunQueueTests(unittest.TestCase): | |||
326 | with open(tempdir + "/stamps/b1.do_install.taint", "w") as f: | 327 | with open(tempdir + "/stamps/b1.do_install.taint", "w") as f: |
327 | f.write("ed36d46a-2977-458a-b3de-eef885bc1817") | 328 | f.write("ed36d46a-2977-458a-b3de-eef885bc1817") |
328 | cmd = ["bitbake", "e1"] | 329 | cmd = ["bitbake", "e1"] |
329 | sstatevalid = "e1:do_package:cb47e017ab549d87aab614c0f49dcf969ff6414745909094f0af7e657cedc657" | 330 | sstatevalid = "e1:do_package:685e69a026b2f029483fdefe6a11e1e06641dd2a0f6f86e27b9b550f8f21229d" |
330 | tasks = self.run_bitbakecmd(cmd, tempdir, sstatevalid, extraenv=extraenv, cleanup=True) | 331 | tasks = self.run_bitbakecmd(cmd, tempdir, sstatevalid, extraenv=extraenv, cleanup=True) |
331 | expected = ['a1:package', 'a1:install', 'b1:package', 'b1:install', 'a1:populate_sysroot', 'b1:populate_sysroot', | 332 | expected = ['a1:package', 'a1:install', 'b1:package', 'b1:install', 'a1:populate_sysroot', 'b1:populate_sysroot', |
332 | 'a1:package_write_ipk_setscene', 'b1:packagedata_setscene', 'b1:package_write_rpm_setscene', | 333 | 'a1:package_write_ipk_setscene', 'b1:packagedata_setscene', 'b1:package_write_rpm_setscene', |
@@ -354,7 +355,7 @@ class RunQueueTests(unittest.TestCase): | |||
354 | with open(tempdir + "/stamps/b1.do_install.taint", "w") as f: | 355 | with open(tempdir + "/stamps/b1.do_install.taint", "w") as f: |
355 | f.write("ed36d46a-2977-458a-b3de-eef885bc1817") | 356 | f.write("ed36d46a-2977-458a-b3de-eef885bc1817") |
356 | cmd = ["bitbake", "e1"] | 357 | cmd = ["bitbake", "e1"] |
357 | sstatevalid = "e1:do_package:cb47e017ab549d87aab614c0f49dcf969ff6414745909094f0af7e657cedc657 e1:do_populate_sysroot:aa6a915229f04af429d3c6c59c303516c500650b7c48da8e07b20a53acd86c5f" | 358 | sstatevalid = "e1:do_package:685e69a026b2f029483fdefe6a11e1e06641dd2a0f6f86e27b9b550f8f21229d e1:do_populate_sysroot:ef7dc0e2dd55d0534e75cba50731ff42f949818b6f29a65d72bc05856e56711d" |
358 | tasks = self.run_bitbakecmd(cmd, tempdir, sstatevalid, extraenv=extraenv, cleanup=True) | 359 | tasks = self.run_bitbakecmd(cmd, tempdir, sstatevalid, extraenv=extraenv, cleanup=True) |
359 | expected = ['a1:package', 'a1:install', 'b1:package', 'b1:install', 'a1:populate_sysroot', 'b1:populate_sysroot', | 360 | expected = ['a1:package', 'a1:install', 'b1:package', 'b1:install', 'a1:populate_sysroot', 'b1:populate_sysroot', |
360 | 'a1:package_write_ipk_setscene', 'b1:packagedata_setscene', 'b1:package_write_rpm_setscene', | 361 | 'a1:package_write_ipk_setscene', 'b1:packagedata_setscene', 'b1:package_write_rpm_setscene', |
@@ -362,7 +363,6 @@ class RunQueueTests(unittest.TestCase): | |||
362 | 'e1:package_setscene', 'e1:populate_sysroot_setscene', 'e1:build', 'e1:package_qa', 'e1:package_write_rpm', 'e1:package_write_ipk', 'e1:packagedata'] | 363 | 'e1:package_setscene', 'e1:populate_sysroot_setscene', 'e1:build', 'e1:package_qa', 'e1:package_write_rpm', 'e1:package_write_ipk', 'e1:packagedata'] |
363 | self.assertEqual(set(tasks), set(expected)) | 364 | self.assertEqual(set(tasks), set(expected)) |
364 | 365 | ||
365 | |||
366 | def test_hashserv_partial_match3(self): | 366 | def test_hashserv_partial_match3(self): |
367 | # e1:do_package is valid for a1 but not after b1 | 367 | # e1:do_package is valid for a1 but not after b1 |
368 | # In former buggy code, this triggered e1:do_fetch, then e1:do_populate_sysroot to run | 368 | # In former buggy code, this triggered e1:do_fetch, then e1:do_populate_sysroot to run |
@@ -384,7 +384,7 @@ class RunQueueTests(unittest.TestCase): | |||
384 | with open(tempdir + "/stamps/b1.do_install.taint", "w") as f: | 384 | with open(tempdir + "/stamps/b1.do_install.taint", "w") as f: |
385 | f.write("ed36d46a-2977-458a-b3de-eef885bc1817") | 385 | f.write("ed36d46a-2977-458a-b3de-eef885bc1817") |
386 | cmd = ["bitbake", "e1", "-DD"] | 386 | cmd = ["bitbake", "e1", "-DD"] |
387 | sstatevalid = "e1:do_package:f9aa46d63cb63d70a09712b6bc7fab57e4966cf8e8b52ff5ad1ba23823aec7d4 e1:do_package:b710f6312ffed900b4b2761cc05538645f4ff3e7e0b70d688c70c0f3bcc2e1a2" | 387 | sstatevalid = "e1:do_package:af056eae12a733a6a8c4f4da8c6757e588e13565852c94e2aad4d953a3989c13 e1:do_package:a3677703db82b22d28d57c1820a47851dd780104580863f5bd32e66e003a779d" |
388 | tasks = self.run_bitbakecmd(cmd, tempdir, sstatevalid, extraenv=extraenv, cleanup=True, slowtasks="e1:fetch b1:install") | 388 | tasks = self.run_bitbakecmd(cmd, tempdir, sstatevalid, extraenv=extraenv, cleanup=True, slowtasks="e1:fetch b1:install") |
389 | expected = ['a1:package', 'a1:install', 'b1:package', 'b1:install', 'a1:populate_sysroot', 'b1:populate_sysroot', | 389 | expected = ['a1:package', 'a1:install', 'b1:package', 'b1:install', 'a1:populate_sysroot', 'b1:populate_sysroot', |
390 | 'a1:package_write_ipk_setscene', 'b1:packagedata_setscene', 'b1:package_write_rpm_setscene', | 390 | 'a1:package_write_ipk_setscene', 'b1:packagedata_setscene', 'b1:package_write_rpm_setscene', |