From efe87ce4b2154c6f1c591ed9d8f770c229b044ad Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 31 Jul 2019 15:59:59 +0100 Subject: classes/lib: Remove bb.build.FuncFailed Whilst seemingly a good idea, this exception doesn't really serve any purpose that bb.fatal() doesn't cover. Wrapping exceptions within exceptions isn't pythonic. Its not used in many places, lets clean up those and remove usage of it entirely. It may ultimately be dropped form bitbake entirely. Signed-off-by: Richard Purdie --- meta/lib/oeqa/selftest/cases/bbtests.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'meta/lib/oeqa/selftest') diff --git a/meta/lib/oeqa/selftest/cases/bbtests.py b/meta/lib/oeqa/selftest/cases/bbtests.py index 17da0fd32c..0693ba8cf8 100644 --- a/meta/lib/oeqa/selftest/cases/bbtests.py +++ b/meta/lib/oeqa/selftest/cases/bbtests.py @@ -75,8 +75,11 @@ class BitbakeTests(OESelftestTestCase): result = bitbake('man-db -c patch', ignore_status=True) self.delete_recipeinc('man-db') bitbake('-cclean man-db') - line = self.getline(result, "Function failed: patch_do_patch") - self.assertTrue(line and line.startswith("ERROR:"), msg = "Incorrectly formed patch application didn't fail. bitbake output: %s" % result.output) + found = False + for l in result.output.split('\n'): + if l.startswith("ERROR:") and "failed" in l and "do_patch" in l: + found = l + self.assertTrue(found and found.startswith("ERROR:"), msg = "Incorrectly formed patch application didn't fail. bitbake output: %s" % result.output) def test_force_task_1(self): # test 1 from bug 5875 -- cgit 1.2.3-korg