diff mbox series

[13/16] oeqa/selftest/devtool: Don't nest the temp layer around the OE-Core copy

Message ID 20261130152704.3471590-13-richard.purdie@linuxfoundation.org
State New
Headers show
Series [01/16] bitbake/base: Implement RECIPE_HOSTTOOLS | expand

Commit Message

Richard Purdie Nov. 30, 2026, 3:27 p.m. UTC
test_devtool_update_recipe_local_files used the module's templayerdir as
a layer, but that directory also contains the copy of OE-Core used by the
tests, so the layers nested. Bitbake now detects that so use a separate
temporary directory for the layer.

AI-Generated: Uses Claude Opus 5.5
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/lib/oeqa/selftest/cases/devtool.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py
index 7d815534996..37b2482a136 100644
--- a/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/meta/lib/oeqa/selftest/cases/devtool.py
@@ -1661,7 +1661,11 @@  class DevtoolUpdateTests(DevtoolBase):
         self._check_repo_status(os.path.dirname(recipefile), expected_status)
         # Now try to update recipe in another layer, so first, clean it
         runCmd('cd %s; git clean -fd .; git checkout .' % os.path.dirname(recipefile))
-        # Create a temporary layer and add it to bblayers.conf
+        # Create a temporary layer and add it to bblayers.conf. This needs its
+        # own directory since the module's templayerdir contains the copy of
+        # OE-Core and layers can't nest.
+        templayerdir = tempfile.mkdtemp(prefix='devtoolqa')
+        self.track_for_cleanup(templayerdir)
         self._create_temp_layer(templayerdir, True, 'templayer')
         # Update recipe in templayer
         result = runCmd('devtool update-recipe %s -a %s' % (testrecipe, templayerdir))