]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
oeqa/selftest: also copy local changes from the 'scripts/' dir
authorChris Laplante <chris.laplante@agilent.com>
Wed, 29 Jan 2025 20:20:16 +0000 (15:20 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 1 Feb 2025 08:03:36 +0000 (08:03 +0000)
The 'devtool' cases make a copy of 'poky', but before this patch, that
only included modifications to the 'meta/' subdirectory.

It's very frustrating to make changes to scripts/ and have them be
silently ignored by oe-selftest.

Signed-off-by: Chris Laplante <chris.laplante@agilent.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
meta/lib/oeqa/selftest/cases/devtool.py

index fb9d7966eda91ab92c27bf502f8c4bb865566a45..e09e9755a3be38e9206548fa5589a5617cf83c9e 100644 (file)
@@ -64,11 +64,15 @@ def setUpModule():
             # under COREBASE and we don't want to copy that, so we have
             # to be selective.
             result = runCmd('git status --porcelain', cwd=oldreporoot)
+
+            # Also copy modifications to the 'scripts/' directory
+            canonical_layerpath_scripts = os.path.normpath(canonical_layerpath + "../scripts")
+
             for line in result.output.splitlines():
                 if line.startswith(' M ') or line.startswith('?? '):
                     relpth = line.split()[1]
                     pth = os.path.join(oldreporoot, relpth)
-                    if pth.startswith(canonical_layerpath):
+                    if pth.startswith(canonical_layerpath) or pth.startswith(canonical_layerpath_scripts):
                         if relpth.endswith('/'):
                             destdir = os.path.join(corecopydir, relpth)
                             # avoid race condition by not copying .pyc files YPBZ#13421,13803