Skip to content

Commit 07beec0

Browse files
committed
Add IPC test with UMF_MAX_OPENED_IPC_HANDLES set
1 parent 9d75672 commit 07beec0

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

.cmake-format

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ with section("parse"):
2626
'kwargs': {
2727
'NAME': '*',
2828
'SRCS': '*',
29-
'LIBS': '*'}},
29+
'LIBS': '*',
30+
'ENVS': '*'}},
3031
'add_umf_library': {
3132
"pargs": 0,
3233
"flags": [],

test/CMakeLists.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,9 @@ function(add_umf_test)
116116
# * NAME - a name of the test
117117
# * SRCS - source files
118118
# * LIBS - libraries to be linked with
119+
# * ENVS - environment variables
119120
set(oneValueArgs NAME)
120-
set(multiValueArgs SRCS LIBS)
121+
set(multiValueArgs SRCS LIBS ENVS)
121122
cmake_parse_arguments(
122123
ARG
123124
""
@@ -139,6 +140,9 @@ function(add_umf_test)
139140
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
140141

141142
set_tests_properties(${TEST_NAME} PROPERTIES LABELS "umf")
143+
if(ARG_ENVS)
144+
set_tests_properties(${TEST_NAME} PROPERTIES ENVIRONMENT ${ARG_ENVS})
145+
endif()
142146

143147
if(WINDOWS)
144148
# add PATH to DLL on Windows
@@ -515,6 +519,12 @@ add_umf_test(
515519
SRCS ipcAPI.cpp ${BA_SOURCES_FOR_TEST}
516520
LIBS ${UMF_UTILS_FOR_TEST})
517521

522+
add_umf_test(
523+
NAME ipc_max_opened_limit
524+
SRCS ipcAPI.cpp ${BA_SOURCES_FOR_TEST}
525+
LIBS ${UMF_UTILS_FOR_TEST}
526+
ENVS "UMF_MAX_OPENED_IPC_HANDLES=10")
527+
518528
add_umf_test(NAME ipc_negative SRCS ipc_negative.cpp)
519529

520530
function(add_umf_ipc_test)

0 commit comments

Comments
 (0)