Build general-fuzzer wrappers for each configuration defined in general_fuzzer_configs.yml and move the actual general-fuzzer to a subdirectory, so oss-fuzz doesn't treat it as a standalone fuzzer.
Signed-off-by: Alexander Bulekov <alx...@bu.edu> Reviewed-by: Darren Kenny <darren.ke...@oracle.com> --- scripts/oss-fuzz/build.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/oss-fuzz/build.sh b/scripts/oss-fuzz/build.sh index d16207eb67..16b9f39d07 100755 --- a/scripts/oss-fuzz/build.sh +++ b/scripts/oss-fuzz/build.sh @@ -87,6 +87,7 @@ make "-j$(nproc)" qemu-fuzz-i386 V=1 # Copy over the datadir cp -r ../pc-bios/ "$DEST_DIR/pc-bios" +cp -r ../pc-bios/ "$DEST_DIR/deps/pc-bios" # Run the fuzzer with no arguments, to print the help-string and get the list # of available fuzz-targets. Copy over the qemu-fuzz-i386, naming it according @@ -97,5 +98,11 @@ do cp qemu-fuzz-i386 "$DEST_DIR/qemu-fuzz-i386-target-$target" done +mkdir -p "$DEST_DIR/deps" +mv "$DEST_DIR/qemu-fuzz-i386-target-general-fuzz" "$DEST_DIR/deps/" + +./scripts/oss-fuzz/build_general_fuzzers.py \ + "./scripts/oss-fuzz/general_fuzzer_configs.yml" "$DEST_DIR/general-fuzz-" + echo "Done. The fuzzers are located in $DEST_DIR" exit 0 -- 2.28.0