]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
oeqa/sefltest/devtool: improve assignment matching in _test_recipe_contents
authorRoss Burton <ross.burton@arm.com>
Fri, 27 Jun 2025 13:48:49 +0000 (14:48 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 1 Jul 2025 07:47:23 +0000 (08:47 +0100)
This function assumed that all assignments are done with just "=".

However, being able to check += or ?= is also useful, so use a regex to
split the line and be more flexible about what an assignment operator
looks like.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/selftest/cases/devtool.py

index 74a7727cc00a3bf3ef5c892a1c1f74bfe9fedab4..05f228f03e7551f805774729b7da3d09cf1b3061 100644 (file)
@@ -154,7 +154,7 @@ class DevtoolTestCase(OESelftestTestCase):
                         value = invalue
                         invar = None
                 elif '=' in line:
-                    splitline = line.split('=', 1)
+                    splitline = re.split(r"[?+:]*=[+]?", line, 1)
                     var = splitline[0].rstrip()
                     value = splitline[1].strip().strip('"')
                     if value.endswith('\\'):