summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/tests/parse.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/tests/parse.py')
-rw-r--r--bitbake/lib/bb/tests/parse.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/bitbake/lib/bb/tests/parse.py b/bitbake/lib/bb/tests/parse.py
index 1bc47405d9..4467d17997 100644
--- a/bitbake/lib/bb/tests/parse.py
+++ b/bitbake/lib/bb/tests/parse.py
@@ -187,3 +187,21 @@ python () {
187 self.assertEqual(d1.getVar("VAR_var"), "B") 187 self.assertEqual(d1.getVar("VAR_var"), "B")
188 self.assertEqual(d2.getVar("VAR_var"), None) 188 self.assertEqual(d2.getVar("VAR_var"), None)
189 189
190 addtask_deltask = """
191addtask do_patch after do_foo after do_unpack before do_configure before do_compile
192addtask do_fetch do_patch
193
194deltask do_fetch do_patch
195"""
196 def test_parse_addtask_deltask(self):
197 import sys
198 f = self.parsehelper(self.addtask_deltask)
199 d = bb.parse.handle(f.name, self.d)['']
200
201 stdout = sys.stdout.getvalue()
202 self.assertTrue("addtask contained multiple 'before' keywords" in stdout)
203 self.assertTrue("addtask contained multiple 'after' keywords" in stdout)
204 self.assertTrue('addtask ignored: " do_patch"' in stdout)
205 self.assertTrue('deltask ignored: " do_patch"' in stdout)
206 self.assertTrue('dependent task do_foo does not exist' in stdout)
207