File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,8 @@ with section("parse"):
1212 'NAME': '*',
1313 'SRCS': '*',
1414 'LIBS': '*' ,
15- 'LIBDIRS': '*'}},
15+ 'LIBDIRS': '*',
16+ 'TESTARGS': '*'}},
1617 'add_umf_executable': {
1718 "pargs": 0,
1819 "flags": [],
Original file line number Diff line number Diff line change @@ -40,8 +40,9 @@ function(add_umf_benchmark)
4040 # * SRCS - source files
4141 # * LIBS - libraries to be linked with
4242 # * LIBDIRS - directories of libraries to be linked with
43+ # * TESTARGS - additional arguments to be passed to the add_test
4344 set (oneValueArgs NAME )
44- set (multiValueArgs SRCS LIBS LIBDIRS)
45+ set (multiValueArgs SRCS LIBS LIBDIRS TESTARGS )
4546 cmake_parse_arguments (
4647 ARG
4748 ""
@@ -66,7 +67,7 @@ function(add_umf_benchmark)
6667
6768 add_test (
6869 NAME ${BENCH_NAME}
69- COMMAND ${BENCH_NAME}
70+ COMMAND ${BENCH_NAME} ${ARG_TESTARGS}
7071 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} )
7172
7273 if ("${BENCH_NAME} " STREQUAL "umf-ubench" )
@@ -148,7 +149,9 @@ add_umf_benchmark(
148149 NAME benchmark
149150 SRCS benchmark.cpp
150151 LIBS ${LIBS_OPTIONAL} benchmark::benchmark
151- LIBDIRS ${LIB_DIRS} )
152+ # limit running benchmarks in CI tests to single-threaded
153+ LIBDIRS ${LIB_DIRS}
154+ TESTARGS --benchmark_filter=threads:1$)
152155
153156if (UMF_BUILD_BENCHMARKS_MT)
154157 add_umf_benchmark(
You can’t perform that action at this time.
0 commit comments