mirror of
https://github.com/facebook/zstd.git
synced 2025-08-01 09:47:01 +03:00
[fuzzer] Fix bugs in fuzz.py
This commit is contained in:
@ -540,7 +540,7 @@ def regression_parser(args):
|
|||||||
if target == 'all':
|
if target == 'all':
|
||||||
targets = targets.union(TARGETS)
|
targets = targets.union(TARGETS)
|
||||||
elif target in TARGETS:
|
elif target in TARGETS:
|
||||||
targets = targets.add(target)
|
targets.add(target)
|
||||||
else:
|
else:
|
||||||
raise RuntimeError('{} is not a valid target'.format(target))
|
raise RuntimeError('{} is not a valid target'.format(target))
|
||||||
args.TARGET = list(targets)
|
args.TARGET = list(targets)
|
||||||
@ -635,13 +635,17 @@ def gen(args):
|
|||||||
cmd = [
|
cmd = [
|
||||||
args.decodecorpus,
|
args.decodecorpus,
|
||||||
'-n{}'.format(args.number),
|
'-n{}'.format(args.number),
|
||||||
'--max-content-size-log={}'.format(args.max_size_log),
|
|
||||||
'-p{}/'.format(compressed),
|
'-p{}/'.format(compressed),
|
||||||
'-o{}'.format(decompressed),
|
'-o{}'.format(decompressed),
|
||||||
]
|
]
|
||||||
|
|
||||||
if 'block_' in args.TARGET:
|
if 'block_' in args.TARGET:
|
||||||
cmd += ['--gen-blocks']
|
cmd += [
|
||||||
|
'--gen-blocks',
|
||||||
|
'--max-block-size-log={}'.format(args.max_size_log)
|
||||||
|
]
|
||||||
|
else:
|
||||||
|
cmd += ['--max-content-size-log={}'.format(args.max_size_log)]
|
||||||
|
|
||||||
print(' '.join(cmd))
|
print(' '.join(cmd))
|
||||||
subprocess.check_call(cmd)
|
subprocess.check_call(cmd)
|
||||||
|
Reference in New Issue
Block a user