From ca6f69424f900a6ec3580c249b1b66c1ddf76948 Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Sun, 14 Jun 2026 23:34:15 -0400 Subject: [PATCH] Run fuzz corpus from ctest --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) 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)