Commit 149dd306 authored by Denis Bilenko's avatar Denis Bilenko

use precompiled regex

parent 1be85737
......@@ -50,10 +50,11 @@ def parse_stdout(s):
return testname, hub
greentest_delim = '----------------------------------------------------------------------'
unittest_re = re.compile('^Ran (\d+) test.*?$', re.M)
def parse_greentest_output(s):
s = s[s.rindex(greentest_delim)+len(greentest_delim):]
num = int(re.search('^Ran (\d+) test.*?$', s, re.M).group(1))
num = int(unittest_re.search(s).group(1))
ok = re.search('^OK$', s, re.M)
error, fail, timeout = 0, 0, 0
failed_match = re.search(r'^FAILED \((?:failures=(?P<f>\d+))?,? ?(?:errors=(?P<e>\d+))?\)$', s, re.M)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment