Skip to content

Commit

Permalink
Rebasing on top of circle CI and common Cmake functions changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Carl Delsey committed Feb 5, 2019
1 parent d68e92d commit 7f08669
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 21 deletions.
9 changes: 1 addition & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,7 @@ references:
name: Test Build
command: |
. install/setup.sh
colcon test \
--packages-skip \
nav2_system_tests
colcon test-result \
--verbose
cp src/navigation2/tools/ctest_retry.bash build/nav2_system_tests
cd build/nav2_system_tests
./ctest_retry.bash 3
src/navigation2/tools/runtestsuite.bash
copy_test_logs: &copy_test_logs
run:
Expand Down
16 changes: 3 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -69,22 +69,12 @@ RUN . $ROS_WS/install/setup.sh && \
# build navigation2 package source
RUN rm $NAV2_WS/src/navigation2/nav2_system_tests/COLCON_IGNORE
ARG COVERAGE_ENABLED=False
RUN if [ "$COVERAGE_ENABLED" = "True" ]; \
then \
. $ROS_WS/install/setup.sh && \
RUN . $ROS_WS/install/setup.sh && \
colcon build \
--symlink-install \
--cmake-args \
-DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DCMAKE_CXX_FLAGS=--coverage \
-DCMAKE_C_FLAGS=--coverage -DCMAKE_EXE_LINKER_FLAGS=--coverage \
-DCMAKE_SHARED_LINKER_FLAGS=--coverage ; \
else \
. $ROS_WS/install/setup.sh && \
colcon build \
--symlink-install \
--cmake-args \
-DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE ; \
fi
-DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE \
-DCOVERAGE_ENABLED=$COVERAGE_ENABLED

# source navigation2 workspace from entrypoint
RUN sed --in-place \
Expand Down
7 changes: 7 additions & 0 deletions nav2_common/cmake/nav2_package.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,11 @@ macro(nav2_package)
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic -Werror -fPIC)
endif()

option(COVERAGE_ENABLED "Enable code coverage" FALSE)
if(COVERAGE_ENABLED)
add_compile_options(--coverage)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --coverage")
endif()
endmacro()

0 comments on commit 7f08669

Please sign in to comment.