Files
xone_macos/tests/CMakeLists.txt
T
portersky 2d4366f454 feat: port GIP protocol and auth stack
Port the GIP protocol and authentication layers from medusalix/xone
into the C++ stack:

- crypto: SHA-256/HMAC (CommonCrypto), RSA PKCS#1 (Security.framework),
  and a self-contained P-256 ECDH validated against OpenSSL vectors
- auth: v1 (RSA) and v2 (ECDH) handshake state machine
- gip: header/varint/chunk handling and packet dispatch, with the kernel
  device model replaced by transport + client_listener interfaces

Adds test_crypto, test_auth, and test_gip suites.

Co-Authored-By: deepseek (deepseek/deepseek-v4-pro-0813): ported crypto, auth, and GIP
2026-08-17 15:04:44 +02:00

48 lines
1.9 KiB
CMake

set(TEST_TARGETS "")
add_executable(test_version test_version.cpp)
target_include_directories(test_version PRIVATE "${CMAKE_SOURCE_DIR}/include")
target_link_libraries(test_version PRIVATE xone_api Unity::Unity)
target_compile_features(test_version PRIVATE cxx_std_23)
target_compile_definitions(test_version PRIVATE XONE_VERSION="${PROJECT_VERSION}")
add_test(NAME test_version COMMAND test_version)
list(APPEND TEST_TARGETS test_version)
add_executable(test_types test_types.cpp)
target_include_directories(test_types PRIVATE "${CMAKE_SOURCE_DIR}/include")
target_link_libraries(test_types PRIVATE Unity::Unity)
target_compile_features(test_types PRIVATE cxx_std_23)
add_test(NAME test_types COMMAND test_types)
list(APPEND TEST_TARGETS test_types)
add_executable(test_crypto test_crypto.cpp)
target_include_directories(test_crypto PRIVATE "${CMAKE_SOURCE_DIR}/include")
target_link_libraries(test_crypto PRIVATE xone_auth Unity::Unity)
target_compile_features(test_crypto PRIVATE cxx_std_23)
add_test(NAME test_crypto COMMAND test_crypto)
list(APPEND TEST_TARGETS test_crypto)
add_executable(test_auth test_auth.cpp)
target_include_directories(test_auth PRIVATE "${CMAKE_SOURCE_DIR}/include")
target_link_libraries(test_auth PRIVATE xone_auth Unity::Unity)
target_compile_features(test_auth PRIVATE cxx_std_23)
add_test(NAME test_auth COMMAND test_auth)
list(APPEND TEST_TARGETS test_auth)
add_executable(test_gip test_gip.cpp)
target_include_directories(test_gip PRIVATE "${CMAKE_SOURCE_DIR}/include")
target_link_libraries(test_gip PRIVATE xone_gip Unity::Unity)
target_compile_features(test_gip PRIVATE cxx_std_23)
add_test(NAME test_gip COMMAND test_gip)
list(APPEND TEST_TARGETS test_gip)
add_custom_target(check
COMMAND ${CMAKE_CTEST_COMMAND}
--test-dir "${CMAKE_BINARY_DIR}"
--output-on-failure
--progress
WORKING_DIRECTORY "${CMAKE_BINARY_DIR}"
USES_TERMINAL
DEPENDS ${TEST_TARGETS}
)