summaryrefslogtreecommitdiffstats
path: root/meta-selftest
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-10 12:39:44 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-23 22:13:53 +0100
commitd08c9290e82fb26d958991592ef801d07393f69d (patch)
tree4caf4522e5c4247188c8513b8c8b2c379110671b /meta-selftest
parent7d0437c4e8063362d9ca127dbd439208fe6ebda4 (diff)
downloadpoky-d08c9290e82fb26d958991592ef801d07393f69d.tar.gz
oeqa/selftest: Add tests for bitbake shell/python task output
We've seen issues where shell/python tasks lose their log file entries or output and also where output is duplicated. Add some tests to attempt to spot regressions in this area in future. (From OE-Core rev: 414020a9bd656ee61efe2f47db1b31d86b15c1c8) 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.bb24
1 files changed, 24 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
new file mode 100644
index 0000000000..a6100123f9
--- /dev/null
+++ b/meta-selftest/recipes-test/logging-test/logging-test.bb
@@ -0,0 +1,24 @@
1SUMMARY = "Destined to fail"
2LICENSE = "CLOSED"
3
4deltask do_patch
5INHIBIT_DEFAULT_DEPS = "1"
6
7do_shelltest() {
8 echo "This is shell stdout"
9 echo "This is shell stderr" >&2
10 exit 1
11}
12addtask do_shelltest
13
14python do_pythontest_exit () {
15 print("This is python stdout")
16 sys.exit(1)
17}
18addtask do_pythontest_exit
19
20python do_pythontest_fatal () {
21 print("This is python fatal test stdout")
22 bb.fatal("This is a fatal error")
23}
24addtask do_pythontest_fatal