diff options
author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2022-02-17 18:14:15 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-02-21 21:53:52 +0000 |
commit | 42243c9e22e073eda08a354bcbe091d173f3b4ae (patch) | |
tree | f62ef43c9236c197782d49bfdf242afbf3477d3d /meta-selftest | |
parent | 528686b9801146a7ebcae99764795680e467429a (diff) | |
download | poky-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.bb | 10 |
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 | } |
12 | addtask do_shelltest | 12 | addtask do_shelltest |
13 | 13 | ||
14 | python do_pythontest_exec_func_shell() { | ||
15 | bb.build.exec_func('do_shelltest', d) | ||
16 | } | ||
17 | addtask do_pythontest_exec_func_shell | ||
18 | |||
14 | python do_pythontest_exit () { | 19 | python 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 | } |
18 | addtask do_pythontest_exit | 23 | addtask do_pythontest_exit |
19 | 24 | ||
25 | python do_pythontest_exec_func_python() { | ||
26 | bb.build.exec_func('do_pythontest_exit', d) | ||
27 | } | ||
28 | addtask do_pythontest_exec_func_python | ||
29 | |||
20 | python do_pythontest_fatal () { | 30 | python 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") |