diff --git a/infra/helper.py b/infra/helper.py index 22c81984d..de1684a5b 100755 --- a/infra/helper.py +++ b/infra/helper.py @@ -751,12 +751,16 @@ def coverage(args): run_args.extend([ '-v', '%s:/out' % _get_output_dir(args.project_name), - '-p', - '%s:%s' % (args.port, args.port), '-t', 'gcr.io/oss-fuzz-base/base-runner', ]) + if args.port: + run_args.extend([ + '-p', + '%s:%s' % (args.port, args.port), + ]) + run_args.append('coverage') if args.fuzz_target: run_args.append(args.fuzz_target)