mirror of https://github.com/google/oss-fuzz.git
Allow passing environment variables to reproducer (#1312)
This commit is contained in:
parent
3dd226d31b
commit
37c4a2c8e5
|
@ -99,6 +99,7 @@ def main():
|
|||
reproduce_parser.add_argument('testcase_path', help='path of local testcase')
|
||||
reproduce_parser.add_argument('fuzzer_args', help='arguments to pass to the fuzzer',
|
||||
nargs=argparse.REMAINDER)
|
||||
_add_environment_args(reproduce_parser)
|
||||
|
||||
shell_parser = subparsers.add_parser(
|
||||
'shell', help='Run /bin/bash in an image.')
|
||||
|
@ -407,6 +408,9 @@ def reproduce(args):
|
|||
image_name = 'base-runner-debug'
|
||||
env += ['DEBUGGER=' + debugger]
|
||||
|
||||
if args.e:
|
||||
env += args.e
|
||||
|
||||
run_args = sum([['-e', v] for v in env], []) + [
|
||||
'-v', '%s:/out' % os.path.join(BUILD_DIR, 'out', args.project_name),
|
||||
'-v', '%s:/testcase' % _get_absolute_path(args.testcase_path),
|
||||
|
|
Loading…
Reference in New Issue