1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-01 13:09:50 +00:00

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>
This commit is contained in:
Richard Purdie
2024-08-12 15:54:46 +01:00
parent 5226f46342
commit 997b11a5a1
2 changed files with 14 additions and 5 deletions
+5 -1
View File
@@ -188,6 +188,9 @@ addtask do_mytask3
deltask do_mytask3# comment
deltask do_mytask4 # comment2
# Ensure a missing task prefix on after works
addtask do_mytask5 after mytask
MYVAR = "do_patch"
EMPTYVAR = ""
deltask do_fetch ${MYVAR} ${EMPTYVAR}
@@ -198,7 +201,8 @@ deltask ${EMPTYVAR}
f = self.parsehelper(self.addtask_deltask)
d = bb.parse.handle(f.name, self.d)['']
self.assertEqual(['do_fetch2', 'do_patch2', 'do_myplaintask', 'do_mytask', 'do_mytask2'], d.getVar("__BBTASKS"))
self.assertEqual(['do_fetch2', 'do_patch2', 'do_myplaintask', 'do_mytask', 'do_mytask2', 'do_mytask5'], d.getVar("__BBTASKS"))
self.assertEqual(['do_mytask'], d.getVarFlag("do_mytask5", "deps"))
broken_multiline_comment = """
# First line of comment \\