Skip to content

Commit

Permalink
lint generated launch files
Browse files Browse the repository at this point in the history
  • Loading branch information
dirk-thomas committed Oct 4, 2017
1 parent 5ba0e66 commit 03d6070
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions composition/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ if(BUILD_TESTING)
"test_ament_index/$<CONFIG>/share/ament_index/resource_index/node_plugin/${PROJECT_NAME}"
CONTENT "${node_plugins}")

set(generated_python_files)
macro(tests)
set(MANUAL_COMPOSITION_EXECUTABLE $<TARGET_FILE:manual_composition>)
set(LINKTIME_COMPOSITION_EXECUTABLE $<TARGET_FILE:linktime_composition>)
Expand Down Expand Up @@ -182,6 +183,9 @@ if(BUILD_TESTING)
APPEND_ENV AMENT_PREFIX_PATH=${CMAKE_CURRENT_BINARY_DIR}/test_ament_index/$<CONFIG>
APPEND_LIBRARY_DIRS "${append_library_dirs}"
TIMEOUT 90)
list(
APPEND generated_python_files
"${CMAKE_CURRENT_BINARY_DIR}/test_composition${target_suffix}_$<CONFIG>.py")
endmacro()

set(append_library_dirs "${CMAKE_CURRENT_BINARY_DIR}")
Expand All @@ -190,6 +194,13 @@ if(BUILD_TESTING)
endif()

call_for_each_rmw_implementation(tests)

find_package(ament_cmake_flake8 REQUIRED)
ament_flake8(
TESTNAME "flake8_generated_launch"
# the generated code might contain longer lines for templated types
MAX_LINE_LENGTH 999
${generated_python_files})
endif()

ament_package()

0 comments on commit 03d6070

Please sign in to comment.