diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-08-12 15:54:46 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-08-13 15:47:55 +0100 |
commit | 997b11a5a12fec2bf43c431052f431edc51c8fe6 (patch) | |
tree | 61aefb8b01c2169790a78daa93e96b6aadd96b1d /bitbake/lib/bb/tests/parse.py | |
parent | 5226f46342cae47cb96fafb725dc082ef206f9e8 (diff) | |
download | poky-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.py | 6 |
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 | |||
188 | deltask do_mytask3# comment | 188 | deltask do_mytask3# comment |
189 | deltask do_mytask4 # comment2 | 189 | deltask do_mytask4 # comment2 |
190 | 190 | ||
191 | # Ensure a missing task prefix on after works | ||
192 | addtask do_mytask5 after mytask | ||
193 | |||
191 | MYVAR = "do_patch" | 194 | MYVAR = "do_patch" |
192 | EMPTYVAR = "" | 195 | EMPTYVAR = "" |
193 | deltask do_fetch ${MYVAR} ${EMPTYVAR} | 196 | deltask 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 \\ |