@@ -69,7 +69,8 @@ def main():
69
69
)
70
70
parser .add_argument (
71
71
'--m_dir' ,
72
- help = 'Merge inputs from this directory into the corpus_dir.' ,
72
+ action = "append" ,
73
+ help = "Merge inputs from these directories into the corpus_dir." ,
73
74
)
74
75
parser .add_argument (
75
76
'-g' ,
@@ -176,7 +177,7 @@ def main():
176
177
test_list = test_list_selection ,
177
178
src_dir = config ['environment' ]['SRCDIR' ],
178
179
build_dir = config ["environment" ]["BUILDDIR" ],
179
- merge_dir = args .m_dir ,
180
+ merge_dirs = [ Path ( m_dir ) for m_dir in args .m_dir ] ,
180
181
)
181
182
return
182
183
@@ -270,8 +271,8 @@ def job(command, t, t_env):
270
271
future .result ()
271
272
272
273
273
- def merge_inputs (* , fuzz_pool , corpus , test_list , src_dir , build_dir , merge_dir ):
274
- logging .info ("Merge the inputs from the passed dir into the corpus_dir. Passed dir {}" . format ( merge_dir ) )
274
+ def merge_inputs (* , fuzz_pool , corpus , test_list , src_dir , build_dir , merge_dirs ):
275
+ logging .info (f "Merge the inputs from the passed dir into the corpus_dir. Passed dirs { merge_dirs } " )
275
276
jobs = []
276
277
for t in test_list :
277
278
args = [
@@ -289,10 +290,10 @@ def merge_inputs(*, fuzz_pool, corpus, test_list, src_dir, build_dir, merge_dir)
289
290
# [0] https://github.com/google/oss-fuzz/issues/1406#issuecomment-387790487
290
291
# [1] https://github.com/bitcoin-core/qa-assets/issues/130#issuecomment-1749075891
291
292
os .path .join (corpus , t ),
292
- os .path .join (merge_dir , t ),
293
- ]
293
+ ] + [str (m_dir / t ) for m_dir in merge_dirs ]
294
294
os .makedirs (os .path .join (corpus , t ), exist_ok = True )
295
- os .makedirs (os .path .join (merge_dir , t ), exist_ok = True )
295
+ for m_dir in merge_dirs :
296
+ (m_dir / t ).mkdir (exist_ok = True )
296
297
297
298
def job (t , args ):
298
299
output = 'Run {} with args {}\n ' .format (t , " " .join (args ))
0 commit comments