diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-09-10 12:39:44 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-09-23 22:13:53 +0100 |
commit | d08c9290e82fb26d958991592ef801d07393f69d (patch) | |
tree | 4caf4522e5c4247188c8513b8c8b2c379110671b /meta-selftest | |
parent | 7d0437c4e8063362d9ca127dbd439208fe6ebda4 (diff) | |
download | poky-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.bb | 24 |
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 @@ | |||
1 | SUMMARY = "Destined to fail" | ||
2 | LICENSE = "CLOSED" | ||
3 | |||
4 | deltask do_patch | ||
5 | INHIBIT_DEFAULT_DEPS = "1" | ||
6 | |||
7 | do_shelltest() { | ||
8 | echo "This is shell stdout" | ||
9 | echo "This is shell stderr" >&2 | ||
10 | exit 1 | ||
11 | } | ||
12 | addtask do_shelltest | ||
13 | |||
14 | python do_pythontest_exit () { | ||
15 | print("This is python stdout") | ||
16 | sys.exit(1) | ||
17 | } | ||
18 | addtask do_pythontest_exit | ||
19 | |||
20 | python do_pythontest_fatal () { | ||
21 | print("This is python fatal test stdout") | ||
22 | bb.fatal("This is a fatal error") | ||
23 | } | ||
24 | addtask do_pythontest_fatal | ||