Created
August 25, 2015 14:56
-
-
Save gregarndt/97caa54a006ae76e235b to your computer and use it in GitHub Desktop.
test treeherder taskcluster error parsing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import re | |
| RE_ERR_MATCH = re.compile(( | |
| r"^error: TEST FAILED" | |
| r"|^g?make(?:\[\d+\])?: \*\*\*" | |
| r"|^Remote Device Error:" | |
| r"|^[A-Za-z.]+Error: " | |
| r"|^[A-Za-z.]*Exception: " | |
| r"|^remoteFailed:" | |
| r"|^rm: cannot " | |
| r"|^abort:" | |
| r"|^Output exceeded \d+ bytes" | |
| r"|^The web-page 'stop build' button was pressed" | |
| r"|.*\.js: line \d+, col \d+, Error -" | |
| r"|^\[taskcluster\] Error:" | |
| r"|^\[[\w-]+:(?:error|exception)+\]" | |
| )) | |
| assert bool(RE_ERR_MATCH.match("[taskcluster-vcs:error] Error something")) | |
| assert bool(RE_ERR_MATCH.match("[taskcluster:error] Error something")) | |
| assert bool(RE_ERR_MATCH.match("[taskcluster:exception] Some kind of exception")) | |
| # old style error | |
| assert bool(RE_ERR_MATCH.match("[taskcluster] Error: something")) | |
| # Shouldn't catch anything | |
| assert bool(RE_ERR_MATCH.match("[taskcluster] something")) == False | |
| assert bool(RE_ERR_MATCH.match("[taskcluster:info] something")) == False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment