-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlogChecker.py
More file actions
29 lines (25 loc) · 999 Bytes
/
logChecker.py
File metadata and controls
29 lines (25 loc) · 999 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import input_parser
import comparator
import subprocess
import util
import sys
monpoly = ""
stream = ""
stream_config = ""
inp = sys.argv[1:]
param = input_parser.get_param(inp)
for tool, paths in param:
if tool == 'monpoly':
popen = subprocess.Popen(monpoly + " -s " + paths.get('signature') + " -f" + paths.get('formula') +
" -l" + paths.get('log') + " > m_out", stdout=True, stderr=False)
popen.communicate()
param.get('monpoly').update({'out': 'm_out'})
elif tool == 'stream':
s_param = paths.get('stream')
util.stream_set_src(paths.get('script'), paths.get('logs'))
dest = util.stream_get_dest(paths.get('script'))
popen = subprocess.Popen(stream + " -c " + stream_config + s_param.get('script'))
popen.communicate()
param.get('stream').update({'out': dest})
comparator.compare(monpoly=param.get('monpoly').get('out'),
stream=param.get('stream').get('out'))