Skip to content

Commit

Permalink
Merge pull request #181 from ros2/lint_generated_launch_files
Browse files Browse the repository at this point in the history
lint generated launch files
  • Loading branch information
dirk-thomas authored Oct 6, 2017
2 parents 5ba0e66 + 03d6070 commit 082f5b3
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 082f5b3

Please sign in to comment.