fuzzers: don't build binaries for disabled protocols

While there is a merit to test if disabled protocols doesn't crash or
something, such test can be made as simple unit tests, no fuzzing needed.
This commit is contained in:
Kacper Michajłow 2024-05-15 14:19:05 +02:00
parent 1f7c223749
commit fd1c13f9b3
1 changed files with 20 additions and 2 deletions

View File

@ -5,8 +5,26 @@ executable('fuzzer_loadfile', 'fuzzer_loadfile.c',
executable('fuzzer_loadfile_direct', 'fuzzer_loadfile_direct.c',
include_directories: incdir, link_with: libmpv)
foreach p : ['bd', 'cdda', 'dvb', 'dvd', 'edl', 'file', 'hex', 'lavf', 'memory',
'mf', 'slice', 'smb']
protocols = ['edl', 'file', 'hex', 'lavf', 'memory', 'mf', 'slice', 'smb']
if features['cdda']
protocols += ['cdda']
endif
if features['dvbin']
protocols += ['dvb']
endif
if features['dvdnav']
# TODO: This needs folder structure to load.
protocols += ['dvd']
endif
if features['libbluray']
# TODO: This needs folder structure to load.
protocols += ['bd']
endif
if features['libarchive']
protocols += ['archive']
endif
foreach p : protocols
executable('fuzzer_protocol_' + p,
'fuzzer_loadfile_direct.c',
c_args: ['-DMPV_PROTO=' + p, '-DMPV_PROTO_' + p.to_upper()],