diff --git a/CMakeLists.txt b/CMakeLists.txt index 8e353cf..fcbe832 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -180,6 +180,12 @@ else() target_compile_options(fuzz PRIVATE ${TEST_FLAGS}) endif() +# Replay the checked-in corpus through the fuzz target as a regression test. +file(GLOB corpus_files ${CMAKE_CURRENT_SOURCE_DIR}/corpus/*) +if(corpus_files) + add_test(NAME fuzz_corpus COMMAND fuzz ${corpus_files}) +endif() + add_executable(validate src/validate.cpp) target_link_libraries(validate ${PROJECT_NAME}-static) target_include_directories(validate PRIVATE include)