@@ -9,10 +9,10 @@ BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS ?= " \
- ${TOPDIR}/../meta \
- ${TOPDIR}/../meta-isar \
- ${TOPDIR}/../meta-test \
+ ${TOPDIR}/##ISARROOT_RELATIVE##/meta \
+ ${TOPDIR}/##ISARROOT_RELATIVE##/meta-isar \
+ ${TOPDIR}/##ISARROOT_RELATIVE##/meta-test \
"
BBLAYERS_NON_REMOVABLE ?= " \
- ${TOPDIR}/../meta \
+ ${TOPDIR}/##ISARROOT_RELATIVE##/meta \
"
@@ -100,9 +100,10 @@ into your configuration please add entries to conf/bblayers.conf.
EOM
- # Put the abosolute path to the layers in bblayers.conf so we can run
- # bitbake without the init script after the first run
+ # Expand source-root placeholders so layers can be found independently
+ # of the build directory location.
sed -e "s|##ISARROOT##|$ISARROOT|g" \
+ -e "s|##ISARROOT_RELATIVE##|$(realpath --relative-to="$BUILDDIR" "$ISARROOT")|g" \
$ISARCORELAYERCONF > "$BUILDDIR/conf/bblayers.conf"
SHOWYPDOC=yes
fi
@@ -268,7 +268,7 @@ class CIBaseTest(CIBuilder):
os.makedirs(isar_sstate)
process.run(f"git --work-tree={isar_sstate} checkout HEAD -- .")
- self.init('../build-sstate', isar_dir=isar_sstate)
+ self.init('../build/build-sstate', isar_dir=isar_sstate)
self.configure(targets=image_target, sstate=True, sstate_dir='', **kwargs)
# Cleanup sstate and tmp before test
@@ -1571,7 +1571,7 @@ class SstateTest(CIBaseTest):
image_target = 'mc:qemuamd64-bullseye:isar-image-base'
package_target = 'mc:qemuamd64-bullseye:hello'
- self.init('build-sstate')
+ self.init('build/build-sstate')
self.perform_sstate_test(image_target, package_target)
In rootful mode, sbuild uses schroot and creates its overlay upperdir under TMPDIR. The test-container mounts /isar as an overlay, but bind-mounts /isar/build to its work directory. The sstate test placed its build outside that bind mount, so schroot could not use the upperdir. The test failed when running: scripts/run-tests.sh testsuite/citest.py:SstateTest.test_sstate \ -p rootless=0 --debug ERROR| E: 10mount: mount: /run/schroot/mount/isar-builder-...: fsconfig() failed: overlay: filesystem on /isar/build-sstate/tmp/schroot-overlay/isar-builder.../upper not supported as upperdir. This is fixed by moving the sstate build under /isar/build. Since this relocates TOPDIR, BBLAYER paths are generated relative to the build directory, so BitBake uses the relocated checkout. The SignatureTest still passes successfully with this change. Fixes: a00e0aa0afff ("testsuite: fix SignatureTest by avoiding absolute path in bblayers") Signed-off-by: Clara Kowalsky <clara.kowalsky@siemens.com> --- meta-test/conf/bblayers.conf.sample | 8 ++++---- scripts/isar-setup-builddir | 5 +++-- testsuite/cibase.py | 2 +- testsuite/citest.py | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-)