diff options
| author | Yoann Congal <yoann.congal@smile.fr> | 2024-11-05 23:42:13 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-11-05 22:45:17 +0000 |
| commit | b94b85bef0b6375be71be6002521e147906080e5 (patch) | |
| tree | 230ed084a003f55880df3f037046562df94e0c27 /meta/lib/oeqa | |
| parent | f0d224b921b36e4c9e4f4b1247a688823e307964 (diff) | |
| download | poky-b94b85bef0b6375be71be6002521e147906080e5.tar.gz | |
oeqa/selftest/reproducibility: restart bitbake for each build
Since [0], the reproducibility test tries to save logs of failed builds.
Using the memory persistent bitbake prevent this by concatenating logs in the
single persistent instance (See [YOCTO #15641]).
So, force a BitBake server restart for each build to ensure a new log
file is created.
This fixes this error (seen on AB [1]):
2024-11-02 08:16:00,816 - oe-selftest - ERROR - reproducibleA build failed. Trying to compute built packages differences but the test will fail.
2024-11-02 08:16:00,819 - oe-selftest - INFO - ... ERROR
2024-11-02 08:16:00,819 - oe-selftest - INFO - Traceback (most recent call last):
File "/srv/pokybuild/yocto-worker/reproducible-meta-oe/build/meta/lib/oeqa/selftest/cases/reproducible.py", line 321, in test_reproducible_builds
self.copy_file(variables["BB_CONSOLELOG"], os.path.join(save_dir, "bitbake-%s.log" % name))
File "/srv/pokybuild/yocto-worker/reproducible-meta-oe/build/meta/lib/oeqa/selftest/cases/reproducible.py", line 216, in copy_file
shutil.copyfile(source, dest)
File "/usr/lib/python3.11/shutil.py", line 256, in copyfile
with open(src, 'rb') as fsrc:
^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/srv/pokybuild/yocto-worker/reproducible-meta-oe/build/build/build-st-meta-python/build-st/tmp/log/cooker/qemux86-64/20241102071141.log'
[0]: https://git.openembedded.org/openembedded-core/commit/?id=c78cc753843d4199443052e8deb0c9c3b7e4b580
[1]: https://valkyrie.yoctoproject.org/#/builders/87/builds/17/steps/40/logs/stdio
(From OE-Core rev: e89bbc00ba16574d719b199c01ffbf37646f4f54)
Signed-off-by: Yoann Congal <yoann.congal@smile.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa')
| -rw-r--r-- | meta/lib/oeqa/selftest/cases/reproducible.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/reproducible.py b/meta/lib/oeqa/selftest/cases/reproducible.py index a68f72ff23..415a1ef577 100644 --- a/meta/lib/oeqa/selftest/cases/reproducible.py +++ b/meta/lib/oeqa/selftest/cases/reproducible.py | |||
| @@ -239,6 +239,10 @@ class ReproducibleTests(OESelftestTestCase): | |||
| 239 | capture_vars.append("BB_CONSOLELOG") | 239 | capture_vars.append("BB_CONSOLELOG") |
| 240 | config += 'BB_CONSOLELOG = "${LOG_DIR}/cooker/${MACHINE}/console.log"\n' | 240 | config += 'BB_CONSOLELOG = "${LOG_DIR}/cooker/${MACHINE}/console.log"\n' |
| 241 | 241 | ||
| 242 | # We want different log files for each build, but a persistent bitbake | ||
| 243 | # may reuse the previous log file so restart the bitbake server. | ||
| 244 | bitbake("--kill-server") | ||
| 245 | |||
| 242 | bitbake_failure_count = 0 | 246 | bitbake_failure_count = 0 |
| 243 | if not use_sstate: | 247 | if not use_sstate: |
| 244 | if self.sstate_targets: | 248 | if self.sstate_targets: |
