#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. """Generic error lists.
Error lists are used to parse output in mozharness.base.log.OutputParser.
Each line of output is matched against each substring or regular expression in the error list. On a match, we determine the 'level' of that line,
whether IGNORE, DEBUG, INFO, WARNING, ERROR, CRITICAL, or FATAL.
TODO: Context lines (requires work on the OutputParser side)
TODO: We could also create classes that generate these, but with the
appropriate level (please don't die on any errors; please die on any
warning; etc.) or platform or language or whatever. """
import re
from mozharness.base.log import CRITICAL, DEBUG, ERROR, WARNING
# We may need to have various MakefileErrorLists for differing amounts of # warning-ignoring-ness.
MakefileErrorList = (
BaseErrorList
+ PythonErrorList
+ RustErrorList
+ [
{"substr": r""": error: """, "level": ERROR},
{"substr": r"""No rule to make target """, "level": ERROR},
{"regex": re.compile(r"""akefile.*was not found\."""), "level": ERROR},
{"regex": re.compile(r"""Stop\.$"""), "level": ERROR},
{ "regex": re.compile(r"""make\[\d+\]: \*\*\* \[.*\] Error \d+"""), "level": ERROR,
},
{"regex": re.compile(r""":\d+: warning:"""), "level": WARNING},
{"regex": re.compile(r"""make(?:\[\d+\])?: \*\*\*/"""), "level": ERROR},
{"substr": r"""Warning: """, "level": WARNING},
]
)
TarErrorList = BaseErrorList + [
{"substr": r"""(stdin) is not a bzip2 file.""", "level": ERROR},
{"regex": re.compile(r"""Child returned status [1-9]"""), "level": ERROR},
{"substr": r"""Error exit delayed from previous errors""", "level": ERROR},
{"substr": r"""stdin: unexpected end of file""", "level": ERROR},
{"substr": r"""stdin: not in gzip format""", "level": ERROR},
{"substr": r"""Cannot exec: No such file or directory""", "level": ERROR},
{"substr": r""": Error is not recoverable: exiting now""", "level": ERROR},
]
ZipErrorList = BaseErrorList + [
{ "substr": r"""zip warning:""", "level": WARNING,
},
{ "substr": r"""zip error:""", "level": ERROR,
},
{ "substr": r"""Cannot open file: it does not appear to be a valid archive""", "level": ERROR,
},
]
ZipalignErrorList = BaseErrorList + [
{ "regex": re.compile(r"""Unable to open .* as a zip archive"""), "level": ERROR,
},
{ "regex": re.compile(r"""Output file .* exists"""), "level": ERROR,
},
{ "substr": r"""Input and output can't be the same file""", "level": ERROR,
},
]
# __main__ {{{1 if __name__ == "__main__": """TODO: unit tests.""" pass
Messung V0.5
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.