[fuzzer] Update scripts for new fuzzers
authorNick Terrell <terrelln@fb.com>
Thu, 18 Jul 2019 00:41:41 +0000 (17:41 -0700)
committerNick Terrell <terrelln@fb.com>
Thu, 18 Jul 2019 19:29:15 +0000 (12:29 -0700)
ossfuzz/Makefile
ossfuzz/ossfuzz.sh
ossfuzz/travisoss.sh

index 4d24944..2bb40ec 100644 (file)
@@ -35,6 +35,14 @@ LZ4_CFLAGS  = $(CFLAGS) $(DEBUGFLAGS) $(MOREFLAGS)
 LZ4_CXXFLAGS = $(CXXFLAGS) $(DEBUGFLAGS) $(MOREFLAGS)
 LZ4_CPPFLAGS = $(CPPFLAGS) -I$(LZ4DIR) -DXXH_NAMESPACE=LZ4_
 
+FUZZERS := \
+       compress_fuzzer \
+       decompress_fuzzer \
+       round_trip_fuzzer \
+       round_trip_stream_fuzzer
+
+all: $(FUZZERS)
+
 # Include a rule to build the static library if calling this target
 # directly.
 $(LZ4DIR)/liblz4.a:
index a76b0d6..9782286 100755 (executable)
@@ -16,8 +16,8 @@ echo "OUT: $OUT"
 export MAKEFLAGS+="-j$(nproc)"
 
 pushd ossfuzz
-make V=1 compress_fuzzer decompress_fuzzer
+make V=1 all
 popd
 
 # Copy the fuzzers to the target directory.
-cp -v ossfuzz/compress_fuzzer ossfuzz/decompress_fuzzer $OUT/
+cp -v ossfuzz/*_fuzzer $OUT/
index 3b2f26f..5ea884c 100755 (executable)
@@ -8,10 +8,7 @@ git clone https://github.com/google/oss-fuzz.git /tmp/ossfuzz
 if [[ ! -d /tmp/ossfuzz/projects/lz4 ]]
 then
     echo "Could not find the lz4 project in ossfuzz"
-
-    # Exit with a success code while the lz4 project is not expected to exist
-    # on oss-fuzz.
-    exit 0
+    exit 1
 fi
 
 # Modify the oss-fuzz Dockerfile so that we're checking out the current branch on travis.