aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt31
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 ()