From f8d640b185c4b34bfb651250eb3b7113caf0317b Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Tue, 3 Jan 2017 22:35:31 +0100 Subject: [PATCH] :construction_worker: better support for OSS-Fuzz --- test/Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/Makefile b/test/Makefile index 68520bd3..678276ba 100644 --- a/test/Makefile +++ b/test/Makefile @@ -51,7 +51,7 @@ TESTCASES = $(patsubst src/unit-%.cpp,test-%,$(wildcard src/unit-*.cpp)) all: $(TESTCASES) clean: - rm -fr json_unit $(OBJECTS) $(SOURCES:.cpp=.gcno) $(SOURCES:.cpp=.gcda) $(TESTCASES) + rm -fr json_unit $(OBJECTS) $(SOURCES:.cpp=.gcno) $(SOURCES:.cpp=.gcda) $(TESTCASES) parse_afl_fuzzer parse_cbor_fuzzer parse_msgpack_fuzzer ############################################################################## # single test file @@ -84,13 +84,14 @@ check: $(TESTCASES) # fuzzer ############################################################################## +FUZZER_ENGINE = src/fuzzer-driver_afl.cpp fuzzers: parse_afl_fuzzer parse_cbor_fuzzer parse_msgpack_fuzzer parse_afl_fuzzer: - $(CXX) $(CXXFLAGS) $(CPPFLAGS) src/fuzzer-driver_afl.cpp src/fuzzer-parse_json.cpp -o $@ + $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(FUZZER_ENGINE) src/fuzzer-parse_json.cpp -o $@ parse_cbor_fuzzer: - $(CXX) $(CXXFLAGS) $(CPPFLAGS) src/fuzzer-driver_afl.cpp src/fuzzer-parse_cbor.cpp -o $@ + $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(FUZZER_ENGINE) src/fuzzer-parse_cbor.cpp -o $@ parse_msgpack_fuzzer: - $(CXX) $(CXXFLAGS) $(CPPFLAGS) src/fuzzer-driver_afl.cpp src/fuzzer-parse_msgpack.cpp -o $@ + $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(FUZZER_ENGINE) src/fuzzer-parse_msgpack.cpp -o $@