Allow passing environment variables to reproducer (#1312)

This commit is contained in:
fenner 2018-04-11 13:12:13 -04:00 committed by Abhishek Arya
parent 3dd226d31b
commit 37c4a2c8e5
1 changed files with 4 additions and 0 deletions

View File

@ -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),