cleanup after #207

This commit is contained in:
Niels 2016-02-14 18:38:29 +01:00
parent ec098ffcc2
commit 153e105164
4 changed files with 30 additions and 26 deletions

View file

@ -9,7 +9,7 @@ all: json_unit
# clean up
clean:
rm -f json_unit json_benchmarks fuzz
rm -fr json_unit json_benchmarks fuzz fuzz-testing *.dSYM
##########################################################################
@ -28,11 +28,19 @@ json_unit: test/unit.cpp src/json.hpp test/catch.hpp
# fuzzing
##########################################################################
# the overall fuzz testing target
fuzz_testing:
rm -fr fuzz-testing
mkdir -p fuzz-testing fuzz-testing/testcases fuzz-testing/out
$(MAKE) fuzz CXX=afl-clang++
mv fuzz fuzz-testing
find test/json_tests -size -5k -name *json | xargs -I{} cp "{}" fuzz-testing/testcases
@echo "Execute: afl-fuzz -i fuzz-testing/testcases -o fuzz-testing/out fuzz-testing/fuzz"
# the fuzzer binary
fuzz: test/fuzz.cpp src/json.hpp
$(CXX) -std=c++11 $(CXXFLAGS) $(FLAGS) $(CPPFLAGS) -I src -I test $< $(LDFLAGS) -lstdc++ -lm -o $@
fuzz_testcases:
mkdir -p testcases && find test/ -size -5k -name *json | xargs -I{} cp "{}" testcases
@echo "Test cases suitable for fuzzing have been copied into the testcases directory"
$(CXX) -std=c++11 $(CXXFLAGS) $(FLAGS) $(CPPFLAGS) -I src $< $(LDFLAGS) -o $@
##########################################################################
# static analyzer