mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix log parsing error
This commit is contained in:
parent
00d81929b1
commit
91d9e52d7d
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
import sys
|
import sys
|
||||||
import shutil
|
|
||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import re
|
import re
|
||||||
@ -49,7 +48,10 @@ class regressor():
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
def process_log(self, logfile):
|
def process_log(self, logfile):
|
||||||
list = re.findall(self._re_sanitizer_log, open(logfile, 'r').read())
|
## Log may contain non ASCII characters, so we simply stringify them
|
||||||
|
## since they don't matter for regular expression matching
|
||||||
|
rawtext = str(open(logfile, 'rb').read())
|
||||||
|
list = re.findall(self._re_sanitizer_log, rawtext)
|
||||||
numSuppressedLeaks = list.count("LeakSanitizer")
|
numSuppressedLeaks = list.count("LeakSanitizer")
|
||||||
rv = any(word in list for word in self._error_blacklist)
|
rv = any(word in list for word in self._error_blacklist)
|
||||||
return not rv, numSuppressedLeaks
|
return not rv, numSuppressedLeaks
|
||||||
|
Loading…
Reference in New Issue
Block a user