mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
fuzzers: rename "fuzz" directory to match our style
Our layout uses names like "examples" or "tests" which is why the "fuzz" directory doesn't really fit in here. Rename the directory to be called "fuzzers" instead. Furthermore, we rename the fuzzer "fuzz_packfile_raw" to "packfile_raw_fuzzer", which is also in line with the already existing fuzzer at google/oss-fuzz. While at it, rename the "packfile_raw" fuzzer to instead just be called "packfile" fuzzer.
This commit is contained in:
@@ -312,7 +312,7 @@ IF(BUILD_FUZZERS)
|
||||
MESSAGE(FATAL_ERROR "Cannot build the fuzzer targets and the tests together")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ADD_SUBDIRECTORY(fuzz)
|
||||
ADD_SUBDIRECTORY(fuzzers)
|
||||
ENDIF()
|
||||
|
||||
IF(CMAKE_VERSION VERSION_GREATER 3)
|
||||
|
||||
@@ -190,9 +190,8 @@ if [ -z "$SKIP_FUZZERS" ]; then
|
||||
echo "## Running fuzzers"
|
||||
echo "##############################################################################"
|
||||
|
||||
for fuzzer in $(find ./fuzz/ -type f -executable); do
|
||||
fuzzer_name=$(basename "${fuzzer}")
|
||||
"${fuzzer}" "../fuzz/corpora/${fuzzer_name}" || die $?
|
||||
for fuzzer in fuzzers/*_fuzzer; do
|
||||
"${fuzzer}" "../fuzzers/corpora/$(basename "${fuzzer%_fuzzer}")" || die $?
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
LINK_DIRECTORIES(${LIBGIT2_LIBDIRS})
|
||||
INCLUDE_DIRECTORIES(${LIBGIT2_INCLUDES})
|
||||
|
||||
FILE(GLOB SRC_FUZZ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} fuzz_*.c)
|
||||
FILE(GLOB SRC_FUZZ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *_fuzzer.c)
|
||||
FOREACH(fuzz_target_src ${SRC_FUZZ})
|
||||
STRING(REPLACE ".c" "" fuzz_target_name ${fuzz_target_src})
|
||||
SET(${fuzz_target_name}_SOURCES ${fuzz_target_src} ${LIBGIT2_OBJECTS})
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user