From 37c4a2c8e5f44461f7870395b3e78e34b7d02fc4 Mon Sep 17 00:00:00 2001 From: fenner Date: Wed, 11 Apr 2018 13:12:13 -0400 Subject: [PATCH] Allow passing environment variables to reproducer (#1312) --- infra/helper.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/infra/helper.py b/infra/helper.py index 489495f50..c5784c33d 100755 --- a/infra/helper.py +++ b/infra/helper.py @@ -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),