summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Watt <jpewhacker@gmail.com>2019-08-27 14:33:46 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-08-30 13:37:42 +0100
commitf0095e6c1b915e1e6ded111f4bf77fff0362e29a (patch)
tree91d9e52730e546214279226750286f1400f72167
parentf67bb34c8e7950779920b696f8502dbaed9eded5 (diff)
downloadopenembedded-core-contrib-f0095e6c1b915e1e6ded111f4bf77fff0362e29a.tar.gz
oeqa: reproducible: Use subTest for packages
Runs each package class reproducibility test in a separate sub-test. This allows the other sub tests to still run in the event that one fails. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oeqa/selftest/cases/reproducible.py21
1 files changed, 11 insertions, 10 deletions
diff --git a/meta/lib/oeqa/selftest/cases/reproducible.py b/meta/lib/oeqa/selftest/cases/reproducible.py
index 74d94fb20d..2b8b4e9e88 100644
--- a/meta/lib/oeqa/selftest/cases/reproducible.py
+++ b/meta/lib/oeqa/selftest/cases/reproducible.py
@@ -134,7 +134,7 @@ class ReproducibleTests(OESelftestTestCase):
reproducible_tmp = os.path.join(self.topdir, 'reproducible', 'tmp')
if os.path.exists(reproducible_tmp):
- bb.utils.remove(reproducible_tmp)
+ bb.utils.remove(reproducible_tmp, recurse=True)
# Perform another build. This build should *not* share sstate or pull
# from any mirrors, but sharing a DL_DIR is fine
@@ -150,18 +150,19 @@ class ReproducibleTests(OESelftestTestCase):
# kept after the build so it can be diffed for debugging.
for c in self.package_classes:
- package_class = 'package_' + c
+ with self.subTest(package_class=c):
+ package_class = 'package_' + c
- deploy_reference = vars_reference['DEPLOY_DIR_' + c.upper()]
- deploy_test = vars_test['DEPLOY_DIR_' + c.upper()]
+ deploy_reference = vars_reference['DEPLOY_DIR_' + c.upper()]
+ deploy_test = vars_test['DEPLOY_DIR_' + c.upper()]
- result = self.compare_packages(deploy_reference, deploy_test, diffutils_sysroot)
+ result = self.compare_packages(deploy_reference, deploy_test, diffutils_sysroot)
- self.logger.info('Reproducibility summary for %s: %s' % (c, result))
+ self.logger.info('Reproducibility summary for %s: %s' % (c, result))
- self.append_to_log('\n'.join("%s: %s" % (r.status, r.test) for r in result.total))
+ self.append_to_log('\n'.join("%s: %s" % (r.status, r.test) for r in result.total))
- if result.missing or result.different:
- self.fail("The following %s packages are missing or different: %s" %
- (c, ' '.join(r.test for r in (result.missing + result.different))))
+ if result.missing or result.different:
+ self.fail("The following %s packages are missing or different: %s" %
+ (c, ' '.join(r.test for r in (result.missing + result.different))))