Bug 15734

Summary: reproducible test fails on a local.conf without a newline at End-Of-File
Product: [QA/Testing] Functional (self) Testing Reporter: Yoann Congal <yoann.congal>
Component: oe-selftestAssignee: Christos Gavros <gavrosc>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: gavrosc, randy.macleod, richard.purdie
Version: unspecified   
Target Milestone: 5.2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Yoann Congal 2025-02-05 11:07:09 UTC
How to reproduce (Note that the printf does not add a newline at EOF) :
  printf 'OEQA_REPRODUCIBLE_TEST_TARGET = "bash"' >> conf/local.conf
  oe-selftest -r reproducible.ReproducibleTests

This fails because the generated build-st/conf/local.conf used by the reproducible test ends with:
  OEQA_REPRODUCIBLE_TEST_TARGET = "bash"SSTATE_DIR ?= "/home/yocon/yocto/sstate-cache"
  
  #include added by oe-selftest
  include machine.inc
  include selftest.inc

To fix this: "oe-selftest -r reproducible.ReproducibleTests" needs to add a newline before adding lines. But beware, we don't want too much of double spaced variables.
Comment 1 Richard Purdie 2025-02-06 15:39:56 UTC
I suspect we should just ensure we always add entries with a newline at the end
Comment 2 Christos Gavros 2025-02-27 12:09:15 UTC
The patch is merged in the master:

https://git.openembedded.org/openembedded-core/commit/?id=d2fcd9e880126bc33be2ef14e678cc1aa72683c3