diff options
| author | Thomas Vanbesien <tvanbesi@proton.me> | 2026-02-17 11:07:37 +0100 |
|---|---|---|
| committer | Thomas Vanbesien <tvanbesi@proton.me> | 2026-02-17 11:07:37 +0100 |
| commit | a54421dd976fd8081e96c11c2621076876c9986b (patch) | |
| tree | a7614934364bc692dd94ee13a3ec6d242521194b /CMakeLists.txt | |
| parent | d1e229c80a6e51ccc5b21d001271c41d6cda30bf (diff) | |
| download | BobinkCOpcUa-a54421dd976fd8081e96c11c2621076876c9986b.tar.gz BobinkCOpcUa-a54421dd976fd8081e96c11c2621076876c9986b.zip | |
Replace CLI arguments with config-file parser and add integration tests
Introduce a reusable key=value config parser (config.h/c) and convert
all three programs to read their settings from config files instead of
positional command-line arguments. Add example config files in config/
and 6 CTest integration tests covering None/Basic256Sha256/Aes128 with
anonymous and user authentication. Remove the now-obsolete launch.sh.
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 4075e49..93e472d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) include(cmake/BuildDeps.cmake) -add_library(DiscoveryCommon STATIC src/common.c) +add_library(DiscoveryCommon STATIC src/common.c src/config.c) target_link_libraries(DiscoveryCommon open62541::open62541) add_executable(ClientFindServers src/client_find_servers.c) @@ -25,3 +25,32 @@ if(BUILD_DOC) COMMENT "Building open62541 HTML documentation" VERBATIM) endif() + +# ── Integration tests ─────────────────────────────────────────── +enable_testing () + +set (_test_script "${CMAKE_SOURCE_DIR}/tests/run_test.sh") + +set (_test_names + none_anon + none_user + basic256sha256_anon + basic256sha256_user + aes128_anon + aes128_user) + +set (_test_policies + None + None + Basic256Sha256 + Basic256Sha256 + Aes128_Sha256_RsaOaep + Aes128_Sha256_RsaOaep) + +foreach (_name _policy IN ZIP_LISTS _test_names _test_policies) + add_test (NAME "${_name}" + COMMAND bash "${_test_script}" "tests/${_name}" "${_policy}") + set_tests_properties ("${_name}" PROPERTIES + WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" + TIMEOUT 30) +endforeach () |
