Add workaround to building tests without all dependencies
The system tests can be build even if not all of the dependencies for MaxScale are met.
This commit is contained in:
parent
67df3ad4f0
commit
d428292ec0
@ -28,7 +28,9 @@ project(MaxScale)
|
||||
include(${CMAKE_SOURCE_DIR}/cmake/install_layout.cmake)
|
||||
|
||||
# Do the platform check
|
||||
include(cmake/CheckPlatform.cmake)
|
||||
if (NOT BUILD_SYSTEM_TESTS)
|
||||
include(cmake/CheckPlatform.cmake)
|
||||
endif()
|
||||
|
||||
check_dirs()
|
||||
find_package(OpenSSL)
|
||||
@ -60,7 +62,7 @@ include(cmake/BuildMicroHttpd.cmake)
|
||||
|
||||
include_directories(${JANSSON_INCLUDE_DIR})
|
||||
|
||||
if(NOT OPENSSL_FOUND)
|
||||
if(NOT OPENSSL_FOUND AND NOT BUILD_SYSTEM_TESTS)
|
||||
message(FATAL_ERROR "Failed to locate dependency: OpenSSL")
|
||||
else()
|
||||
if(OPENSSL_VERSION VERSION_LESS 1 AND NOT FORCE_OPENSSL100)
|
||||
|
@ -19,7 +19,7 @@ if (BUILD_MAXCTRL)
|
||||
${CMAKE_BINARY_DIR}/maxctrl-test/ # Location where tests are built and run
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
|
||||
else()
|
||||
elseif(NOT BUILD_SYSTEM_TESTS)
|
||||
message(FATAL_ERROR "Not building MaxCtrl: npm or Node.js >= 6.0.0 not found. Add the following to skip MaxCtrl: -DBUILD_MAXCTRL=N")
|
||||
endif()
|
||||
else()
|
||||
|
@ -67,7 +67,7 @@ if [ $res == 0 ] ; then
|
||||
cd ${script_dir}/../../
|
||||
|
||||
mkdir build && cd build
|
||||
cmake ../../ -DWITH_SYSTEM_TESTS -DBUILDNAME=$name -DCMAKE_BUILD_TYPE=Debug
|
||||
cmake ../../ -DBUILD_SYSTEM_TESTS=Y -DBUILDNAME=$name -DCMAKE_BUILD_TYPE=Debug
|
||||
cd maxscale-system-test
|
||||
make
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
if(SQLITE_VERSION VERSION_LESS 3.3)
|
||||
if(SQLITE_VERSION VERSION_LESS 3.3 AND NOT BUILD_SYSTEM_TESTS)
|
||||
message(FATAL_ERROR "SQLite version 3.3 or higher is required")
|
||||
else()
|
||||
add_library(mysqlauth SHARED mysql_auth.cc dbusers.cc)
|
||||
|
@ -24,6 +24,8 @@ if(BISON_FOUND AND FLEX_FOUND)
|
||||
if(BUILD_TESTS)
|
||||
add_subdirectory(test)
|
||||
endif()
|
||||
elseif (BUILD_SYSTEM_TESTS)
|
||||
message(STATUS "Not building dbfwfilter when tests are built and both flex and bison were not found")
|
||||
else()
|
||||
message(FATAL_ERROR "Could not find Bison or Flex: ${BISON_EXECUTABLE} ${FLEX_EXECUTABLE}")
|
||||
endif()
|
||||
|
Loading…
x
Reference in New Issue
Block a user