diff options
-rw-r--r-- | meta/lib/oeqa/selftest/cases/reproducible.py | 10 |
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 fce48a2943..35ad0009a8 100644 --- a/meta/lib/oeqa/selftest/cases/reproducible.py +++ b/meta/lib/oeqa/selftest/cases/reproducible.py | |||
@@ -105,8 +105,9 @@ def compare_file(reference, test, diffutils_sysroot): | |||
105 | result.status = SAME | 105 | result.status = SAME |
106 | return result | 106 | return result |
107 | 107 | ||
108 | def run_diffoscope(a_dir, b_dir, html_dir, **kwargs): | 108 | def run_diffoscope(a_dir, b_dir, html_dir, max_report_size=0, **kwargs): |
109 | return runCmd(['diffoscope', '--no-default-limits', '--exclude-directory-metadata', 'yes', '--html-dir', html_dir, a_dir, b_dir], | 109 | return runCmd(['diffoscope', '--no-default-limits', '--max-report-size', str(max_report_size), |
110 | '--exclude-directory-metadata', 'yes', '--html-dir', html_dir, a_dir, b_dir], | ||
110 | **kwargs) | 111 | **kwargs) |
111 | 112 | ||
112 | class DiffoscopeTests(OESelftestTestCase): | 113 | class DiffoscopeTests(OESelftestTestCase): |
@@ -136,6 +137,9 @@ class ReproducibleTests(OESelftestTestCase): | |||
136 | 137 | ||
137 | package_classes = ['deb', 'ipk', 'rpm'] | 138 | package_classes = ['deb', 'ipk', 'rpm'] |
138 | 139 | ||
140 | # Maximum report size, in bytes | ||
141 | max_report_size = 250 * 1024 * 1024 | ||
142 | |||
139 | # targets are the things we want to test the reproducibility of | 143 | # targets are the things we want to test the reproducibility of |
140 | targets = ['core-image-minimal', 'core-image-sato', 'core-image-full-cmdline', 'core-image-weston', 'world'] | 144 | targets = ['core-image-minimal', 'core-image-sato', 'core-image-full-cmdline', 'core-image-weston', 'world'] |
141 | # sstate targets are things to pull from sstate to potentially cut build/debugging time | 145 | # sstate targets are things to pull from sstate to potentially cut build/debugging time |
@@ -311,7 +315,7 @@ class ReproducibleTests(OESelftestTestCase): | |||
311 | # Copy jquery to improve the diffoscope output usability | 315 | # Copy jquery to improve the diffoscope output usability |
312 | self.copy_file(os.path.join(jquery_sysroot, 'usr/share/javascript/jquery/jquery.min.js'), os.path.join(package_html_dir, 'jquery.js')) | 316 | self.copy_file(os.path.join(jquery_sysroot, 'usr/share/javascript/jquery/jquery.min.js'), os.path.join(package_html_dir, 'jquery.js')) |
313 | 317 | ||
314 | run_diffoscope('reproducibleA', 'reproducibleB', package_html_dir, | 318 | run_diffoscope('reproducibleA', 'reproducibleB', package_html_dir, max_report_size=self.max_report_size, |
315 | native_sysroot=diffoscope_sysroot, ignore_status=True, cwd=package_dir) | 319 | native_sysroot=diffoscope_sysroot, ignore_status=True, cwd=package_dir) |
316 | 320 | ||
317 | if fails: | 321 | if fails: |