Skip to content

Commit

Permalink
Fix imports, lint, new cmake and action argument to split nav1 or nav…
Browse files Browse the repository at this point in the history
…2 integration tests

Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
  • Loading branch information
aaronchongth committed Dec 26, 2024
1 parent cddbf9a commit b9702bf
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 10 deletions.
9 changes: 7 additions & 2 deletions .github/actions/build-and-test/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ inputs:
zenoh-version:
description: string, version of eclipse-zenoh to install from pip
required: true
integration-testing:
nav1-integration-testing:
description: string, supports ON or OFF only
required: false
default: "OFF"
nav2-integration-testing:
description: string, supports ON or OFF only
required: false
default: "OFF"
Expand All @@ -34,7 +38,8 @@ runs:
{
"build": {
"cmake-args": [
"-DINTEGRATION_TESTING=${{ inputs.integration-testing }}"
"-DNAV1_INTEGRATION_TESTING=${{ inputs.nav1-integration-testing }}",
"-DNAV2_INTEGRATION_TESTING=${{ inputs.nav2-integration-testing }}"
],
"mixin": ["coverage-pytest"]
},
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nav1-integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
with:
ros-distribution: ${{ matrix.ros_distribution }}
zenoh-version: 1.1.0
integration-testing: ON
nav1-integration-testing: ON

- name: Stop test fixture containers
if: always()
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nav2-integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
with:
ros-distribution: ${{ matrix.ros_distribution }}
zenoh-version: 1.1.0
integration-testing: ON
nav2-integration-testing: ON

- name: Stop test fixture containers
if: always()
Expand Down
15 changes: 13 additions & 2 deletions free_fleet_adapter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ if(BUILD_TESTING)
)
endforeach()

if (INTEGRATION_TESTING)
if (NAV2_INTEGRATION_TESTING)
set(_pytest_tests
tests/integration/test_nav1_tf_handler.py
tests/integration/test_nav2_tf_handler.py
tests/integration/test_nav2_robot_adapter.py
)
Expand All @@ -48,6 +47,18 @@ if(BUILD_TESTING)
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
endforeach()
elseif (NAV1_INTEGRATION_TESTING)
set(_pytest_tests
tests/integration/test_nav1_tf_handler.py
)
foreach(_test_path ${_pytest_tests})
get_filename_component(_test_name ${_test_path} NAME_WE)
ament_add_pytest_test(${_test_name} ${_test_path}
APPEND_ENV PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}
TIMEOUT 60
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
endforeach()
endif()
endif()

Expand Down
8 changes: 4 additions & 4 deletions free_fleet_adapter/free_fleet_adapter/nav1_robot_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@
# TFMessage,
# Time,
# )
from free_fleet.ros1_types import (
ROS1_STORE,
TFMessage
)
from free_fleet.utils import (
get_zenoh_name_of_ros1_topic,
# make_cancel_all_goals_request,
namespacify,
)
from free_fleet_ros1_types import (
ROS1_STORE,
TFMessage
)

from geometry_msgs.msg import TransformStamped
# import numpy as np
Expand Down

0 comments on commit b9702bf

Please sign in to comment.