From 5860b43d94add849d97ef880e666bc54810b03df Mon Sep 17 00:00:00 2001 From: 0xFFFC0000 <0xFFFC0000@proton.me> Date: Wed, 24 Sep 2025 12:05:00 +0000 Subject: [PATCH] tests: only enable fuzz testing if ENABLE_FUZZ_TEST defined --- .github/workflows/build.yml | 2 +- CMakeLists.txt | 1 + tests/CMakeLists.txt | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 685549d7a..b102f4666 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,7 +14,7 @@ on: env: REMOVE_BUNDLED_PACKAGES : sudo rm -rf /usr/local # ARCH="default" (not "native") ensures, that a different execution host can execute binaries compiled elsewhere. - BUILD_DEFAULT_LINUX: 'cmake -S . -B build -D ARCH="default" -D BUILD_TESTS=ON -D CMAKE_BUILD_TYPE=Release && cmake --build build --target all && cmake --build build --target wallet_api' + BUILD_DEFAULT_LINUX: 'cmake -S . -B build -D ARCH="default" -D BUILD_TESTS=ON -D ENABLE_FUZZ_TEST=ON -D CMAKE_BUILD_TYPE=Release && cmake --build build --target all && cmake --build build --target wallet_api' APT_INSTALL_LINUX: 'apt -y install build-essential cargo cmake libboost-all-dev miniupnpc libunbound-dev graphviz doxygen libunwind8-dev pkg-config libssl-dev libzmq3-dev libsodium-dev libhidapi-dev libusb-1.0-0-dev libprotobuf-dev protobuf-compiler ccache curl git' APT_SET_CONF: | tee -a /etc/apt/apt.conf.d/80-custom << EOF diff --git a/CMakeLists.txt b/CMakeLists.txt index 28912be36..6e58df731 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1152,6 +1152,7 @@ add_subdirectory(contrib) add_subdirectory(src) find_package(PythonInterp) +option(ENABLE_FUZZ_TEST "Enable fuzz testing." OFF) if(BUILD_TESTS) message(STATUS "Building tests") add_subdirectory(tests) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 147fdf096..d5bbb3973 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -53,7 +53,9 @@ if (CMAKE_BUILD_TYPE STREQUAL "fuzz" OR OSSFUZZ) add_subdirectory(fuzz) else () add_subdirectory(core_tests) - add_subdirectory(fuzz) + if (ENABLE_FUZZ_TEST) + add_subdirectory(fuzz) + endif() add_subdirectory(crypto) add_subdirectory(functional_tests) add_subdirectory(performance_tests)