while trying to simplify blocking I came across critical in the HWTestConfig.
It's only actually used in one place:
def _HandleStageException(self, exc_info):
"""Override and don't set status to FAIL but FORGIVEN instead."""
exc_type = exc_info[0]
# If the suite config says HW Tests can only warn, only warn.
if self.suite_config.warn_only:
return self._HandleExceptionAsWarning(exc_info)
if self.suite_config.critical:
return super(HWTestStage, self)._HandleStageException(exc_info)
if issubclass(exc_type, failures_lib.TestWarning):
# HWTest passed with warning. All builders should pass.
logging.warning('HWTest passed with warning code.')
return self._HandleExceptionAsWarning(exc_info)
elif issubclass(exc_type, failures_lib.BoardNotAvailable):
# Some boards may not have been setup in the lab yet for
# non-code-checkin configs.
if not config_lib.IsPFQType(self._run.config.build_type):
logging.info('HWTest did not run because the board was not '
'available in the lab yet')
return self._HandleExceptionAsSuccess(exc_info)
return super(HWTestStage, self)._HandleStageException(exc_info)
From here, it seems to just throw the super class's exception early. That doesn't really add any immediate value.
Furthermore, unless one actual config uses it, the PGO config. What's it's purpose? Refactor/remove if no longer needed
Comment 1 by sosa@chromium.org
, Mar 12 2016