aboutsummaryrefslogblamecommitdiffstatshomepage
path: root/test/CMakeLists.txt
blob: 6195eecbaff542fb206c7cd1a29f4e35feaccb8c (plain) (tree)
1
2
3
4
5
6
7
8
9

                                                     






                                           
                          


                                                    
                                   

                                                                          
                                                    
find_package(Python3 REQUIRED COMPONENTS Interpreter)

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 python_tests
    COMMAND Python3::Interpreter -m pytest ${args}
    WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")

add_test(NAME python_tests_valgrind
    COMMAND Python3::Interpreter -m pytest ${args}
        --valgrind-binary "${CMAKE_CURRENT_SOURCE_DIR}/../src/valgrind.sh"
    WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")