more stuff .. still not working
This commit is contained in:
BIN
topfails/dbschema.pyc
Normal file
BIN
topfails/dbschema.pyc
Normal file
Binary file not shown.
@@ -68,26 +68,29 @@ class LogParser(object):
|
||||
"""return potential test name [None by default]"""
|
||||
return None
|
||||
|
||||
def processTestName(self, test, reason, potentialTestName):
|
||||
def processTestName(self, test, reason, potentialTestName, lines, idx):
|
||||
"""substitute the potential name for the test (if applicable)"""
|
||||
|
||||
# for process crash, take the test-runner (automation) as the test failure
|
||||
# (as already reported in test) and reset the potentialTestName to None
|
||||
if 'PROCESS-CRASH' in reason:
|
||||
return test
|
||||
return test, idx
|
||||
|
||||
# an automation.py failure will ALWAYS be followed by a
|
||||
# automationutils.processLeakLog line; so send a None here
|
||||
# which will cause the parsing to continue and don't record this failure
|
||||
if 'automation.py' in test:
|
||||
return None
|
||||
return None, idx
|
||||
|
||||
if 'automationutils.processLeakLog' and (potentialTestName is not None):
|
||||
return potentialTestName
|
||||
len_lines = len(lines)
|
||||
while (idx+1) < len_lines and ('automationutils.processLeakLog' in lines[idx+1]):
|
||||
idx += 1
|
||||
return potentialTestName, idx
|
||||
|
||||
# if these conditions are not met, return
|
||||
# the test name and potentialTestName untouched
|
||||
return test # no name substitution
|
||||
return test, idx # no name substitution
|
||||
|
||||
def parse(self, fp):
|
||||
"""
|
||||
@@ -111,6 +114,7 @@ class LogParser(object):
|
||||
# test to see if the line is a failure
|
||||
m = self.testfailedRe.match(line)
|
||||
if not m:
|
||||
idx += 1
|
||||
continue
|
||||
|
||||
# reason for failure [TEST-UNEXPECTED-.* or PROCESS-CRASH]
|
||||
@@ -128,9 +132,10 @@ class LogParser(object):
|
||||
else:
|
||||
# substitute potentialTestName for the test name if
|
||||
# test is automation.py or automationutils.processLeakLog
|
||||
test = self.processPotentialTestName(test, reason, potentialTestName)
|
||||
test, idx = self.processTestName(test, reason, potentialTestName, lines, idx)
|
||||
|
||||
if test is None: # don't add this test
|
||||
if test is None: # don't add this test (and don't reset potentialTestName)
|
||||
idx += 1
|
||||
continue
|
||||
|
||||
# reset potentialTestName
|
||||
|
||||
BIN
topfails/log_parser.pyc
Normal file
BIN
topfails/log_parser.pyc
Normal file
Binary file not shown.
45
topfails/mappings.py
Normal file
45
topfails/mappings.py
Normal file
@@ -0,0 +1,45 @@
|
||||
"""
|
||||
<OS> <branch> [type of build]
|
||||
|
||||
Examples:
|
||||
|
||||
The builder: <OS> <branch> build (e.g. 'Linux mozilla-central build')
|
||||
|
||||
A debug test: <OS> <branch> debug test <test type>
|
||||
|
||||
An opt test: <OS> <branch> opt test <test type>
|
||||
|
||||
A leak test: <OS> <branch> leak test <test type>
|
||||
|
||||
Talos:
|
||||
<OS> <branch> talos (e.g. 'Rev3 Fedora 12x64 mozilla-central talos')
|
||||
-or-
|
||||
<OS> <branch> talos <type> (e.g. 'Rev3 Fedora 12x64 mozilla-central talos cold')
|
||||
"""
|
||||
|
||||
# OS mappings
|
||||
OSes = [ 'Linux',
|
||||
'Linux x86-64',
|
||||
'OS X 10.5.2',
|
||||
'OS X 10.6.2',
|
||||
'Rev3 Fedora 12',
|
||||
'Rev3 Fedora 12x64',
|
||||
'Rev3 MacOSX Leopard 10.5.8',
|
||||
'Rev3 MacOSX Snow Leopard 10.6.2',
|
||||
'Rev3 WINNT 5.1',
|
||||
'Rev3 WINNT 6.1',
|
||||
'WINNT 5.2' ]
|
||||
OS_to_index = dict([(OS, index) for index, OS in enumerate(OSes)])
|
||||
index_to_OS = dict([(index, OS) for index, OS in enumerate(OSes)])
|
||||
OSdata = { 'Linux': {'name': 'Linux', 'bits': 32 },
|
||||
'Rev3 Fedora 12': { 'name': 'Fedora', 'bits': 32}
|
||||
'Rev3 Fedora 12x64': { 'name': 'Fedora', 'bits': 64}
|
||||
'Linux x86-64': { 'name': 'Linux', 'bits': 64}
|
||||
'OS X 10.5.2': { 'name': 'MAC OSX', 'bits': 32}
|
||||
'OS X 10.6.2': { 'name': 'MAC OSX', 'bits': 64}
|
||||
'Rev3 MacOSX Leopard 10.5.8': { 'name': 'MAC OSX', 'bits': 32}
|
||||
'Rev3 MacOSX Snow Leopard 10.6.2': { 'name': 'MAC OSX', 'bits': 64}
|
||||
'Rev3 WINNT 5.1': { 'name': 'Windows', 'bits': 32}
|
||||
'Rev3 WINNT 6.1': { 'name': 'Windows', 'bits': 64}
|
||||
'WINNT 5.2': { 'name': 'Windows', 'bits': 32}
|
||||
}
|
||||
45
topfails/mappings.py~
Normal file
45
topfails/mappings.py~
Normal file
@@ -0,0 +1,45 @@
|
||||
"""
|
||||
<OS> <branch> [type of build]
|
||||
|
||||
Examples:
|
||||
|
||||
The builder: <OS> <branch> build (e.g. 'Linux mozilla-central build')
|
||||
|
||||
A debug test: <OS> <branch> debug test <test type>
|
||||
|
||||
An opt test: <OS> <branch> opt test <test type>
|
||||
|
||||
A leak test: <OS> <branch> leak test <test type>
|
||||
|
||||
Talos:
|
||||
<OS> <branch> talos (e.g. 'Rev3 Fedora 12x64 mozilla-central talos')
|
||||
-or-
|
||||
<OS> <branch> talos <type> (e.g. 'Rev3 Fedora 12x64 mozilla-central talos cold')
|
||||
"""
|
||||
|
||||
# OS mappings
|
||||
OSes = [ 'Linux',
|
||||
'Linux x86-64',
|
||||
'OS X 10.5.2',
|
||||
'OS X 10.6.2',
|
||||
'Rev3 Fedora 12',
|
||||
'Rev3 Fedora 12x64',
|
||||
'Rev3 MacOSX Leopard 10.5.8',
|
||||
'Rev3 MacOSX Snow Leopard 10.6.2',
|
||||
'Rev3 WINNT 5.1',
|
||||
'Rev3 WINNT 6.1',
|
||||
'WINNT 5.2' ]
|
||||
OS_to_index = dict([(OS, index) for index, OS in enumerate(OSes)])
|
||||
index_to_OS = dict([(index, OS) for index, OS in enumerate(OSes)])
|
||||
OSdata = { 'Linux': {'name': 'Linux', 'bits': 32 },
|
||||
'Rev3 Fedora 12': { 'name': 'Fedora', 'bits': 32}
|
||||
'Rev3 Fedora 12x64': { 'name': 'Fedora', 'bits': 64}
|
||||
'Linux x86-64': { 'name': 'Linux', 'bits': 64}
|
||||
'OS X 10.5.2': { 'name': 'MAC OSX', 'bits': 32}
|
||||
'OS X 10.6.2': { 'name': 'MAC OSX', 'bits': 64}
|
||||
'Rev3 MacOSX Leopard 10.5.8': { 'name': 'MAC OSX', 'bits': 32}
|
||||
'Rev3 MacOSX Snow Leopard 10.6.2': { 'name': 'MAC OSX', 'bits': 64}
|
||||
'Rev3 WINNT 5.1': { 'name': 'Windows', 'bits': 32}
|
||||
'Rev3 WINNT 6.1': { 'name': 'Windows', 'bits': 64}
|
||||
'WINNT 5.2': { 'name': 'Windows', 'bits': 32}
|
||||
}
|
||||
BIN
topfails/topfails/__init__.pyc
Normal file
BIN
topfails/topfails/__init__.pyc
Normal file
Binary file not shown.
BIN
topfails/topfails/settings.pyc
Normal file
BIN
topfails/topfails/settings.pyc
Normal file
Binary file not shown.
BIN
topfails/topfails/urls.pyc
Normal file
BIN
topfails/topfails/urls.pyc
Normal file
Binary file not shown.
BIN
topfails/topfails/viewer/__init__.pyc
Normal file
BIN
topfails/topfails/viewer/__init__.pyc
Normal file
Binary file not shown.
BIN
topfails/topfails/viewer/models.pyc
Normal file
BIN
topfails/topfails/viewer/models.pyc
Normal file
Binary file not shown.
BIN
topfails/topfails/viewer/views.pyc
Normal file
BIN
topfails/topfails/viewer/views.pyc
Normal file
Binary file not shown.
@@ -500,53 +500,7 @@ while curtime < endtime and chunk < totalchunks:
|
||||
logging.info("Skipping already recorded failure '%s' in build with id '%s' with failure record '%s' " % (test, buildid, text))
|
||||
else:
|
||||
InsertTest(conn, buildid, reason, testnames_id, text)
|
||||
|
||||
|
||||
# # Look for test failures.
|
||||
# for line in gz.readlines()):
|
||||
# # Check all lines if they have INFO Running or url=file:/// stuff.
|
||||
# # If it is mochitest, we see the former string pattern
|
||||
# # If it is jsreftest,crashtest we see the later string pattern.
|
||||
# if "INFO Running" in line or "[url = file:///" in line or "INFO | Loading" in line:
|
||||
# potentialTestName=line
|
||||
# if "[url = file:///" in line:
|
||||
# if "?test=" in line:
|
||||
# potentialTestName = potentialTestName.split('?test=')[1][0:-2]
|
||||
# else:
|
||||
# potentialTestName = potentialTestName.split('url = ')[1][0:-1]
|
||||
# elif "INFO Running" in line:
|
||||
# potentialTestName = potentialTestName.split('INFO Running ')[1][0:-4]
|
||||
# elif "INFO | Loading" in line:
|
||||
# potentialTestName = potentialTestName.split('INFO | Loading ')[1]
|
||||
# else :
|
||||
# potentialTestName= "[unittest-log.py: no logged test]"
|
||||
|
||||
# m = testfailedRe.match(line)
|
||||
# if m:
|
||||
# test = rawtest = m.group(2).strip() or "[unittest-log.py: no logged test]"
|
||||
# if 'automation.py' in test or 'automationutils.processLeakLog' in test:
|
||||
# if potentialTestName != "":
|
||||
# test = rawtest = potentialTestName
|
||||
# potentialTestName=""
|
||||
|
||||
# # Code bits below try to change back slash to forward slash
|
||||
# # and get rid of varibale prepends to the /test/../.. names
|
||||
|
||||
# if rawtest.find('\\') != -1:
|
||||
# test = rawtest.replace('\\','/')
|
||||
# if test.find('/') != -1:
|
||||
# tup=test.partition('build/')
|
||||
# if len(tup[2]) > 2:
|
||||
# test=tup[2]
|
||||
# else :
|
||||
# test=tup[0]
|
||||
|
||||
# text = m.group(3).strip() or "[unittest-log.py: no logged text]"
|
||||
# testnames_id=GetOrInsertTest(conn,test)
|
||||
# if HaveFailRecord(conn,buildid, m.group(1).rstrip(), testnames_id):
|
||||
# logging.info("Skipping already recorded failure '%s' in build with id '%s' with failure record '%s' " % (test, buildid, text))
|
||||
# else:
|
||||
# InsertTest(conn, buildid, m.group(1).rstrip(), testnames_id, text)
|
||||
|
||||
except Exception, e:
|
||||
errstring = "Unexpected error: %s" % e
|
||||
if options.debug:
|
||||
|
||||
Reference in New Issue
Block a user