Skip to content

Commit 9d5c925

Browse files
authored
Don't write Python bytecode when invoking launch tests (ros2#785)
This should prevent pytest invocations via add_launch_test from writing __pycache__ directories into the package sources. Signed-off-by: Scott K Logan <[email protected]>
1 parent 651f574 commit 9d5c925

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

launch_testing_ament_cmake/cmake/add_launch_test.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ function(add_launch_test filename)
133133
COMMAND ${cmd}
134134
OUTPUT_FILE "${CMAKE_BINARY_DIR}/launch_test/${_launch_test_TARGET}.txt"
135135
RESULT_FILE "${_launch_test_RESULT_FILE}"
136+
ENV PYTHONDONTWRITEBYTECODE=1
136137
TIMEOUT "${_launch_test_TIMEOUT}"
137138
${_launch_test_UNPARSED_ARGUMENTS}
138139
)

0 commit comments

Comments
 (0)