From 49a75500bc988c91f31d6a9e4abcdd4e44928b74 Mon Sep 17 00:00:00 2001 From: Christophe Bedard Date: Thu, 2 Apr 2020 11:25:51 -0400 Subject: [PATCH] Call ament_add_pytest_test() only once for tracetools_test Signed-off-by: Christophe Bedard --- tracetools_test/CMakeLists.txt | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/tracetools_test/CMakeLists.txt b/tracetools_test/CMakeLists.txt index df8c4a9..4078345 100644 --- a/tracetools_test/CMakeLists.txt +++ b/tracetools_test/CMakeLists.txt @@ -106,25 +106,10 @@ if(BUILD_TESTING) endif() find_package(ament_cmake_pytest REQUIRED) - # Run each test in its own pytest invocation - set(_tracetools_test_pytest_tests - test/test_intra.py - test/test_node.py - test/test_publisher.py - test/test_service.py - test/test_subscription.py - test/test_timer.py - ) - foreach(_test_path ${_tracetools_test_pytest_tests}) - get_filename_component(_test_name ${_test_path} NAME_WE) - ament_add_pytest_test(${_test_name} ${_test_path} - PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE}" - APPEND_ENV AMENT_PREFIX_PATH=${ament_index_build_path} - PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR} - TIMEOUT 60 - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - ) - endforeach() + ament_add_pytest_test(${PROJECT_NAME} test + APPEND_ENV PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR} + TIMEOUT 60 + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) endif() endif()