summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorJoshua Watt <jpewhacker@gmail.com>2019-08-27 14:33:45 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-08-30 17:10:28 +0100
commit8282ec4bd084b95b5ed21236e7029981a8cc254e (patch)
treee10b3c96f8dc9858c931bcb7d83a078834a0b50f /meta/lib
parent4e1ea3e9c9d6680c008b362f8e767c206bd0290d (diff)
downloadopenembedded-core-contrib-8282ec4bd084b95b5ed21236e7029981a8cc254e.tar.gz
oeqa: reproducible: Cleanup reproducible build
Cleans up the output from the reproducible build before building to ensure consistent results. Note that the output put is purposely left after around after the build so that non-reproducible packages can be diffed. (From OE-Core rev: f67bb34c8e7950779920b696f8502dbaed9eded5) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/selftest/cases/reproducible.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/meta/lib/oeqa/selftest/cases/reproducible.py b/meta/lib/oeqa/selftest/cases/reproducible.py
index 6dc83d2847..74d94fb20d 100644
--- a/meta/lib/oeqa/selftest/cases/reproducible.py
+++ b/meta/lib/oeqa/selftest/cases/reproducible.py
@@ -132,16 +132,23 @@ class ReproducibleTests(OESelftestTestCase):
bitbake("diffutils-native -c addto_recipe_sysroot")
diffutils_sysroot = get_bb_var("RECIPE_SYSROOT_NATIVE", "diffutils-native")
+ reproducible_tmp = os.path.join(self.topdir, 'reproducible', 'tmp')
+ if os.path.exists(reproducible_tmp):
+ bb.utils.remove(reproducible_tmp)
+
# Perform another build. This build should *not* share sstate or pull
# from any mirrors, but sharing a DL_DIR is fine
- self.write_config(textwrap.dedent('''\
- TMPDIR = "${TOPDIR}/reproducible/tmp"
+ self.write_config((textwrap.dedent('''\
+ TMPDIR = "%s"
SSTATE_DIR = "${TMPDIR}/sstate"
SSTATE_MIRROR = ""
- ''') + common_config)
+ ''') % reproducible_tmp) + common_config)
vars_test = get_bb_vars(capture_vars)
bitbake(' '.join(self.images))
+ # NOTE: The temp directory from the reproducible build is purposely
+ # kept after the build so it can be diffed for debugging.
+
for c in self.package_classes:
package_class = 'package_' + c