diff options
-rw-r--r-- | bitbake/lib/bb/tests/fetch.py | 6 | ||||
-rw-r--r-- | bitbake/lib/bb/tests/parse.py | 16 |
2 files changed, 12 insertions, 10 deletions
diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py index 8ca7e6c155..20593764fd 100644 --- a/bitbake/lib/bb/tests/fetch.py +++ b/bitbake/lib/bb/tests/fetch.py | |||
@@ -3183,7 +3183,7 @@ class FetchPremirroronlyBrokenTarball(FetcherTest): | |||
3183 | import sys | 3183 | import sys |
3184 | self.d.setVar("SRCREV", "0"*40) | 3184 | self.d.setVar("SRCREV", "0"*40) |
3185 | fetcher = bb.fetch.Fetch([self.recipe_url], self.d) | 3185 | fetcher = bb.fetch.Fetch([self.recipe_url], self.d) |
3186 | with self.assertRaises(bb.fetch2.FetchError): | 3186 | with self.assertRaises(bb.fetch2.FetchError), self.assertLogs() as logs: |
3187 | fetcher.download() | 3187 | fetcher.download() |
3188 | stdout = sys.stdout.getvalue() | 3188 | output = "".join(logs.output) |
3189 | self.assertFalse(" not a git repository (or any parent up to mount point /)" in stdout) | 3189 | self.assertFalse(" not a git repository (or any parent up to mount point /)" in output) |
diff --git a/bitbake/lib/bb/tests/parse.py b/bitbake/lib/bb/tests/parse.py index a3165d95bd..304bbbe222 100644 --- a/bitbake/lib/bb/tests/parse.py +++ b/bitbake/lib/bb/tests/parse.py | |||
@@ -186,14 +186,16 @@ deltask ${EMPTYVAR} | |||
186 | """ | 186 | """ |
187 | def test_parse_addtask_deltask(self): | 187 | def test_parse_addtask_deltask(self): |
188 | import sys | 188 | import sys |
189 | f = self.parsehelper(self.addtask_deltask) | ||
190 | d = bb.parse.handle(f.name, self.d)[''] | ||
191 | 189 | ||
192 | stdout = sys.stdout.getvalue() | 190 | with self.assertLogs() as logs: |
193 | self.assertTrue("addtask contained multiple 'before' keywords" in stdout) | 191 | f = self.parsehelper(self.addtask_deltask) |
194 | self.assertTrue("addtask contained multiple 'after' keywords" in stdout) | 192 | d = bb.parse.handle(f.name, self.d)[''] |
195 | self.assertTrue('addtask ignored: " do_patch"' in stdout) | 193 | |
196 | #self.assertTrue('dependent task do_foo for do_patch does not exist' in stdout) | 194 | output = "".join(logs.output) |
195 | self.assertTrue("addtask contained multiple 'before' keywords" in output) | ||
196 | self.assertTrue("addtask contained multiple 'after' keywords" in output) | ||
197 | self.assertTrue('addtask ignored: " do_patch"' in output) | ||
198 | #self.assertTrue('dependent task do_foo for do_patch does not exist' in output) | ||
197 | 199 | ||
198 | broken_multiline_comment = """ | 200 | broken_multiline_comment = """ |
199 | # First line of comment \\ | 201 | # First line of comment \\ |