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:
@ -28,7 +28,9 @@ project(MaxScale)
|
|||||||
include(${CMAKE_SOURCE_DIR}/cmake/install_layout.cmake)
|
include(${CMAKE_SOURCE_DIR}/cmake/install_layout.cmake)
|
||||||
|
|
||||||
# Do the platform check
|
# Do the platform check
|
||||||
include(cmake/CheckPlatform.cmake)
|
if (NOT BUILD_SYSTEM_TESTS)
|
||||||
|
include(cmake/CheckPlatform.cmake)
|
||||||
|
endif()
|
||||||
|
|
||||||
check_dirs()
|
check_dirs()
|
||||||
find_package(OpenSSL)
|
find_package(OpenSSL)
|
||||||
@ -60,7 +62,7 @@ include(cmake/BuildMicroHttpd.cmake)
|
|||||||
|
|
||||||
include_directories(${JANSSON_INCLUDE_DIR})
|
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")
|
message(FATAL_ERROR "Failed to locate dependency: OpenSSL")
|
||||||
else()
|
else()
|
||||||
if(OPENSSL_VERSION VERSION_LESS 1 AND NOT FORCE_OPENSSL100)
|
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
|
${CMAKE_BINARY_DIR}/maxctrl-test/ # Location where tests are built and run
|
||||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
|
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")
|
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()
|
endif()
|
||||||
else()
|
else()
|
||||||
|
|||||||
@ -67,7 +67,7 @@ if [ $res == 0 ] ; then
|
|||||||
cd ${script_dir}/../../
|
cd ${script_dir}/../../
|
||||||
|
|
||||||
mkdir build && cd build
|
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
|
cd maxscale-system-test
|
||||||
make
|
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")
|
message(FATAL_ERROR "SQLite version 3.3 or higher is required")
|
||||||
else()
|
else()
|
||||||
add_library(mysqlauth SHARED mysql_auth.cc dbusers.cc)
|
add_library(mysqlauth SHARED mysql_auth.cc dbusers.cc)
|
||||||
|
|||||||
@ -24,6 +24,8 @@ if(BISON_FOUND AND FLEX_FOUND)
|
|||||||
if(BUILD_TESTS)
|
if(BUILD_TESTS)
|
||||||
add_subdirectory(test)
|
add_subdirectory(test)
|
||||||
endif()
|
endif()
|
||||||
|
elseif (BUILD_SYSTEM_TESTS)
|
||||||
|
message(STATUS "Not building dbfwfilter when tests are built and both flex and bison were not found")
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Could not find Bison or Flex: ${BISON_EXECUTABLE} ${FLEX_EXECUTABLE}")
|
message(FATAL_ERROR "Could not find Bison or Flex: ${BISON_EXECUTABLE} ${FLEX_EXECUTABLE}")
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Reference in New Issue
Block a user