From 9761e79223049bde3063cabddff544470f0a5166 Mon Sep 17 00:00:00 2001 From: Oliver Chang Date: Tue, 29 Nov 2016 15:10:58 -0800 Subject: [PATCH] helper coverage: add message about the command taking a long time. Also suppresses output from the fuzzer itself. --- infra/helper.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/infra/helper.py b/infra/helper.py index 832fb0127..d75a70094 100755 --- a/infra/helper.py +++ b/infra/helper.py @@ -227,8 +227,11 @@ def coverage(run_args): ] + args.fuzzer_args print('Running:', _get_command_string(command)) - pipe = subprocess.Popen(command) - pipe.communicate() + print('This may take a while (running your fuzzer for %d seconds)...' % + args.run_time) + with open(os.devnull, 'w') as f: + pipe = subprocess.Popen(command, stdout=f, stderr=subprocess.STDOUT) + pipe.communicate() command = [ 'docker', 'run', '-i', @@ -264,7 +267,7 @@ def generate(generate_args): template_args = { 'project_name' : args.project_name - } + } with open(os.path.join(dir, 'project.yaml'), 'w') as f: f.write(templates.PROJECT_YAML_TEMPLATE % template_args)