summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/tests/parse.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2024-08-12 15:54:46 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-08-13 15:47:55 +0100
commit997b11a5a12fec2bf43c431052f431edc51c8fe6 (patch)
tree61aefb8b01c2169790a78daa93e96b6aadd96b1d /bitbake/lib/bb/tests/parse.py
parent5226f46342cae47cb96fafb725dc082ef206f9e8 (diff)
downloadpoky-997b11a5a12fec2bf43c431052f431edc51c8fe6.tar.gz
bitbake: build: Ensure addtask before/after tasknames have prefix applied
"addtask do_XXX before YYY after ZZZ " where YYY or ZZZ is missing the "do_" prefix don't work as expected. Ajust the code so that it doesn't just silently do the wrong thing but works as expected. Expand a test case to cover this. (Bitbake rev: 21670b9bb8936ec44aedff26163948bbc2ceb44a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/tests/parse.py')
-rw-r--r--bitbake/lib/bb/tests/parse.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/bitbake/lib/bb/tests/parse.py b/bitbake/lib/bb/tests/parse.py
index 97df2c4590..410679d5a1 100644
--- a/bitbake/lib/bb/tests/parse.py
+++ b/bitbake/lib/bb/tests/parse.py
@@ -188,6 +188,9 @@ addtask do_mytask3
188deltask do_mytask3# comment 188deltask do_mytask3# comment
189deltask do_mytask4 # comment2 189deltask do_mytask4 # comment2
190 190
191# Ensure a missing task prefix on after works
192addtask do_mytask5 after mytask
193
191MYVAR = "do_patch" 194MYVAR = "do_patch"
192EMPTYVAR = "" 195EMPTYVAR = ""
193deltask do_fetch ${MYVAR} ${EMPTYVAR} 196deltask do_fetch ${MYVAR} ${EMPTYVAR}
@@ -198,7 +201,8 @@ deltask ${EMPTYVAR}
198 f = self.parsehelper(self.addtask_deltask) 201 f = self.parsehelper(self.addtask_deltask)
199 d = bb.parse.handle(f.name, self.d)[''] 202 d = bb.parse.handle(f.name, self.d)['']
200 203
201 self.assertEqual(['do_fetch2', 'do_patch2', 'do_myplaintask', 'do_mytask', 'do_mytask2'], d.getVar("__BBTASKS")) 204 self.assertEqual(['do_fetch2', 'do_patch2', 'do_myplaintask', 'do_mytask', 'do_mytask2', 'do_mytask5'], d.getVar("__BBTASKS"))
205 self.assertEqual(['do_mytask'], d.getVarFlag("do_mytask5", "deps"))
202 206
203 broken_multiline_comment = """ 207 broken_multiline_comment = """
204# First line of comment \\ 208# First line of comment \\