@@ -324,27 +324,20 @@ addtask do_image_complete_setscene
# IMAGE_QA_COMMANDS += " \
# image_check_everything_ok \
# "
+#
# This task runs all functions in IMAGE_QA_COMMANDS after the rootfs
# construction has completed in order to validate the resulting image.
#
# The functions should use ${IMAGE_ROOTFS} to find the unpacked rootfs
# directory, which if QA passes will be the basis for the images.
#
-# The functions should use oe.utils.ImageQAFailed(description, name) to raise
-# errors. The name must be listed in ERROR_QA or WARN_QA to prompt.
+# The functions are expected to call oe.qa.handle_error() to report any
+# problems.
fakeroot python do_image_qa () {
- from oe.utils import ImageQAFailed
-
qa_cmds = (d.getVar('IMAGE_QA_COMMANDS') or '').split()
for cmd in qa_cmds:
- try:
- bb.build.exec_func(cmd, d)
- except oe.utils.ImageQAFailed as e:
- qamsg = 'Image QA function %s failed: %s\n' % (e.name, e.description)
- oe.qa.handle_error(e.name, qamsg, d)
- except Exception as e:
- qamsg = qamsg + '\tImage QA function %s failed: %s\n' % (cmd, e)
+ bb.build.exec_func(cmd, d)
oe.qa.exit_if_errors(d)
}
@@ -482,19 +482,6 @@ def get_multilib_datastore(variant, d):
localdata.setVar("MLPREFIX", "")
return localdata
-class ImageQAFailed(bb.BBHandledException):
- def __init__(self, description, name=None, logfile=None):
- self.description = description
- self.name = name
- self.logfile=logfile
-
- def __str__(self):
- msg = 'Function failed: %s' % self.name
- if self.description:
- msg = msg + ' (%s)' % self.description
-
- return msg
-
def sh_quote(string):
import shlex
return shlex.quote(string)