summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases/reproducible.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/reproducible.py')
-rw-r--r--meta/lib/oeqa/selftest/cases/reproducible.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/meta/lib/oeqa/selftest/cases/reproducible.py b/meta/lib/oeqa/selftest/cases/reproducible.py
index a62757399b..546dc91120 100644
--- a/meta/lib/oeqa/selftest/cases/reproducible.py
+++ b/meta/lib/oeqa/selftest/cases/reproducible.py
@@ -114,8 +114,9 @@ def compare_file(reference, test, diffutils_sysroot):
114 result.status = SAME 114 result.status = SAME
115 return result 115 return result
116 116
117def run_diffoscope(a_dir, b_dir, html_dir, **kwargs): 117def run_diffoscope(a_dir, b_dir, html_dir, max_report_size=0, **kwargs):
118 return runCmd(['diffoscope', '--no-default-limits', '--exclude-directory-metadata', 'yes', '--html-dir', html_dir, a_dir, b_dir], 118 return runCmd(['diffoscope', '--no-default-limits', '--max-report-size', str(max_report_size),
119 '--exclude-directory-metadata', 'yes', '--html-dir', html_dir, a_dir, b_dir],
119 **kwargs) 120 **kwargs)
120 121
121class DiffoscopeTests(OESelftestTestCase): 122class DiffoscopeTests(OESelftestTestCase):
@@ -145,6 +146,9 @@ class ReproducibleTests(OESelftestTestCase):
145 146
146 package_classes = ['deb', 'ipk', 'rpm'] 147 package_classes = ['deb', 'ipk', 'rpm']
147 148
149 # Maximum report size, in bytes
150 max_report_size = 250 * 1024 * 1024
151
148 # targets are the things we want to test the reproducibility of 152 # targets are the things we want to test the reproducibility of
149 targets = ['core-image-minimal', 'core-image-sato', 'core-image-full-cmdline', 'core-image-weston', 'world'] 153 targets = ['core-image-minimal', 'core-image-sato', 'core-image-full-cmdline', 'core-image-weston', 'world']
150 # sstate targets are things to pull from sstate to potentially cut build/debugging time 154 # sstate targets are things to pull from sstate to potentially cut build/debugging time
@@ -321,7 +325,7 @@ class ReproducibleTests(OESelftestTestCase):
321 # Copy jquery to improve the diffoscope output usability 325 # Copy jquery to improve the diffoscope output usability
322 self.copy_file(os.path.join(jquery_sysroot, 'usr/share/javascript/jquery/jquery.min.js'), os.path.join(package_html_dir, 'jquery.js')) 326 self.copy_file(os.path.join(jquery_sysroot, 'usr/share/javascript/jquery/jquery.min.js'), os.path.join(package_html_dir, 'jquery.js'))
323 327
324 run_diffoscope('reproducibleA', 'reproducibleB', package_html_dir, 328 run_diffoscope('reproducibleA', 'reproducibleB', package_html_dir, max_report_size=self.max_report_size,
325 native_sysroot=diffoscope_sysroot, ignore_status=True, cwd=package_dir) 329 native_sysroot=diffoscope_sysroot, ignore_status=True, cwd=package_dir)
326 330
327 if fails: 331 if fails: