@@ -27,21 +27,21 @@ yargs(process.argv.slice(2))
27
27
"greedy-arrays" : false ,
28
28
} )
29
29
. example (
30
- "$0 package/fuzzTarget -i packages/foo -i packages/bar" ,
31
- 'Start a fuzzing run using the "fuzz" function exported by "fuzzTarget " ' +
30
+ "$0 package/target -i packages/foo -i packages/bar" ,
31
+ 'Start a fuzzing run using the "fuzz" function exported by "target " ' +
32
32
'and only instrument code in the "packages/a" and "packages/b" modules.'
33
33
)
34
34
. example (
35
- "$0 package/fuzzTarget corpus -- -max_total_time=60" ,
36
- 'Start a fuzzing run using the "fuzz" function exported by "fuzzTarget " ' +
35
+ "$0 package/target corpus -- -max_total_time=60" ,
36
+ 'Start a fuzzing run using the "fuzz" function exported by "target " ' +
37
37
'and use the directory "corpus" to store newly generated inputs. ' +
38
38
'Also pass the "-max_total_time" flag to the internal fuzzing engine ' +
39
39
"(libFuzzer) to stop the fuzzing run after 60 seconds."
40
40
)
41
41
. command (
42
- "$0 <fuzzTarget > [corpus..]" ,
42
+ "$0 <target > [corpus..]" ,
43
43
"Coverage-guided, in-process fuzzer for the Node.js platform. \n\n" +
44
- 'The "fuzzTarget " module has to export a function "fuzz" which accepts ' +
44
+ 'The "target " module has to export a function "fuzz" which accepts ' +
45
45
"a byte array as first parameter and uses that to invoke the actual " +
46
46
"function to fuzz.\n\n" +
47
47
'The "corpus" directory is optional and can be used to provide initial ' +
@@ -52,11 +52,11 @@ yargs(process.argv.slice(2))
52
52
"An example is shown in the examples section of this help message." ,
53
53
( yargs : Argv ) => {
54
54
yargs
55
- . positional ( "fuzzTarget " , {
55
+ . positional ( "target " , {
56
56
describe : "Name of the module that exports the fuzz target function." ,
57
57
type : "string" ,
58
58
} )
59
- . demandOption ( "fuzzTarget " )
59
+ . demandOption ( "target " )
60
60
61
61
. array ( "corpus" )
62
62
. positional ( "corpus" , {
@@ -162,22 +162,25 @@ yargs(process.argv.slice(2))
162
162
group : "Fuzzer:" ,
163
163
default : false ,
164
164
} )
165
- . boolean ( "coverage " )
166
- . option ( "coverage " , {
165
+ . boolean ( "cov " )
166
+ . option ( "cov " , {
167
167
describe : "Enable code coverage." ,
168
+ alias : "coverage" ,
168
169
type : "boolean" ,
169
170
group : "Fuzzer:" ,
170
171
default : false ,
171
172
} )
172
- . option ( "coverageDirectory " , {
173
+ . option ( "cov_dir " , {
173
174
describe : "Directory for storing coverage reports." ,
175
+ alias : "coverage_directory" ,
174
176
type : "string" ,
175
177
default : "coverage" ,
176
178
group : "Fuzzer:" ,
177
179
} )
178
- . array ( "coverageReporters " )
179
- . option ( "coverageReporters " , {
180
+ . array ( "cov_reporters " )
181
+ . option ( "cov_reporters " , {
180
182
describe : "A list of reporter names for writing coverage reports." ,
183
+ alias : "coverage_reporters" ,
181
184
type : "string" ,
182
185
group : "Fuzzer:" ,
183
186
default : [ "json" , "text" , "lcov" , "clover" ] ,
@@ -188,8 +191,8 @@ yargs(process.argv.slice(2))
188
191
group : "Fuzzer:" ,
189
192
default : 5000 ,
190
193
} )
191
- . array ( "bugDetectors " )
192
- . option ( "bugDetectors " , {
194
+ . array ( "bug_detectors " )
195
+ . option ( "bug_detectors " , {
193
196
describe : "A list of bug detectors to use. By default all are used." ,
194
197
type : "string" ,
195
198
group : "Fuzzer:" ,
@@ -203,7 +206,7 @@ yargs(process.argv.slice(2))
203
206
}
204
207
// noinspection JSIgnoredPromiseFromCall
205
208
startFuzzing ( {
206
- fuzzTarget : ensureFilepath ( args . fuzzTarget ) ,
209
+ fuzzTarget : ensureFilepath ( args . target ) ,
207
210
fuzzEntryPoint : args . fuzz_function ,
208
211
includes : args . instrumentation_includes ,
209
212
excludes : args . instrumentation_excludes ,
@@ -214,10 +217,10 @@ yargs(process.argv.slice(2))
214
217
customHooks : args . custom_hooks ,
215
218
expectedErrors : args . expected_errors ,
216
219
idSyncFile : args . id_sync_file ,
217
- coverage : args . coverage ,
218
- coverageDirectory : args . coverageDirectory ,
219
- coverageReporters : args . coverageReporters ,
220
- bugDetectors : args . bugDetectors ,
220
+ coverage : args . cov ,
221
+ coverageDirectory : args . cov_dir ,
222
+ coverageReporters : args . cov_reporters ,
223
+ bugDetectors : args . bug_detectors ,
221
224
} ) ;
222
225
}
223
226
)
0 commit comments