Fuzzing: Move LPM build to oss-fuzz Dockerfile by default

This commit is contained in:
Roger A. Light
2025-12-12 13:52:55 +00:00
parent b975babe78
commit d161682199
2 changed files with 9 additions and 17 deletions
-12
View File
@@ -29,18 +29,6 @@ cmake \
make -j $(nproc)
make install
cd ${SRC}/libprotobuf-mutator
cmake \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_BUILD_TYPE=Debug \
-DLIB_PROTO_MUTATOR_DOWNLOAD_PROTOBUF=ON \
-DLIB_PROTO_MUTATOR_EXAMPLES=OFF \
-DLIB_PROTO_MUTATOR_TESTING=OFF \
.
make -j $(nproc)
make install
# Build broker and library static libraries
cd ${SRC}/mosquitto
make \
+9 -5
View File
@@ -34,9 +34,13 @@ apt-get update && apt-get install -y \
ninja-build \
pkg-config
git clone https://github.com/ralight/cJSON ${SRC}/cJSON
git clone https://github.com/google/libprotobuf-mutator ${SRC}/libprotobuf-mutator
mkdir ${SRC}/LPM
cd ${SRC}/LPM
cmake ../libprotobuf-mutator -GNinja -DLIB_PROTO_MUTATOR_DOWNLOAD_PROTOBUF=ON -DLIB_PROTO_MUTATOR_TESTING=OFF -DCMAKE_BUILD_TYPE=Release
ninja
# If building outside of oss-fuzz, we need LPM
if [ ! -d ${SRC}/LPM ]; then
git clone https://github.com/google/libprotobuf-mutator ${SRC}/libprotobuf-mutator
mkdir ${SRC}/LPM \
&& cd ${SRC}/LPM \
&& cmake ../libprotobuf-mutator -GNinja -DLIB_PROTO_MUTATOR_DOWNLOAD_PROTOBUF=ON -DLIB_PROTO_MUTATOR_TESTING=OFF -DCMAKE_BUILD_TYPE=Release \
&& ninja
fi