summaryrefslogtreecommitdiff
path: root/scripts/test
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2021-09-22 16:33:10 -0700
committerGitHub <noreply@github.com>2021-09-22 16:33:10 -0700
commit6d46b436b54bdae040a64bd9dafb01a7f53a8233 (patch)
tree111d1970c3e3c495e44bab675db74126038305aa /scripts/test
parentb6820540c8055dd7720ff369c7c0b6ebb34391f0 (diff)
downloadbinaryen-6d46b436b54bdae040a64bd9dafb01a7f53a8233.tar.gz
binaryen-6d46b436b54bdae040a64bd9dafb01a7f53a8233.tar.bz2
binaryen-6d46b436b54bdae040a64bd9dafb01a7f53a8233.zip
Select initial contents automatically in fuzzer (#4173)
This is another attempt to address #4073. Instead of relying on the timestamp, this examines git log to gather the list of test files added or modified within some fixed number of days. The number of days is currently set to 30 (= 1 month) but can be changed. This will be enabled by `--auto-initial-contents`, which is now disabled by default. Hopefully fixes #4073.
Diffstat (limited to 'scripts/test')
-rw-r--r--scripts/test/shared.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/test/shared.py b/scripts/test/shared.py
index d84189891..82e4fe03e 100644
--- a/scripts/test/shared.py
+++ b/scripts/test/shared.py
@@ -92,6 +92,14 @@ def parse_args(args):
'--filter', dest='test_name_filter', default='',
help=('Specifies a filter. Only tests whose paths contains this '
'substring will be run'))
+ # This option is only for fuzz_opt.py
+ # 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,
+ help='Select important initial contents automaticaly in fuzzer. '
+ 'Default: disabled.')
return parser.parse_args(args)