diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-05-06 19:23:16 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-05-07 20:44:39 +0200 |
commit | a9da6ac95d5bc11689b87ba689aeffbf22c45418 (patch) | |
tree | ec4edf6f15d615feab84da37f68c4ae626cf896e /test/CMakeLists.txt | |
parent | test: mark global fixtures as such (diff) | |
download | cimple-a9da6ac95d5bc11689b87ba689aeffbf22c45418.tar.gz cimple-a9da6ac95d5bc11689b87ba689aeffbf22c45418.zip |
add tests to run binaries under Valgrind
This was quite a bit of refactoring in test/; everything should be
more maintainable and robust in theory.
Also, valgrind.sh was fixed to use exec (so that signals are passed to
the underlying process); Valgrind command line options have also been
tweaked.
./ci.sh fails now, but that should be fixable.
Diffstat (limited to '')
-rw-r--r-- | test/CMakeLists.txt | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 5d16f4e..66b79e9 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,11 +1,17 @@ find_package(Python3 REQUIRED COMPONENTS Interpreter) -add_test( - NAME integration_tests - COMMAND Python3::Interpreter -m pytest - "${CMAKE_CURRENT_SOURCE_DIR}" - --server-binary "$<TARGET_FILE:server>" - --worker-binary "$<TARGET_FILE:worker>" - --client-binary "$<TARGET_FILE:client>" - --project-version "${PROJECT_VERSION}" +set(args + "${CMAKE_CURRENT_SOURCE_DIR}" + --server-binary "$<TARGET_FILE:server>" + --worker-binary "$<TARGET_FILE:worker>" + --client-binary "$<TARGET_FILE:client>" + --project-version "${PROJECT_VERSION}") + +add_test(NAME integration_tests + COMMAND Python3::Interpreter -m pytest ${args} + WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") + +add_test(NAME integration_tests_with_valgrind + COMMAND Python3::Interpreter -m pytest ${args} + --valgrind-binary "${CMAKE_CURRENT_SOURCE_DIR}/../src/valgrind.sh" WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}") |