mirror of
https://git.yoctoproject.org/poky
synced 2026-04-21 03:32:12 +02:00
bitbake: tests/parse.py: Add testcase for addtask and deltask
(Bitbake rev: 4ac388646624e08bef848b560fa52deacf2ff4fb) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
e236735d45
commit
c761fb126d
@@ -187,3 +187,21 @@ python () {
|
||||
self.assertEqual(d1.getVar("VAR_var"), "B")
|
||||
self.assertEqual(d2.getVar("VAR_var"), None)
|
||||
|
||||
addtask_deltask = """
|
||||
addtask do_patch after do_foo after do_unpack before do_configure before do_compile
|
||||
addtask do_fetch do_patch
|
||||
|
||||
deltask do_fetch do_patch
|
||||
"""
|
||||
def test_parse_addtask_deltask(self):
|
||||
import sys
|
||||
f = self.parsehelper(self.addtask_deltask)
|
||||
d = bb.parse.handle(f.name, self.d)['']
|
||||
|
||||
stdout = sys.stdout.getvalue()
|
||||
self.assertTrue("addtask contained multiple 'before' keywords" in stdout)
|
||||
self.assertTrue("addtask contained multiple 'after' keywords" in stdout)
|
||||
self.assertTrue('addtask ignored: " do_patch"' in stdout)
|
||||
self.assertTrue('deltask ignored: " do_patch"' in stdout)
|
||||
self.assertTrue('dependent task do_foo does not exist' in stdout)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user