@@ -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" ] ,
@@ -196,7 +199,7 @@ yargs(process.argv.slice(2))
196
199
}
197
200
// noinspection JSIgnoredPromiseFromCall
198
201
startFuzzing ( {
199
- fuzzTarget : ensureFilepath ( args . fuzzTarget ) ,
202
+ fuzzTarget : ensureFilepath ( args . target ) ,
200
203
fuzzEntryPoint : args . fuzz_function ,
201
204
includes : args . instrumentation_includes ,
202
205
excludes : args . instrumentation_excludes ,
@@ -207,9 +210,9 @@ yargs(process.argv.slice(2))
207
210
customHooks : args . custom_hooks ,
208
211
expectedErrors : args . expected_errors ,
209
212
idSyncFile : args . id_sync_file ,
210
- coverage : args . coverage ,
211
- coverageDirectory : args . coverageDirectory ,
212
- coverageReporters : args . coverageReporters ,
213
+ coverage : args . cov ,
214
+ coverageDirectory : args . cov_dir ,
215
+ coverageReporters : args . cov_reporters ,
213
216
} ) ;
214
217
}
215
218
)
0 commit comments