oeqa/sefltest/devtool: improve assignment matching in _test_recipe_contents

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.

(From OE-Core rev: bee528f38d39ed1f91319201e8a99c0b65c9f975)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ross Burton 2025-06-27 14:48:49 +01:00 committed by Richard Purdie
parent 43434a79c0
commit ebfdda93b4

View 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('\\'):