tests: only enable fuzz testing if ENABLE_FUZZ_TEST defined

This commit is contained in:
0xFFFC0000 2025-09-24 12:05:00 +00:00
parent 8d4c625713
commit 5860b43d94
3 changed files with 5 additions and 2 deletions

View file

@ -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

View file

@ -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)

View file

@ -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)