From 9d5c9257ee11677159490288d20522657a27243b Mon Sep 17 00:00:00 2001 From: Scott K Logan Date: Fri, 21 Jun 2024 11:16:34 -0500 Subject: [PATCH] Don't write Python bytecode when invoking launch tests (#785) This should prevent pytest invocations via add_launch_test from writing __pycache__ directories into the package sources. Signed-off-by: Scott K Logan --- launch_testing_ament_cmake/cmake/add_launch_test.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/launch_testing_ament_cmake/cmake/add_launch_test.cmake b/launch_testing_ament_cmake/cmake/add_launch_test.cmake index 820be9ced..4e9216cff 100644 --- a/launch_testing_ament_cmake/cmake/add_launch_test.cmake +++ b/launch_testing_ament_cmake/cmake/add_launch_test.cmake @@ -133,6 +133,7 @@ function(add_launch_test filename) COMMAND ${cmd} OUTPUT_FILE "${CMAKE_BINARY_DIR}/launch_test/${_launch_test_TARGET}.txt" RESULT_FILE "${_launch_test_RESULT_FILE}" + ENV PYTHONDONTWRITEBYTECODE=1 TIMEOUT "${_launch_test_TIMEOUT}" ${_launch_test_UNPARSED_ARGUMENTS} )