summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases/bblayers.py
diff options
context:
space:
mode:
authorAdrian Freihofer <adrian.freihofer@gmail.com>2024-02-10 14:15:57 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-02-13 13:51:41 +0000
commit7f2755daca55c0abdca9a9a2c01ddc21292a99d6 (patch)
tree58c619d8282af4bae6c0ef0b01285672c4b365ac /meta/lib/oeqa/selftest/cases/bblayers.py
parent66850944957c312d3acc361267536b1f4aa8474e (diff)
downloadpoky-7f2755daca55c0abdca9a9a2c01ddc21292a99d6.tar.gz
meta/lib/oeqa: python 3.12 regex
Python 3 interprets string literals as Unicode strings, and therefore \s is treated as an escaped Unicode character which is not correct. Declaring the RegEx pattern as a raw string instead of unicode is required for Python 3. (From OE-Core rev: 9002850f0c2e409d3bc629e36bb360b96326bb64) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/bblayers.py')
-rw-r--r--meta/lib/oeqa/selftest/cases/bblayers.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/lib/oeqa/selftest/cases/bblayers.py b/meta/lib/oeqa/selftest/cases/bblayers.py
index 8faa060234..2475a79468 100644
--- a/meta/lib/oeqa/selftest/cases/bblayers.py
+++ b/meta/lib/oeqa/selftest/cases/bblayers.py
@@ -54,7 +54,7 @@ class BitbakeLayers(OESelftestTestCase):
54 bb_file = os.path.join(testoutdir, recipe_path, recipe_file) 54 bb_file = os.path.join(testoutdir, recipe_path, recipe_file)
55 self.assertTrue(os.path.isfile(bb_file), msg = "Cannot find xcursor-transparent-theme_0.1.1.bb in the test_bitbakelayers_flatten local dir.") 55 self.assertTrue(os.path.isfile(bb_file), msg = "Cannot find xcursor-transparent-theme_0.1.1.bb in the test_bitbakelayers_flatten local dir.")
56 contents = ftools.read_file(bb_file) 56 contents = ftools.read_file(bb_file)
57 find_in_contents = re.search("##### bbappended from meta-selftest #####\n(.*\n)*include test_recipe.inc", contents) 57 find_in_contents = re.search(r"##### bbappended from meta-selftest #####\n(.*\n)*include test_recipe.inc", contents)
58 self.assertTrue(find_in_contents, msg = "Flattening layers did not work. bitbake-layers flatten output: %s" % result.output) 58 self.assertTrue(find_in_contents, msg = "Flattening layers did not work. bitbake-layers flatten output: %s" % result.output)
59 59
60 def test_bitbakelayers_add_remove(self): 60 def test_bitbakelayers_add_remove(self):