def build_status_from_logs(log, err):
"""get status of build"""
m = re.search("TEST STATUS:(\s*\d+)", log)
+ other_failures = set()
if m:
tstatus = int(m.group(1).strip())
else:
tstatus = 255
if m.group(1) == "FAILED" and tstatus == 0:
tstatus = -1
+ other_failures.add("make test error")
else:
tstatus = None
else:
cstatus = None
- other_failures = set()
m = re.search("(PANIC|INTERNAL ERROR):.*", log)
if m:
other_failures.add("panic")
ostatus += "/"+span("status failed", "disk full")
if "timeout" in status.other_failures:
ostatus += "/"+span("status failed", "timeout")
+ if "make test error" in status.other_failures:
+ ostatus += "/"+span("status failed", "unexpected return code")
bstatus = "/".join([span_status(s) for s in status.stages])
return bstatus + ostatus