mirror of https://github.com/google/oss-fuzz.git
[infra] Make coverage run with dict and options.
This commit is contained in:
parent
af86b0cbdb
commit
c093b7101d
|
@ -354,16 +354,21 @@ def coverage(args):
|
||||||
temp_dir = tempfile.mkdtemp()
|
temp_dir = tempfile.mkdtemp()
|
||||||
|
|
||||||
run_args = [
|
run_args = [
|
||||||
|
'-e', 'FUZZING_ENGINE=libfuzzer',
|
||||||
|
'-e', 'ASAN_OPTIONS=coverage_dir=/cov',
|
||||||
|
'-e', 'MSAN_OPTIONS=coverage_dir=/cov',
|
||||||
|
'-e', 'UBSAN_OPTIONS=coverage_dir=/cov',
|
||||||
'-v', '%s:/out' % os.path.join(BUILD_DIR, 'out', args.project_name),
|
'-v', '%s:/out' % os.path.join(BUILD_DIR, 'out', args.project_name),
|
||||||
'-v', '%s:/cov' % temp_dir,
|
'-v', '%s:/cov' % temp_dir,
|
||||||
'-w', '/cov',
|
'-w', '/cov',
|
||||||
'-t', 'gcr.io/oss-fuzz-base/base-runner',
|
'-t', 'gcr.io/oss-fuzz-base/base-runner',
|
||||||
'/out/%s' % args.fuzzer_name,
|
'run_fuzzer',
|
||||||
|
args.fuzzer_name,
|
||||||
'-dump_coverage=1',
|
'-dump_coverage=1',
|
||||||
'-max_total_time=%s' % args.run_time
|
'-max_total_time=%s' % args.run_time
|
||||||
] + args.fuzzer_args
|
] + args.fuzzer_args
|
||||||
|
|
||||||
print('This may take a while (running your fuzzer for %d seconds)...' %
|
print('This may take a while (running your fuzzer for %s seconds)...' %
|
||||||
args.run_time)
|
args.run_time)
|
||||||
docker_run(run_args, print_output=False)
|
docker_run(run_args, print_output=False)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue