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.py15
1 files changed, 4 insertions, 11 deletions
diff --git a/bitbake/lib/bb/tests/parse.py b/bitbake/lib/bb/tests/parse.py
index d076fcc208..97df2c4590 100644
--- a/bitbake/lib/bb/tests/parse.py
+++ b/bitbake/lib/bb/tests/parse.py
@@ -177,7 +177,7 @@ python () {
177 177
178 addtask_deltask = """ 178 addtask_deltask = """
179addtask do_patch after do_foo after do_unpack before do_configure before do_compile 179addtask do_patch after do_foo after do_unpack before do_configure before do_compile
180addtask do_fetch do_patch 180addtask do_fetch2 do_patch2
181 181
182addtask do_myplaintask 182addtask do_myplaintask
183addtask do_myplaintask2 183addtask do_myplaintask2
@@ -194,18 +194,11 @@ deltask do_fetch ${MYVAR} ${EMPTYVAR}
194deltask ${EMPTYVAR} 194deltask ${EMPTYVAR}
195""" 195"""
196 def test_parse_addtask_deltask(self): 196 def test_parse_addtask_deltask(self):
197 import sys
198 197
199 with self.assertLogs() as logs: 198 f = self.parsehelper(self.addtask_deltask)
200 f = self.parsehelper(self.addtask_deltask) 199 d = bb.parse.handle(f.name, self.d)['']
201 d = bb.parse.handle(f.name, self.d)['']
202 200
203 output = "".join(logs.output) 201 self.assertEqual(['do_fetch2', 'do_patch2', 'do_myplaintask', 'do_mytask', 'do_mytask2'], d.getVar("__BBTASKS"))
204 self.assertTrue("addtask contained multiple 'before' keywords" in output)
205 self.assertTrue("addtask contained multiple 'after' keywords" in output)
206 self.assertTrue('addtask ignored: " do_patch"' in output)
207 self.assertEqual(['do_myplaintask', 'do_mytask', 'do_mytask2'], d.getVar("__BBTASKS"))
208 #self.assertTrue('dependent task do_foo for do_patch does not exist' in output)
209 202
210 broken_multiline_comment = """ 203 broken_multiline_comment = """
211# First line of comment \\ 204# First line of comment \\