Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions scripts/fuzz_opt.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,8 @@ def is_git_repo():
return False

if not is_git_repo() and shared.options.auto_initial_contents:
print('Warning: The current directory is not a git repository, so you cannot use "--auto-initial-contents". Using the manually selected contents.\n')
print('Warning: The current directory is not a git repository, ' +
'so not automatically selecting initial contents.')
shared.options.auto_initial_contents = False

print('- Perenially-important initial contents:')
Expand Down Expand Up @@ -1764,8 +1765,8 @@ def get_random_opts():
shutil.copyfile('a.wasm', original_wasm)
# write out a useful reduce.sh
auto_init = ''
if shared.options.auto_initial_contents:
auto_init = '--auto-initial-contents'
if not shared.options.auto_initial_contents:
auto_init = '--no-auto-initial-contents'
with open('reduce.sh', 'w') as reduce_sh:
reduce_sh.write('''\
# check the input is even a valid wasm file
Expand Down
4 changes: 2 additions & 2 deletions scripts/test/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ def parse_args(args):
# TODO Allow each script to inherit the default set of options and add its
# own custom options on top of that
parser.add_argument(
'--auto-initial-contents', dest='auto_initial_contents',
action='store_true', default=False,
'--no-auto-initial-contents', dest='auto_initial_contents',
action='store_false', default=True,
help='Select important initial contents automaticaly in fuzzer. '
'Default: disabled.')

Expand Down