Skip to content

Commit

Permalink
Fix fuzztest when already present in ext (#2554)
Browse files Browse the repository at this point in the history
Also, do not use version in ext for oss-fuzz.

BUG=b/386860183
  • Loading branch information
vrabaud authored Jan 6, 2025
1 parent 66d45c1 commit 04e3714
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions cmake/Modules/LocalFuzztest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ set(FUZZTEST_SOURCE_DIR "${AVIF_SOURCE_DIR}/ext/fuzztest")
if(EXISTS "${FUZZTEST_SOURCE_DIR}")
message(STATUS "libavif(AVIF_FUZZTEST=LOCAL): folder found at ${FUZZTEST_SOURCE_DIR}")
set(FUZZTEST_BINARY_DIR "${FUZZTEST_SOURCE_DIR}/build.libavif")
add_subdirectory(${FUZZTEST_SOURCE_DIR} ${FUZZTEST_BINARY_DIR} EXCLUDE_FROM_ALL)
else()
message(STATUS "libavif(AVIF_FUZZTEST=LOCAL): compiled library not found at ${LIB_FILENAME}; using FetchContent")

Expand All @@ -26,7 +27,7 @@ else()
&& sed -i.bak -e "s/set(GTEST_HAS_ABSL ON)/set(GTEST_HAS_ABSL OFF)/" cmake/BuildDependencies.cmake
)

avif_fetchcontent_populate_cmake(fuzztest)

message(CHECK_PASS "complete")
endif()

avif_fetchcontent_populate_cmake(fuzztest)
2 changes: 1 addition & 1 deletion tests/oss-fuzz/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ if [[ "$SANITIZER" == "memory" ]]; then
fi

# Prepare dependencies.
cd ext && bash aom.cmd && bash dav1d.cmd && bash fuzztest.cmd && bash libjpeg.cmd &&
cd ext && bash aom.cmd && bash dav1d.cmd && bash libjpeg.cmd &&
bash libsharpyuv.cmd && bash libyuv.cmd && bash zlibpng.cmd && cd ..

# build libavif
Expand Down

0 comments on commit 04e3714

Please sign in to comment.