Prevented failure in undetermined mode on warnings for bug 624928
This commit is contained in:
Родитель
4f578ce761
Коммит
ba476c6ac7
|
@ -174,6 +174,6 @@ class MockErrorHandler:
|
|||
assert y is None
|
||||
assert z is None
|
||||
|
||||
def failed(self):
|
||||
def failed(self, fail_on_warnings=False):
|
||||
"Simple accessor because the standard error handler has one"
|
||||
return self.has_failed
|
||||
|
|
|
@ -137,11 +137,11 @@ class ErrorBundle(object):
|
|||
"Stores the type of addon we're scanning"
|
||||
self.detected_type = type_
|
||||
|
||||
def failed(self):
|
||||
def failed(self, fail_on_warnings=True):
|
||||
"""Returns a boolean value describing whether the validation
|
||||
succeeded or not."""
|
||||
|
||||
return self.errors or self.warnings
|
||||
return self.errors or (fail_on_warnings and self.warnings)
|
||||
|
||||
def get_resource(self, name):
|
||||
"Retrieves an object that has been stored by another test."
|
||||
|
|
|
@ -202,7 +202,7 @@ def test_inner_package(err, package_contents, package):
|
|||
test_func(err, package_contents, package)
|
||||
|
||||
# Return any errors at the end of the tier if undetermined.
|
||||
if err.failed() and not err.determined:
|
||||
if err.failed(fail_on_warnings=False) and not err.determined:
|
||||
err.unfinished = True
|
||||
return err
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче