summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases/reproducible.py
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 17:10:28 +0100
commit569687083f0f95150da3ccd41a783539d6e2f581 (patch)
treea8772fd298cc98f3f2fcafbf39db87a74ec4f52d /meta/lib/oeqa/selftest/cases/reproducible.py
parent8282ec4bd084b95b5ed21236e7029981a8cc254e (diff)
downloadpoky-569687083f0f95150da3ccd41a783539d6e2f581.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. (From OE-Core rev: f0095e6c1b915e1e6ded111f4bf77fff0362e29a) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/reproducible.py')
-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):
134 134
135 reproducible_tmp = os.path.join(self.topdir, 'reproducible', 'tmp') 135 reproducible_tmp = os.path.join(self.topdir, 'reproducible', 'tmp')
136 if os.path.exists(reproducible_tmp): 136 if os.path.exists(reproducible_tmp):
137 bb.utils.remove(reproducible_tmp) 137 bb.utils.remove(reproducible_tmp, recurse=True)
138 138
139 # Perform another build. This build should *not* share sstate or pull 139 # Perform another build. This build should *not* share sstate or pull
140 # from any mirrors, but sharing a DL_DIR is fine 140 # from any mirrors, but sharing a DL_DIR is fine
@@ -150,18 +150,19 @@ class ReproducibleTests(OESelftestTestCase):
150 # kept after the build so it can be diffed for debugging. 150 # kept after the build so it can be diffed for debugging.
151 151
152 for c in self.package_classes: 152 for c in self.package_classes:
153 package_class = 'package_' + c 153 with self.subTest(package_class=c):
154 package_class = 'package_' + c
154 155
155 deploy_reference = vars_reference['DEPLOY_DIR_' + c.upper()] 156 deploy_reference = vars_reference['DEPLOY_DIR_' + c.upper()]
156 deploy_test = vars_test['DEPLOY_DIR_' + c.upper()] 157 deploy_test = vars_test['DEPLOY_DIR_' + c.upper()]
157 158
158 result = self.compare_packages(deploy_reference, deploy_test, diffutils_sysroot) 159 result = self.compare_packages(deploy_reference, deploy_test, diffutils_sysroot)
159 160
160 self.logger.info('Reproducibility summary for %s: %s' % (c, result)) 161 self.logger.info('Reproducibility summary for %s: %s' % (c, result))
161 162
162 self.append_to_log('\n'.join("%s: %s" % (r.status, r.test) for r in result.total)) 163 self.append_to_log('\n'.join("%s: %s" % (r.status, r.test) for r in result.total))
163 164
164 if result.missing or result.different: 165 if result.missing or result.different:
165 self.fail("The following %s packages are missing or different: %s" % 166 self.fail("The following %s packages are missing or different: %s" %
166 (c, ' '.join(r.test for r in (result.missing + result.different)))) 167 (c, ' '.join(r.test for r in (result.missing + result.different))))
167 168