diff options
author | Mike Crowe <mac@mcrowe.com> | 2021-10-15 15:39:53 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-10-17 11:55:21 +0100 |
commit | f0ad152ef4cc15c042bc9eeefb6af096d054b220 (patch) | |
tree | 1e645aea15554c8205bb720433e32407a4a2a3fd /meta/classes/ptest.bbclass | |
parent | 05c0e34122ea1272704ddb90657e592f15f5c557 (diff) | |
download | openembedded-core-contrib-f0ad152ef4cc15c042bc9eeefb6af096d054b220.tar.gz |
lib/oe/qa,insane: Move extra error handling functions to library
Extract package_qa_write_error, package_qa_handle_error and
package_qa_add_message functions from insane.bbclass to lib/oe/qa.py and
drop the package_qa_ prefixes.
Update various bbclasses to use the new functions. No import is required
since base.bbclass puts oe.qa in OE_IMPORTS.
Stop requiring callers to manually track whether a fatal error has been
encountered via a "sane" flag. Instead replace the QA_SANE variable with
QA_ERRORS_FOUND and call oe.qa.exit_if_errors or
oe.qa.exit_with_message_if_errors at the end of each task.
Inspired by discussion resulting from
https://lists.openembedded.org/g/openembedded-core/message/156793 and
https://lists.openembedded.org/g/openembedded-core/message/156900
Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/ptest.bbclass')
-rw-r--r-- | meta/classes/ptest.bbclass | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/ptest.bbclass b/meta/classes/ptest.bbclass index 77614ae860..1ec23c0923 100644 --- a/meta/classes/ptest.bbclass +++ b/meta/classes/ptest.bbclass @@ -129,4 +129,4 @@ def package_qa_check_missing_ptest(pn, d, messages): enabled_ptests = " ".join([d.getVar('PTESTS_FAST'), d.getVar('PTESTS_SLOW'), d.getVar('PTESTS_PROBLEMS')]).split() if (pn + "-ptest").replace(d.getVar('MLPREFIX'), '') not in enabled_ptests: - package_qa_handle_error("missing-ptest", "supports ptests but is not included in oe-core's ptest-packagelists.inc", d) + oe.qa.handle_error("missing-ptest", "supports ptests but is not included in oe-core's ptest-packagelists.inc", d) |