From 42243c9e22e073eda08a354bcbe091d173f3b4ae Mon Sep 17 00:00:00 2001 From: Peter Kjellerstedt Date: Thu, 17 Feb 2022 18:14:15 +0100 Subject: oeqa/selftest/bblogging: Add logging tests for bb.build.exec_func with shell/python code The situation regarding logging is different when a function called by bb.build.exec_func() fails compared to when the task code fails directly. There is a recent fix in bitbake to solve that and these tests will hopefully prevent regressions. (From OE-Core rev: 50ccfaa8b3ed340ee7f906934b211a1c73eb8db5) Signed-off-by: Peter Kjellerstedt Signed-off-by: Richard Purdie --- meta-selftest/recipes-test/logging-test/logging-test.bb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'meta-selftest/recipes-test/logging-test') diff --git a/meta-selftest/recipes-test/logging-test/logging-test.bb b/meta-selftest/recipes-test/logging-test/logging-test.bb index a6100123f9..ac3fb46f45 100644 --- a/meta-selftest/recipes-test/logging-test/logging-test.bb +++ b/meta-selftest/recipes-test/logging-test/logging-test.bb @@ -11,12 +11,22 @@ do_shelltest() { } addtask do_shelltest +python do_pythontest_exec_func_shell() { + bb.build.exec_func('do_shelltest', d) +} +addtask do_pythontest_exec_func_shell + python do_pythontest_exit () { print("This is python stdout") sys.exit(1) } addtask do_pythontest_exit +python do_pythontest_exec_func_python() { + bb.build.exec_func('do_pythontest_exit', d) +} +addtask do_pythontest_exec_func_python + python do_pythontest_fatal () { print("This is python fatal test stdout") bb.fatal("This is a fatal error") -- cgit v1.2.3-54-g00ecf