46 lines
1.8 KiB
CMake
46 lines
1.8 KiB
CMake
# mars-nwe FLAIM integration tests.
|
|
#
|
|
# These tests live in the mars-nwe root test tree instead of the imported FLAIM
|
|
# submodule because they validate the complete mars-nwe integration contract:
|
|
# nw-prefixed libraries, nwssl-backed OpenSSL compatibility, MatrixSSL crypto
|
|
# configuration propagation, and the FLAIM stack used by nwdirectory.
|
|
|
|
if(NOT ENABLE_DIRECTORY)
|
|
message(STATUS "mars-nwe FLAIM tests disabled: ENABLE_DIRECTORY is OFF")
|
|
return()
|
|
endif()
|
|
|
|
if(NOT TARGET flaim)
|
|
message(FATAL_ERROR "mars-nwe FLAIM tests require the flaim target")
|
|
endif()
|
|
|
|
function(mars_nwe_add_flaim_test target source library)
|
|
add_executable(${target} ${source})
|
|
target_link_libraries(${target} PRIVATE ${library})
|
|
set_target_properties(${target} PROPERTIES CXX_STANDARD 98 CXX_STANDARD_REQUIRED YES)
|
|
endfunction()
|
|
|
|
mars_nwe_add_flaim_test(mars_nwe_flaim_api_smoke flaim_api_smoke.cpp flaim)
|
|
add_test(NAME mars_nwe.flaim.api-create-query-encrypt
|
|
COMMAND mars_nwe_flaim_api_smoke ${CMAKE_CURRENT_BINARY_DIR}/flaim-api)
|
|
set_tests_properties(mars_nwe.flaim.api-create-query-encrypt PROPERTIES
|
|
LABELS "mars_nwe;flaim"
|
|
ENVIRONMENT "TERM=xterm")
|
|
|
|
if(TARGET xflaim)
|
|
mars_nwe_add_flaim_test(mars_nwe_xflaim_api_smoke xflaim_api_smoke.cpp xflaim)
|
|
add_test(NAME mars_nwe.xflaim.api-alloc
|
|
COMMAND mars_nwe_xflaim_api_smoke)
|
|
set_tests_properties(mars_nwe.xflaim.api-alloc PROPERTIES
|
|
LABELS "mars_nwe;flaim;xflaim"
|
|
ENVIRONMENT "TERM=xterm")
|
|
endif()
|
|
|
|
if(TARGET flaimsql)
|
|
mars_nwe_add_flaim_test(mars_nwe_flaimsql_header_link_smoke flaimsql_header_link_smoke.cpp flaimsql)
|
|
add_test(NAME mars_nwe.flaimsql.header-link
|
|
COMMAND mars_nwe_flaimsql_header_link_smoke)
|
|
set_tests_properties(mars_nwe.flaimsql.header-link PROPERTIES
|
|
LABELS "mars_nwe;flaim;flaimsql")
|
|
endif()
|