Skip to content

Commit

Permalink
Make integration test optional
Browse files Browse the repository at this point in the history
Since the simulation doesn't shutdown cleanly, we do not want to leave behind a dangling simulation after running a colcon build.
  • Loading branch information
fmauch committed Jul 1, 2024
1 parent 41d1245 commit 78cb55f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/reusable_ici.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ jobs:
UPSTREAM_WORKSPACE: ${{ inputs.upstream_workspace }}
ROS_DISTRO: ${{ inputs.ros_distro }}
ROS_REPO: ${{ inputs.ros_repo }}
CMAKE_ARGS: -DUR_SIM_INTEGRATION_TESTS=ON
- name: prepare target_ws for cache
if: ${{ always() && ! matrix.env.CCOV }}
run: |
Expand Down
17 changes: 13 additions & 4 deletions ur_simulation_gz/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ project(ur_simulation_gz)

find_package(ament_cmake REQUIRED)

# Default to off as starting gzsim doesn't shut down correctly at the moment
option(
UR_SIM_INTEGRATION_TESTS
"Run ur_simulation_gz integration tests"
OFF
)

install(DIRECTORY config launch urdf
DESTINATION share/${PROJECT_NAME}
)
Expand All @@ -11,10 +18,12 @@ if(BUILD_TESTING)
find_package(launch_testing_ament_cmake)
find_package(ament_cmake_pytest REQUIRED)

add_launch_test(test/test_gz.py
TIMEOUT
180
)
if(${UR_SIM_INTEGRATION_TESTS})
add_launch_test(test/test_gz.py
TIMEOUT
180
)
endif()
ament_add_pytest_test(description test/test_description.py)
endif()

Expand Down

0 comments on commit 78cb55f

Please sign in to comment.