diff --git a/contrib/buildbot/ignore-logs.txt b/contrib/buildbot/ignore-logs.txt new file mode 100644 --- /dev/null +++ b/contrib/buildbot/ignore-logs.txt @@ -0,0 +1,3 @@ +# Wine occasionally deadlocks during cross-builds tests. It should be safe to +# ignore until we're able to update wine with a version where this is fixed. +err:ntdll:RtlpWaitForCriticalSection section \\w* "\\?" wait timed out in thread \\d*, blocked by \\d*, retrying diff --git a/contrib/buildbot/server.py b/contrib/buildbot/server.py --- a/contrib/buildbot/server.py +++ b/contrib/buildbot/server.py @@ -794,6 +794,18 @@ } ) + # Explicitly ignored log lines. Use with care. + buildLog = tc.getBuildLog(buildId) + for line in tc.getIgnoreList(): + # Skip empty lines and comments in the ignore file + if not line or line[0] == '#': + continue + + # If any of the ignore patterns match any line in the + # build log, ignore this failure + if re.search(line.decode(), buildLog): + return SUCCESS, 200 + # Get number of build failures over the last few days numRecentFailures = tc.getNumAggregateFailuresSince( buildTypeId, 60 * 60 * 24 * 5) diff --git a/contrib/buildbot/teamcity_wrapper.py b/contrib/buildbot/teamcity_wrapper.py --- a/contrib/buildbot/teamcity_wrapper.py +++ b/contrib/buildbot/teamcity_wrapper.py @@ -3,6 +3,7 @@ from collections import UserDict import io import json +import os from pprint import pprint import re import requests @@ -50,6 +51,8 @@ self.auth = (username, password) self.logger = None self.mockTime = None + with open(os.path.join(os.path.dirname(__file__), 'ignore-logs.txt'), 'rb') as ignoreList: + self.ignoreList = ignoreList.readlines() def set_logger(self, logger): self.logger = logger @@ -61,6 +64,9 @@ # We do not care about sub-second precision anyway. return int(time.time()) + def getIgnoreList(self, ignoreList): + return self.ignoreList + def setMockTime(self, mockTime): self.mockTime = mockTime diff --git a/contrib/buildbot/test/data/testlog_ignore.zip b/contrib/buildbot/test/data/testlog_ignore.zip new file mode 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 GIT binary patch literal 0 Hc$@