2016-09-01 23:32:06 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
# Copyright 2016 Google Inc.
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
from __future__ import print_function
|
|
|
|
import argparse
|
2016-11-04 15:04:36 +00:00
|
|
|
import errno
|
2016-09-01 23:32:06 +00:00
|
|
|
import os
|
2016-09-28 19:44:45 +00:00
|
|
|
import pipes
|
2016-10-14 01:07:57 +00:00
|
|
|
import re
|
2016-09-01 23:32:06 +00:00
|
|
|
import shutil
|
2016-11-14 18:17:38 +00:00
|
|
|
import string
|
2016-09-01 23:32:06 +00:00
|
|
|
import subprocess
|
|
|
|
import sys
|
2016-10-14 01:07:57 +00:00
|
|
|
import tempfile
|
2016-09-01 23:32:06 +00:00
|
|
|
import templates
|
2016-10-14 01:07:57 +00:00
|
|
|
import time
|
2016-09-01 23:32:06 +00:00
|
|
|
|
|
|
|
OSSFUZZ_DIR = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
|
|
|
|
BUILD_DIR = os.path.join(OSSFUZZ_DIR, 'build')
|
|
|
|
|
2016-12-28 01:14:33 +00:00
|
|
|
GLOBAL_ARGS = None
|
|
|
|
|
2016-09-01 23:32:06 +00:00
|
|
|
def main():
|
|
|
|
os.chdir(OSSFUZZ_DIR)
|
|
|
|
if not os.path.exists(BUILD_DIR):
|
|
|
|
os.mkdir(BUILD_DIR)
|
|
|
|
|
|
|
|
parser = argparse.ArgumentParser('helper.py', description='oss-fuzz helpers')
|
2016-12-28 01:14:33 +00:00
|
|
|
parser.add_argument(
|
|
|
|
'--nopull', default=False, action='store_const', const=True,
|
|
|
|
help='do not specify --pull while building an image')
|
2016-09-01 23:32:06 +00:00
|
|
|
parser.add_argument(
|
|
|
|
'command',
|
2017-01-03 18:47:05 +00:00
|
|
|
help='One of: generate, build_image, build_fuzzers, run_fuzzer, coverage, reproduce, shell',
|
2016-09-01 23:32:06 +00:00
|
|
|
nargs=argparse.REMAINDER)
|
2016-12-28 01:14:33 +00:00
|
|
|
global GLOBAL_ARGS
|
|
|
|
GLOBAL_ARGS = args = parser.parse_args()
|
2016-09-01 23:32:06 +00:00
|
|
|
|
|
|
|
if not args.command:
|
|
|
|
parser.print_help()
|
|
|
|
return 1
|
|
|
|
|
|
|
|
if args.command[0] == 'generate':
|
|
|
|
return generate(args.command[1:])
|
|
|
|
elif args.command[0] == 'build_image':
|
|
|
|
return build_image(args.command[1:])
|
|
|
|
elif args.command[0] == 'build_fuzzers':
|
|
|
|
return build_fuzzers(args.command[1:])
|
|
|
|
elif args.command[0] == 'run_fuzzer':
|
|
|
|
return run_fuzzer(args.command[1:])
|
2016-10-14 01:07:57 +00:00
|
|
|
elif args.command[0] == 'coverage':
|
|
|
|
return coverage(args.command[1:])
|
2017-01-03 18:47:05 +00:00
|
|
|
elif args.command[0] == 'reproduce':
|
|
|
|
return reproduce(args.command[1:])
|
2016-09-28 20:23:30 +00:00
|
|
|
elif args.command[0] == 'shell':
|
|
|
|
return shell(args.command[1:])
|
2016-09-01 23:32:06 +00:00
|
|
|
else:
|
|
|
|
print('Unrecognised command!', file=sys.stderr)
|
|
|
|
return 1
|
|
|
|
|
|
|
|
return 0
|
|
|
|
|
|
|
|
|
2016-11-04 21:20:41 +00:00
|
|
|
def _is_base_image(image_name):
|
|
|
|
"""Checks if the image name is a base image."""
|
|
|
|
return os.path.exists(os.path.join('infra', 'base-images', image_name))
|
|
|
|
|
|
|
|
|
2016-11-29 19:22:48 +00:00
|
|
|
def _check_project_exists(project_name):
|
|
|
|
"""Checks if a project exists."""
|
|
|
|
if not os.path.exists(os.path.join(OSSFUZZ_DIR, 'projects', project_name)):
|
|
|
|
print(project_name, 'does not exist', file=sys.stderr)
|
2016-09-01 23:32:06 +00:00
|
|
|
return False
|
|
|
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
2016-11-29 19:22:48 +00:00
|
|
|
def _check_fuzzer_exists(project_name, fuzzer_name):
|
2016-11-04 21:20:41 +00:00
|
|
|
"""Checks if a fuzzer exists."""
|
2016-11-29 19:22:48 +00:00
|
|
|
if not os.path.exists(os.path.join(BUILD_DIR, 'out', project_name,
|
2016-11-04 21:20:41 +00:00
|
|
|
fuzzer_name)):
|
|
|
|
print(fuzzer_name,
|
|
|
|
'does not seem to exist. Please run build_fuzzers first.',
|
|
|
|
file=sys.stderr)
|
|
|
|
return False
|
2016-09-28 19:44:45 +00:00
|
|
|
|
2016-11-04 21:20:41 +00:00
|
|
|
return True
|
2016-09-28 19:44:45 +00:00
|
|
|
|
2016-09-01 23:32:06 +00:00
|
|
|
|
2017-01-03 18:47:05 +00:00
|
|
|
def _get_absolute_path(path):
|
|
|
|
"""Returns absolute path with user expansion."""
|
|
|
|
return os.path.abspath(os.path.expanduser(path))
|
|
|
|
|
|
|
|
|
2016-11-04 21:20:41 +00:00
|
|
|
def _get_command_string(command):
|
|
|
|
"""Returns a shell escaped command string."""
|
|
|
|
return ' '.join(pipes.quote(part) for part in command)
|
2016-09-01 23:32:06 +00:00
|
|
|
|
|
|
|
|
2016-11-04 21:20:41 +00:00
|
|
|
def _build_image(image_name):
|
|
|
|
"""Build image."""
|
2016-09-01 23:32:06 +00:00
|
|
|
|
2016-11-04 21:20:41 +00:00
|
|
|
if _is_base_image(image_name):
|
|
|
|
dockerfile_dir = os.path.join('infra', 'base-images', image_name)
|
|
|
|
else:
|
2016-11-29 19:22:48 +00:00
|
|
|
if not _check_project_exists(image_name):
|
2016-11-04 21:20:41 +00:00
|
|
|
return False
|
2016-09-01 23:32:06 +00:00
|
|
|
|
2016-11-29 19:22:48 +00:00
|
|
|
dockerfile_dir = os.path.join('projects', image_name)
|
2016-09-01 23:32:06 +00:00
|
|
|
|
2016-12-28 01:14:33 +00:00
|
|
|
|
|
|
|
build_args = []
|
|
|
|
if not GLOBAL_ARGS.nopull:
|
|
|
|
build_args += ['--pull']
|
2017-01-03 18:47:05 +00:00
|
|
|
build_args += ['-t', 'ossfuzz/%s' % image_name, dockerfile_dir ]
|
2016-12-28 01:14:33 +00:00
|
|
|
|
|
|
|
command = [ 'docker', 'build' ] + build_args
|
2016-09-28 19:44:45 +00:00
|
|
|
print('Running:', _get_command_string(command))
|
|
|
|
|
|
|
|
try:
|
|
|
|
subprocess.check_call(command)
|
2016-09-01 23:32:06 +00:00
|
|
|
except subprocess.CalledProcessError:
|
|
|
|
print('docker build failed.', file=sys.stderr)
|
2016-11-04 21:20:41 +00:00
|
|
|
return False
|
2016-09-01 23:32:06 +00:00
|
|
|
|
2016-11-04 21:20:41 +00:00
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
|
|
def build_image(build_args):
|
|
|
|
"""Build docker image."""
|
|
|
|
parser = argparse.ArgumentParser('helper.py build_image')
|
2016-11-29 19:22:48 +00:00
|
|
|
parser.add_argument('project_name')
|
2016-11-04 21:20:41 +00:00
|
|
|
args = parser.parse_args(build_args)
|
|
|
|
|
2016-11-29 19:22:48 +00:00
|
|
|
if _build_image(args.project_name):
|
2016-11-04 21:20:41 +00:00
|
|
|
return 0
|
|
|
|
|
|
|
|
return 1
|
2016-09-01 23:32:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
def build_fuzzers(build_args):
|
|
|
|
"""Build fuzzers."""
|
|
|
|
parser = argparse.ArgumentParser('helper.py build_fuzzers')
|
2016-12-29 21:08:47 +00:00
|
|
|
parser.add_argument('-e', action='append', help="set environment variable")
|
2016-11-29 19:22:48 +00:00
|
|
|
parser.add_argument('project_name')
|
2017-01-03 18:47:05 +00:00
|
|
|
parser.add_argument('source_path', help='path of local source',
|
|
|
|
nargs='?')
|
2016-09-01 23:32:06 +00:00
|
|
|
args = parser.parse_args(build_args)
|
2016-12-29 21:08:47 +00:00
|
|
|
project_name = args.project_name
|
2016-09-01 23:32:06 +00:00
|
|
|
|
2016-11-29 19:22:48 +00:00
|
|
|
if not _build_image(args.project_name):
|
2016-09-01 23:32:06 +00:00
|
|
|
return 1
|
|
|
|
|
2016-12-29 21:08:47 +00:00
|
|
|
env = ['BUILD_UID=%d' % os.getuid()]
|
|
|
|
if args.e:
|
|
|
|
env += args.e
|
|
|
|
|
2017-01-03 18:47:05 +00:00
|
|
|
command = (
|
|
|
|
['docker', 'run', '--rm', '-i', '--cap-add', 'SYS_PTRACE'] +
|
|
|
|
sum([['-e', v] for v in env], [])
|
|
|
|
)
|
|
|
|
if args.source_path:
|
|
|
|
command += [
|
|
|
|
'-v',
|
|
|
|
'%s:/src/%s' % (_get_absolute_path(args.source_path), args.project_name)
|
|
|
|
]
|
|
|
|
command += [
|
|
|
|
'-v', '%s:/out' % os.path.join(BUILD_DIR, 'out', project_name),
|
|
|
|
'-v', '%s:/work' % os.path.join(BUILD_DIR, 'work', project_name),
|
|
|
|
'-t', 'ossfuzz/%s' % project_name
|
|
|
|
]
|
2016-09-28 19:44:45 +00:00
|
|
|
|
|
|
|
print('Running:', _get_command_string(command))
|
|
|
|
|
|
|
|
try:
|
|
|
|
subprocess.check_call(command)
|
2016-09-01 23:32:06 +00:00
|
|
|
except subprocess.CalledProcessError:
|
|
|
|
print('fuzzers build failed.', file=sys.stderr)
|
|
|
|
return 1
|
|
|
|
|
|
|
|
return 0
|
|
|
|
|
|
|
|
|
|
|
|
def run_fuzzer(run_args):
|
|
|
|
"""Runs a fuzzer in the container."""
|
2016-10-13 20:34:35 +00:00
|
|
|
parser = argparse.ArgumentParser('helper.py run_fuzzer')
|
2016-11-29 19:22:48 +00:00
|
|
|
parser.add_argument('project_name', help='name of the project')
|
2016-09-01 23:32:06 +00:00
|
|
|
parser.add_argument('fuzzer_name', help='name of the fuzzer')
|
|
|
|
parser.add_argument('fuzzer_args', help='arguments to pass to the fuzzer',
|
|
|
|
nargs=argparse.REMAINDER)
|
|
|
|
args = parser.parse_args(run_args)
|
|
|
|
|
2016-11-29 19:22:48 +00:00
|
|
|
if not _check_project_exists(args.project_name):
|
2016-09-01 23:32:06 +00:00
|
|
|
return 1
|
|
|
|
|
2016-11-29 19:22:48 +00:00
|
|
|
if not _check_fuzzer_exists(args.project_name, args.fuzzer_name):
|
2016-11-04 21:20:41 +00:00
|
|
|
return 1
|
|
|
|
|
2016-12-13 19:59:53 +00:00
|
|
|
if not _build_image('base-runner'):
|
2016-09-01 23:32:06 +00:00
|
|
|
return 1
|
|
|
|
|
2016-09-28 19:44:45 +00:00
|
|
|
command = [
|
2016-12-21 20:58:01 +00:00
|
|
|
'docker', 'run', '--rm', '-i', '--cap-add', 'SYS_PTRACE',
|
2016-11-29 19:22:48 +00:00
|
|
|
'-v', '%s:/out' % os.path.join(BUILD_DIR, 'out', args.project_name),
|
2016-12-13 19:27:45 +00:00
|
|
|
'-t', 'ossfuzz/base-runner',
|
2016-11-02 23:06:02 +00:00
|
|
|
'run_fuzzer',
|
2016-11-04 21:20:41 +00:00
|
|
|
'/out/%s' % args.fuzzer_name,
|
2016-09-28 19:44:45 +00:00
|
|
|
] + args.fuzzer_args
|
2016-09-01 23:32:06 +00:00
|
|
|
|
2016-09-28 19:44:45 +00:00
|
|
|
print('Running:', _get_command_string(command))
|
|
|
|
pipe = subprocess.Popen(command)
|
2016-09-01 23:32:06 +00:00
|
|
|
pipe.communicate()
|
|
|
|
|
2017-01-03 18:47:05 +00:00
|
|
|
|
2016-10-14 01:07:57 +00:00
|
|
|
def coverage(run_args):
|
|
|
|
"""Runs a fuzzer in the container."""
|
|
|
|
parser = argparse.ArgumentParser('helper.py coverage')
|
2016-11-04 21:20:41 +00:00
|
|
|
parser.add_argument('--run_time', default=60,
|
|
|
|
help='time in seconds to run fuzzer')
|
2016-11-29 19:22:48 +00:00
|
|
|
parser.add_argument('project_name', help='name of the project')
|
2016-10-14 01:07:57 +00:00
|
|
|
parser.add_argument('fuzzer_name', help='name of the fuzzer')
|
|
|
|
parser.add_argument('fuzzer_args', help='arguments to pass to the fuzzer',
|
|
|
|
nargs=argparse.REMAINDER)
|
|
|
|
args = parser.parse_args(run_args)
|
|
|
|
|
2016-11-29 19:22:48 +00:00
|
|
|
if not _check_project_exists(args.project_name):
|
2016-10-14 01:07:57 +00:00
|
|
|
return 1
|
|
|
|
|
2016-11-29 19:22:48 +00:00
|
|
|
if not _check_fuzzer_exists(args.project_name, args.fuzzer_name):
|
2016-11-04 21:20:41 +00:00
|
|
|
return 1
|
|
|
|
|
2016-12-13 19:59:53 +00:00
|
|
|
if not _build_image('base-runner'):
|
2016-10-14 01:07:57 +00:00
|
|
|
return 1
|
|
|
|
|
|
|
|
temp_dir = tempfile.mkdtemp()
|
|
|
|
|
|
|
|
command = [
|
2016-12-21 20:58:01 +00:00
|
|
|
'docker', 'run', '--rm', '-i', '--cap-add', 'SYS_PTRACE',
|
2016-11-29 19:22:48 +00:00
|
|
|
'-v', '%s:/out' % os.path.join(BUILD_DIR, 'out', args.project_name),
|
2016-10-14 01:07:57 +00:00
|
|
|
'-v', '%s:/cov' % temp_dir,
|
|
|
|
'-w', '/cov',
|
2017-01-03 18:47:05 +00:00
|
|
|
'-e', 'ASAN_OPTIONS=coverage=1',
|
2016-12-13 19:59:53 +00:00
|
|
|
'-t', 'ossfuzz/base-runner',
|
2016-11-04 21:20:41 +00:00
|
|
|
'/out/%s' % args.fuzzer_name,
|
2017-01-03 21:28:28 +00:00
|
|
|
'-dump_coverage=1',
|
2016-10-14 01:07:57 +00:00
|
|
|
'-max_total_time=%s' % args.run_time
|
|
|
|
] + args.fuzzer_args
|
|
|
|
|
|
|
|
print('Running:', _get_command_string(command))
|
2016-11-29 23:10:58 +00:00
|
|
|
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()
|
2016-10-14 01:07:57 +00:00
|
|
|
|
|
|
|
command = [
|
2016-12-21 20:58:01 +00:00
|
|
|
'docker', 'run', '--rm', '-i', '--cap-add', 'SYS_PTRACE',
|
2016-11-29 19:22:48 +00:00
|
|
|
'-v', '%s:/out' % os.path.join(BUILD_DIR, 'out', args.project_name),
|
2016-10-14 01:07:57 +00:00
|
|
|
'-v', '%s:/cov' % temp_dir,
|
|
|
|
'-w', '/cov',
|
|
|
|
'-p', '8001:8001',
|
2016-11-29 19:22:48 +00:00
|
|
|
'-t', 'ossfuzz/%s' % args.project_name,
|
2016-11-04 03:13:29 +00:00
|
|
|
'coverage_report', '/out/%s' % args.fuzzer_name,
|
2016-10-14 01:07:57 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
print('Running:', _get_command_string(command))
|
|
|
|
pipe = subprocess.Popen(command)
|
|
|
|
pipe.communicate()
|
|
|
|
|
2016-09-01 23:32:06 +00:00
|
|
|
|
2017-01-03 18:47:05 +00:00
|
|
|
def reproduce(run_args):
|
|
|
|
"""Reproduces a testcase in the container."""
|
|
|
|
parser = argparse.ArgumentParser('helper.py reproduce')
|
|
|
|
parser.add_argument('project_name', help='name of the project')
|
|
|
|
parser.add_argument('fuzzer_name', help='name of the fuzzer')
|
|
|
|
parser.add_argument('testcase_path', help='path of local testcase')
|
2017-01-03 19:07:58 +00:00
|
|
|
parser.add_argument('fuzzer_args', help='arguments to pass to the fuzzer',
|
|
|
|
nargs=argparse.REMAINDER)
|
2017-01-03 18:47:05 +00:00
|
|
|
args = parser.parse_args(run_args)
|
|
|
|
|
|
|
|
if not _check_project_exists(args.project_name):
|
|
|
|
return 1
|
|
|
|
|
|
|
|
if not _check_fuzzer_exists(args.project_name, args.fuzzer_name):
|
|
|
|
return 1
|
|
|
|
|
|
|
|
if not _build_image('base-runner'):
|
|
|
|
return 1
|
|
|
|
|
|
|
|
command = [
|
|
|
|
'docker', 'run', '--rm', '-i', '--cap-add', 'SYS_PTRACE',
|
|
|
|
'-v', '%s:/out' % os.path.join(BUILD_DIR, 'out', args.project_name),
|
|
|
|
'-v', '%s:/testcase' % _get_absolute_path(args.testcase_path),
|
|
|
|
'-t', 'ossfuzz/base-runner',
|
|
|
|
'reproduce',
|
|
|
|
'/out/%s' % args.fuzzer_name,
|
2017-01-03 19:07:58 +00:00
|
|
|
'-runs=100',
|
|
|
|
] + args.fuzzer_args
|
2017-01-03 18:47:05 +00:00
|
|
|
|
|
|
|
print('Running:', _get_command_string(command))
|
|
|
|
pipe = subprocess.Popen(command)
|
|
|
|
pipe.communicate()
|
|
|
|
|
|
|
|
|
2016-09-01 23:32:06 +00:00
|
|
|
def generate(generate_args):
|
2016-11-29 19:22:48 +00:00
|
|
|
"""Generate empty project files."""
|
2016-09-01 23:32:06 +00:00
|
|
|
parser = argparse.ArgumentParser('helper.py generate')
|
2016-11-29 19:22:48 +00:00
|
|
|
parser.add_argument('project_name')
|
2016-09-01 23:32:06 +00:00
|
|
|
args = parser.parse_args(generate_args)
|
2016-11-29 19:22:48 +00:00
|
|
|
dir = os.path.join('projects', args.project_name)
|
2016-09-01 23:32:06 +00:00
|
|
|
|
|
|
|
try:
|
2016-10-25 02:39:13 +00:00
|
|
|
os.mkdir(dir)
|
2016-11-04 15:04:36 +00:00
|
|
|
except OSError as e:
|
|
|
|
if e.errno != errno.EEXIST:
|
|
|
|
raise
|
2016-10-25 02:39:13 +00:00
|
|
|
print(dir, 'already exists.', file=sys.stderr)
|
2016-09-01 23:32:06 +00:00
|
|
|
return 1
|
|
|
|
|
2016-11-04 21:20:41 +00:00
|
|
|
print('Writing new files to', dir)
|
|
|
|
|
2016-11-17 17:49:34 +00:00
|
|
|
template_args = {
|
2016-11-29 19:22:48 +00:00
|
|
|
'project_name' : args.project_name
|
2016-11-29 23:10:58 +00:00
|
|
|
}
|
2016-11-29 19:25:33 +00:00
|
|
|
with open(os.path.join(dir, 'project.yaml'), 'w') as f:
|
|
|
|
f.write(templates.PROJECT_YAML_TEMPLATE % template_args)
|
2016-09-01 23:32:06 +00:00
|
|
|
|
2016-10-25 02:39:13 +00:00
|
|
|
with open(os.path.join(dir, 'Dockerfile'), 'w') as f:
|
2016-11-17 17:49:34 +00:00
|
|
|
f.write(templates.DOCKER_TEMPLATE % template_args)
|
2016-09-01 23:32:06 +00:00
|
|
|
|
2016-10-25 02:39:13 +00:00
|
|
|
build_sh_path = os.path.join(dir, 'build.sh')
|
2016-09-02 16:57:31 +00:00
|
|
|
with open(build_sh_path, 'w') as f:
|
2016-11-17 17:49:34 +00:00
|
|
|
f.write(templates.BUILD_TEMPLATE % template_args)
|
2016-09-01 23:32:06 +00:00
|
|
|
|
2016-11-04 15:03:46 +00:00
|
|
|
os.chmod(build_sh_path, 0o755)
|
2016-09-01 23:32:06 +00:00
|
|
|
return 0
|
|
|
|
|
|
|
|
|
2016-09-28 20:23:30 +00:00
|
|
|
def shell(shell_args):
|
|
|
|
"""Runs a shell within a docker image."""
|
|
|
|
parser = argparse.ArgumentParser('helper.py shell')
|
2016-11-29 19:22:48 +00:00
|
|
|
parser.add_argument('project_name', help='name of the project')
|
2016-09-28 20:23:30 +00:00
|
|
|
args = parser.parse_args(shell_args)
|
|
|
|
|
2016-11-29 19:22:48 +00:00
|
|
|
if not _build_image(args.project_name):
|
2016-09-28 20:23:30 +00:00
|
|
|
return 1
|
|
|
|
|
|
|
|
command = [
|
2016-12-21 20:58:01 +00:00
|
|
|
'docker', 'run', '--rm', '-i', '--cap-add', 'SYS_PTRACE',
|
2016-11-29 19:22:48 +00:00
|
|
|
'-v', '%s:/out' % os.path.join(BUILD_DIR, 'out', args.project_name),
|
2016-12-13 18:27:23 +00:00
|
|
|
'-v', '%s:/work' % os.path.join(BUILD_DIR, 'work', args.project_name),
|
2017-01-03 18:47:05 +00:00
|
|
|
'-t', 'ossfuzz/%s' % args.project_name,
|
2016-09-28 20:23:30 +00:00
|
|
|
'/bin/bash'
|
|
|
|
]
|
|
|
|
print('Running:', _get_command_string(command))
|
|
|
|
pipe = subprocess.Popen(command)
|
|
|
|
pipe.communicate()
|
|
|
|
|
|
|
|
|
2016-09-01 23:32:06 +00:00
|
|
|
if __name__ == '__main__':
|
|
|
|
sys.exit(main())
|