aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2026-06-18 20:39:59 +0200
committerEgor Tensin <egor@tensin.name>2026-06-18 20:39:59 +0200
commitff66e906bebb2bab972e92e056b94bd6a9391c3e (patch)
treeb184540c7e5f792449d2ddb1a6fe1b21884b82d4 /test
parentcmake: use a more common warnings option (diff)
downloadcimple-ff66e906bebb2bab972e92e056b94bd6a9391c3e.tar.gz
cimple-ff66e906bebb2bab972e92e056b94bd6a9391c3e.zip
cmake: prettify CMakeLists.txt files
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt28
1 files changed, 19 insertions, 9 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index e31662f..c369729 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -18,38 +18,48 @@ set(python_test_args
--worker "$<TARGET_FILE:worker>"
--client "$<TARGET_FILE:client>"
--sigsegv "$<TARGET_FILE:sigsegv>"
- --project-version "${PROJECT_VERSION}")
+ --project-version "${PROJECT_VERSION}"
+)
function(add_python_tests name)
list(POP_FRONT ARGV)
add_test(NAME "${name}"
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/src"
- COMMAND ${ARGV})
+ COMMAND ${ARGV}
+ )
set_tests_properties("${name}" PROPERTIES TIMEOUT 600)
endfunction()
# Fast sanity tests & longer-running stress tests.
add_python_tests(python_tests_default
- Python3::Interpreter -m pytest ${python_test_args})
+ Python3::Interpreter -m pytest ${python_test_args}
+)
# Same, but use pytest-html to generate an HTML report.
add_python_tests(python_tests_report
Python3::Interpreter -m pytest ${python_test_args}
- --html "${TEST_REPORT_DIR}/index.html")
+ --html "${TEST_REPORT_DIR}/index.html"
+)
# Fast sanity tests only.
add_python_tests(python_tests_sanity
- Python3::Interpreter -m pytest ${python_test_args} -m "not stress")
+ Python3::Interpreter -m pytest ${python_test_args}
+ -m "not stress"
+)
# Same, but run under Valgrind. Longer-running stress tests are not run under
# Valgrind, because they take too long.
add_python_tests(python_tests_valgrind
- Python3::Interpreter -m pytest ${python_test_args} -m "not stress"
- --valgrind "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/valgrind.sh")
+ Python3::Interpreter -m pytest ${python_test_args}
+ -m "not stress"
+ --valgrind "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/valgrind.sh"
+)
# A couple of tests that are profiled using the flame graph tool. These are
# excluded by default.
add_python_tests(python_tests_flame_graphs
- Python3::Interpreter -m pytest ${python_test_args} -m "flame_graph"
+ Python3::Interpreter -m pytest ${python_test_args}
+ -m "flame_graph"
--flamegraph "${CMAKE_CURRENT_SOURCE_DIR}/../scripts/flamegraph.sh"
- --flame-graphs-dir "${FLAME_GRAPHS_DIR}")
+ --flame-graphs-dir "${FLAME_GRAPHS_DIR}"
+)