diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-07-01 11:09:09 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-07-21 16:57:43 +0100 |
commit | acce65abb98529be15748892480d4c24396556f2 (patch) | |
tree | 2536b5509c6004dc6fce2bc9c100af23598738ca /bitbake/lib/bb/tests | |
parent | 0aff94023f931a84d21069d92522e0f5338f09a4 (diff) | |
download | poky-acce65abb98529be15748892480d4c24396556f2.tar.gz |
bitbake: build: Allow deltask to take multiple tasknames
deltask currently supports only one task to delete but it would be useful
if it could support a variable which gets expanded to allow flexibility
in the metadata.
This is simple to support in bitbake and is how other directives such
as inherit operate so adjust the parser/code to handle that. It means
that syntax like:
EXTRA_NOPACKAGE_DELTASKS = ""
deltask ${EXTRA_NOPACKAGE_DELTASKS}
is now allowed.
(Bitbake rev: 883d926120833c85a16dcf60425dd7af7699046a)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/tests')
-rw-r--r-- | bitbake/lib/bb/tests/parse.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bitbake/lib/bb/tests/parse.py b/bitbake/lib/bb/tests/parse.py index 9afd1b208e..9e21e18425 100644 --- a/bitbake/lib/bb/tests/parse.py +++ b/bitbake/lib/bb/tests/parse.py | |||
@@ -178,7 +178,10 @@ python () { | |||
178 | addtask do_patch after do_foo after do_unpack before do_configure before do_compile | 178 | addtask do_patch after do_foo after do_unpack before do_configure before do_compile |
179 | addtask do_fetch do_patch | 179 | addtask do_fetch do_patch |
180 | 180 | ||
181 | deltask do_fetch do_patch | 181 | MYVAR = "do_patch" |
182 | EMPTYVAR = "" | ||
183 | deltask do_fetch ${MYVAR} ${EMPTYVAR} | ||
184 | deltask ${EMPTYVAR} | ||
182 | """ | 185 | """ |
183 | def test_parse_addtask_deltask(self): | 186 | def test_parse_addtask_deltask(self): |
184 | import sys | 187 | import sys |
@@ -189,6 +192,5 @@ deltask do_fetch do_patch | |||
189 | self.assertTrue("addtask contained multiple 'before' keywords" in stdout) | 192 | self.assertTrue("addtask contained multiple 'before' keywords" in stdout) |
190 | self.assertTrue("addtask contained multiple 'after' keywords" in stdout) | 193 | self.assertTrue("addtask contained multiple 'after' keywords" in stdout) |
191 | self.assertTrue('addtask ignored: " do_patch"' in stdout) | 194 | self.assertTrue('addtask ignored: " do_patch"' in stdout) |
192 | self.assertTrue('deltask ignored: " do_patch"' in stdout) | ||
193 | #self.assertTrue('dependent task do_foo for do_patch does not exist' in stdout) | 195 | #self.assertTrue('dependent task do_foo for do_patch does not exist' in stdout) |
194 | 196 | ||