Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions fstat/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
'NONE': 0,
'FAILURE': 1,
'TIMEOUT': 2,
'COREDUMP': 3
}


Expand All @@ -19,6 +20,7 @@ def __init__(self, build_info, job_name):
self.url = ''.join([build_info['url'], 'consoleText'])
self.job_name = job_name
self.build_info = build_info
self.re = re.compile(r'\./tests/.*\.t')

def is_parsed(self):
if FailureInstance.query.filter_by(url=self.url).first():
Expand All @@ -43,7 +45,7 @@ def process_failure(self):
# If we find a line with failure, that means the test in the line we
# wrote to test_line failed.
if line.find("Result: FAIL") != -1:
test_case = re.search(r'\./tests/.*\.t', test_line)
test_case = self.re.search(test_line)
if test_case:
self.save_failure(test_case.group(), type='FAILURE')
# If the test timed out the output looks like this:
Expand All @@ -54,10 +56,15 @@ def process_failure(self):
# something.t: bad status 124

if line.find("timed out after") != -1:
test_case = re.search(r'\./tests/.*\.t', line)
test_case = self.re.search(line)
if test_case:
self.save_failure(test_case.group(), type='TIMEOUT')

if line.find("new core files") != -1:
test_case = self.re.search(line)
if test_case:
self.save_failure(test_case.group(), type='COREDUMP')

def save_failure(self, signature, type=None):
failure = Failure.query.filter_by(signature=signature).first()
# If it doesn't exist, create a job first
Expand Down
4 changes: 4 additions & 0 deletions fstat/static/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ div.tag-warning {
background: #ec971f
}

div.tag-core {
background: #994dbf
}

@media only screen {
.failure-signature-main {
font-size: 0.7em;
Expand Down
4 changes: 4 additions & 0 deletions fstat/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ <h2>Overall Summary</h2>
<div class="tag tag-warning">
<span class="glyphicon glyphicon-time"></span>
</div>
{% elif failure["type"] == 3 %}
<div class="tag tag-core">
<span class="glyphicon glyphicon-exclamation-sign"></span>
</div>
{% endif %}
</td>
<td><a href="https://github.com/gluster/glusterfs/tree/devel/{{ failure["signature"] }}" target="_blank"><code>{{ failure["signature"] }}</code></a></td>
Expand Down