summaryrefslogtreecommitdiffstats
path: root/meta-selftest
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2022-02-17 18:14:15 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-02-21 21:53:52 +0000
commit42243c9e22e073eda08a354bcbe091d173f3b4ae (patch)
treef62ef43c9236c197782d49bfdf242afbf3477d3d /meta-selftest
parent528686b9801146a7ebcae99764795680e467429a (diff)
downloadpoky-42243c9e22e073eda08a354bcbe091d173f3b4ae.tar.gz
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 <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta-selftest')
-rw-r--r--meta-selftest/recipes-test/logging-test/logging-test.bb10
1 files changed, 10 insertions, 0 deletions
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() {
11} 11}
12addtask do_shelltest 12addtask do_shelltest
13 13
14python do_pythontest_exec_func_shell() {
15 bb.build.exec_func('do_shelltest', d)
16}
17addtask do_pythontest_exec_func_shell
18
14python do_pythontest_exit () { 19python do_pythontest_exit () {
15 print("This is python stdout") 20 print("This is python stdout")
16 sys.exit(1) 21 sys.exit(1)
17} 22}
18addtask do_pythontest_exit 23addtask do_pythontest_exit
19 24
25python do_pythontest_exec_func_python() {
26 bb.build.exec_func('do_pythontest_exit', d)
27}
28addtask do_pythontest_exec_func_python
29
20python do_pythontest_fatal () { 30python do_pythontest_fatal () {
21 print("This is python fatal test stdout") 31 print("This is python fatal test stdout")
22 bb.fatal("This is a fatal error") 32 bb.fatal("This is a fatal error")