Changeset View
Changeset View
Standalone View
Standalone View
test/fuzz/test_runner.py
Show First 20 Lines • Show All 116 Lines • ▼ Show 20 Lines | for t in test_list: | ||||
os.path.join(corpus, t), | os.path.join(corpus, t), | ||||
] | ] | ||||
logging.debug('Run {} with args {}'.format(t, args)) | logging.debug('Run {} with args {}'.format(t, args)) | ||||
output = subprocess.run( | output = subprocess.run( | ||||
args, check=True, stderr=subprocess.PIPE, universal_newlines=True).stderr | args, check=True, stderr=subprocess.PIPE, universal_newlines=True).stderr | ||||
logging.debug('Output: {}'.format(output)) | logging.debug('Output: {}'.format(output)) | ||||
if not export_coverage: | if not export_coverage: | ||||
continue | continue | ||||
for l in output.splitlines(): | for line in output.splitlines(): | ||||
if 'INITED' in l: | if 'INITED' in line: | ||||
with open(os.path.join(corpus, t + '_coverage'), 'w', encoding='utf-8') as cov_file: | with open(os.path.join(corpus, t + '_coverage'), 'w', encoding='utf-8') as cov_file: | ||||
cov_file.write(l) | cov_file.write(line) | ||||
break | break | ||||
if __name__ == '__main__': | if __name__ == '__main__': | ||||
main() | main() |