Skip to content
Snippets Groups Projects
Commit 352e2026 authored by Vermaat's avatar Vermaat
Browse files

Merged 236 from trunk.

parents 85b1a786 6b169b49
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env python
"""
Search log for bugs.
Finds occurrences of 'Received' in the log file that are not followed by an
occurrence of 'Finished'. These are probably runs of the namechecker that
crashed.
"""
import os
import site
# Todo: Get this from the configuration file
root_dir = os.path.split(os.path.dirname(__file__))[0]
site.addsitedir(root_dir)
# Todo: Fix Mutalyzer to not depend on working directory
if not __name__ == '__main__':
os.chdir(root_dir)
from mutalyzer.config import Config
config = Config()
handle = open(config.Output.log, 'r')
scanning = False
line = handle.readline()
while line:
if not scanning:
if ' Received ' in line:
message = line
scanning = True
else:
if ' Received ' in line:
print message,
scanning = False
if ' Finished ' in line:
scanning = False
line = handle.readline()
handle.close()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment