From: Yoann Congal Date: Tue, 5 Nov 2024 22:42:13 +0000 (+0100) Subject: oeqa/selftest/reproducibility: restart bitbake for each build X-Git-Tag: yocto-5.2~1419 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e89bbc00ba16574d719b199c01ffbf37646f4f54;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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 Signed-off-by: Yoann Congal Signed-off-by: Richard Purdie --- diff --git a/meta/lib/oeqa/selftest/cases/reproducible.py b/meta/lib/oeqa/selftest/cases/reproducible.py index a68f72ff239..415a1ef577e 100644 --- a/meta/lib/oeqa/selftest/cases/reproducible.py +++ b/meta/lib/oeqa/selftest/cases/reproducible.py @@ -239,6 +239,10 @@ class ReproducibleTests(OESelftestTestCase): capture_vars.append("BB_CONSOLELOG") config += 'BB_CONSOLELOG = "${LOG_DIR}/cooker/${MACHINE}/console.log"\n' + # We want different log files for each build, but a persistent bitbake + # may reuse the previous log file so restart the bitbake server. + bitbake("--kill-server") + bitbake_failure_count = 0 if not use_sstate: if self.sstate_targets: