Skip to content

Commit

Permalink
test: run functional tests from ctest
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonOdiwuor committed Nov 18, 2024
1 parent b0222bb commit 1a97769
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ option(BUILD_FOR_FUZZING "Build for fuzzing. Enabling this will disable all othe

option(INSTALL_MAN "Install man pages." ON)

option(ENABLE_FUNCTIONAL_TESTS "Include functional tests on ctest" OFF)

set(APPEND_CPPFLAGS "" CACHE STRING "Preprocessor flags that are appended to the command line after all other flags added by the build system. This variable is intended for debugging and special builds.")
set(APPEND_CFLAGS "" CACHE STRING "C compiler flags that are appended to the command line after all other flags added by the build system. This variable is intended for debugging and special builds.")
set(APPEND_CXXFLAGS "" CACHE STRING "(Objective) C++ compiler flags that are appended to the command line after all other flags added by the build system. This variable is intended for debugging and special builds.")
Expand Down
6 changes: 6 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,9 @@ foreach(script ${functional_tests} fuzz/test_runner.py util/rpcauth-test.py util
file(CREATE_LINK ${CMAKE_CURRENT_SOURCE_DIR}/${script} ${CMAKE_CURRENT_BINARY_DIR}/${script} COPY_ON_ERROR ${symlink})
endforeach()
unset(functional_tests)

if (ENABLE_FUNCTIONAL_TESTS AND PYTHON_COMMAND)
add_test(NAME functional_test_runner
COMMAND ${PYTHON_COMMAND} ${PROJECT_BINARY_DIR}/test/functional/test_runner.py
)
endif()

0 comments on commit 1a97769

Please sign in to comment.