Small fixes to fuzz.py
This commit is contained in:
parent
47d2331ed8
commit
e712a3a0a3
@ -265,7 +265,7 @@ def build_parser(args):
|
|||||||
'--disable-fuzzing-mode',
|
'--disable-fuzzing-mode',
|
||||||
dest='fuzzing_mode',
|
dest='fuzzing_mode',
|
||||||
action='store_false',
|
action='store_false',
|
||||||
help='Do not define FUZZING_BUILD_MORE_UNSAFE_FOR_PRODUCTION')
|
help='Do not define FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION')
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--enable-stateful-fuzzing',
|
'--enable-stateful-fuzzing',
|
||||||
dest='stateful_fuzzing',
|
dest='stateful_fuzzing',
|
||||||
@ -399,7 +399,7 @@ def build(args):
|
|||||||
cppflags += ['-DSTATEFUL_FUZZING']
|
cppflags += ['-DSTATEFUL_FUZZING']
|
||||||
|
|
||||||
if args.fuzzing_mode:
|
if args.fuzzing_mode:
|
||||||
cppflags += ['-DFUZZING_BUILD_MORE_UNSAFE_FOR_PRODUCTION']
|
cppflags += ['-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION']
|
||||||
|
|
||||||
if args.lib_fuzzing_engine == 'libregression.a':
|
if args.lib_fuzzing_engine == 'libregression.a':
|
||||||
targets = ['libregression.a'] + targets
|
targets = ['libregression.a'] + targets
|
||||||
@ -750,11 +750,10 @@ def zip_cmd(args):
|
|||||||
for target in args.TARGET:
|
for target in args.TARGET:
|
||||||
# Zip the seed_corpus
|
# Zip the seed_corpus
|
||||||
seed_corpus = abs_join(CORPORA_DIR, "{}_seed_corpus".format(target))
|
seed_corpus = abs_join(CORPORA_DIR, "{}_seed_corpus".format(target))
|
||||||
seeds = [abs_join(seed_corpus, f) for f in os.listdir(seed_corpus)]
|
|
||||||
zip_file = "{}.zip".format(seed_corpus)
|
zip_file = "{}.zip".format(seed_corpus)
|
||||||
cmd = ["zip", "-q", "-j", "-9", zip_file]
|
cmd = ["zip", "-r", "-q", "-j", "-9", zip_file, "."]
|
||||||
print(' '.join(cmd + [abs_join(seed_corpus, '*')]))
|
print(' '.join(cmd))
|
||||||
subprocess.check_call(cmd + seeds)
|
subprocess.check_call(cmd, cwd=seed_corpus)
|
||||||
|
|
||||||
|
|
||||||
def list_cmd(args):
|
def list_cmd(args):
|
||||||
|
Loading…
Reference in New Issue
Block a user