mirror of https://gitee.com/bigwinds/arangodb
added tests
This commit is contained in:
parent
b6b381c663
commit
d620386a7b
|
@ -30,7 +30,8 @@ set(BIN_ARANGOIRB arangoirb)
|
|||
set(BIN_ARANGORESTORE arangorestore)
|
||||
set(BIN_ARANGOSH arangosh)
|
||||
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin/")
|
||||
set(TEST_BASICS_SUITE basics_suite)
|
||||
set(TEST_GEO_SUITE geo_suite)
|
||||
|
||||
################################################################################
|
||||
### @brief threads
|
||||
|
@ -43,11 +44,12 @@ find_package(Threads)
|
|||
################################################################################
|
||||
|
||||
if (CMAKE_COMPILER_IS_GNUCC)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu89")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu89 -g")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -g")
|
||||
endif ()
|
||||
|
||||
if (CMAKE_COMPILER_IS_GNUCXX)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++98")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++98 -g")
|
||||
endif ()
|
||||
|
||||
if (APPLE)
|
||||
|
@ -71,6 +73,10 @@ add_definitions("-DTRI_BITS=${BITS}")
|
|||
|
||||
option(USE_MRUBY "Do you want to use MRUBY" OFF)
|
||||
|
||||
if (USE_MRUBY)
|
||||
add_definitions("-DTRI_ENABLE_MRUBY=1")
|
||||
endif ()
|
||||
|
||||
################################################################################
|
||||
### @brief SYSTEM CONFIGURATION DIRECTORY (/etc)
|
||||
################################################################################
|
||||
|
@ -238,6 +244,14 @@ if (USE_MRUBY)
|
|||
add_subdirectory(arangoirb)
|
||||
endif ()
|
||||
|
||||
## -----------------------------------------------------------------------------
|
||||
## --SECTION-- TESTS
|
||||
## -----------------------------------------------------------------------------
|
||||
|
||||
enable_testing()
|
||||
|
||||
add_subdirectory(UnitTests)
|
||||
|
||||
## -----------------------------------------------------------------------------
|
||||
## --SECTION-- PACKAGES
|
||||
## -----------------------------------------------------------------------------
|
||||
|
|
|
@ -0,0 +1,113 @@
|
|||
# -*- mode: CMAKE; -*-
|
||||
|
||||
## -----------------------------------------------------------------------------
|
||||
## --SECTION-- COMMON INCLUDES
|
||||
## -----------------------------------------------------------------------------
|
||||
|
||||
include_directories(.)
|
||||
include_directories(${PROJECT_SOURCE_DIR}/lib)
|
||||
include_directories(${PROJECT_SOURCE_DIR}/arangod)
|
||||
|
||||
## -----------------------------------------------------------------------------
|
||||
## --SECTION-- BOOST FRAMEWORK
|
||||
## -----------------------------------------------------------------------------
|
||||
|
||||
################################################################################
|
||||
### @brief BOOST unit-test framework
|
||||
################################################################################
|
||||
|
||||
find_package(Boost COMPONENTS unit_test_framework)
|
||||
|
||||
## -----------------------------------------------------------------------------
|
||||
## --SECTION-- TEST EXECUTABLES
|
||||
## -----------------------------------------------------------------------------
|
||||
|
||||
################################################################################
|
||||
### @brief output directory
|
||||
################################################################################
|
||||
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/tests/")
|
||||
|
||||
################################################################################
|
||||
### @brief basics_suite
|
||||
################################################################################
|
||||
|
||||
if (Boost_UNIT_TEST_FRAMEWORK_FOUND)
|
||||
|
||||
add_executable(
|
||||
${TEST_BASICS_SUITE}
|
||||
Runner.cpp
|
||||
Philadelphia/conversions-test.cpp
|
||||
Philadelphia/csv-test.cpp
|
||||
Philadelphia/files-test.cpp
|
||||
Philadelphia/json-test.cpp
|
||||
Philadelphia/json-utilities-test.cpp
|
||||
Philadelphia/hashes-test.cpp
|
||||
Philadelphia/mersenne-test.cpp
|
||||
Philadelphia/associative-pointer-test.cpp
|
||||
Philadelphia/associative-synced-test.cpp
|
||||
Philadelphia/string-buffer-test.cpp
|
||||
Philadelphia/string-utf8-normalize-test.cpp
|
||||
Philadelphia/string-utf8-test.cpp
|
||||
Philadelphia/string-test.cpp
|
||||
Philadelphia/structure-size-test.cpp
|
||||
Philadelphia/vector-pointer-test.cpp
|
||||
Philadelphia/vector-test.cpp
|
||||
Jutland/EndpointTest.cpp
|
||||
Jutland/StringBufferTest.cpp
|
||||
Jutland/StringUtilsTest.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(
|
||||
${TEST_BASICS_SUITE}
|
||||
${LIB_ARANGO}
|
||||
${ICU_LIBS}
|
||||
${OPENSSL_LIBS}
|
||||
${ZLIB_LIBS}
|
||||
${Boost_LIBRARIES}
|
||||
)
|
||||
|
||||
add_test(
|
||||
basics
|
||||
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TEST_BASICS_SUITE}
|
||||
)
|
||||
|
||||
endif ()
|
||||
|
||||
################################################################################
|
||||
### @brief geo_suite
|
||||
################################################################################
|
||||
|
||||
if (Boost_UNIT_TEST_FRAMEWORK_FOUND)
|
||||
|
||||
add_executable(
|
||||
${TEST_GEO_SUITE}
|
||||
Cambridge/Runner.cpp
|
||||
Cambridge/georeg.cpp
|
||||
../arangod/GeoIndex/GeoIndex.c
|
||||
)
|
||||
|
||||
target_link_libraries(
|
||||
${TEST_GEO_SUITE}
|
||||
${LIB_ARANGO}
|
||||
${ICU_LIBS}
|
||||
${OPENSSL_LIBS}
|
||||
${ZLIB_LIBS}
|
||||
${Boost_LIBRARIES}
|
||||
)
|
||||
|
||||
add_test(
|
||||
geo
|
||||
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TEST_GEO_SUITE}
|
||||
)
|
||||
|
||||
endif ()
|
||||
|
||||
## -----------------------------------------------------------------------------
|
||||
## --SECTION-- END-OF-FILE
|
||||
## -----------------------------------------------------------------------------
|
||||
|
||||
## Local Variables:
|
||||
## mode: outline-minor
|
||||
## outline-regexp: "^\\(### @brief\\|## --SECTION--\\|# -\\*- \\)"
|
||||
## End:
|
|
@ -11,6 +11,12 @@ include_directories(${PROJECT_SOURCE_DIR}/lib)
|
|||
## --SECTION-- EXECUTABLES
|
||||
## -----------------------------------------------------------------------------
|
||||
|
||||
################################################################################
|
||||
### @brief output directory
|
||||
################################################################################
|
||||
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin/")
|
||||
|
||||
################################################################################
|
||||
### @brief arangod
|
||||
################################################################################
|
||||
|
|
|
@ -12,6 +12,12 @@ include_directories(${PROJECT_SOURCE_DIR}/arangosh)
|
|||
## --SECTION-- EXECUTABLES
|
||||
## -----------------------------------------------------------------------------
|
||||
|
||||
################################################################################
|
||||
### @brief output directory
|
||||
################################################################################
|
||||
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin/")
|
||||
|
||||
################################################################################
|
||||
### @brief arangoirb
|
||||
################################################################################
|
||||
|
|
|
@ -11,6 +11,12 @@ include_directories(${PROJECT_SOURCE_DIR}/lib)
|
|||
## --SECTION-- EXECUTABLES
|
||||
## -----------------------------------------------------------------------------
|
||||
|
||||
################################################################################
|
||||
### @brief output directory
|
||||
################################################################################
|
||||
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin/")
|
||||
|
||||
################################################################################
|
||||
### @brief arangob
|
||||
################################################################################
|
||||
|
|
Loading…
Reference in New Issue