Skip to content

Commit

Permalink
updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
klaxalk committed Dec 11, 2023
1 parent 3691a0d commit 101f8a9
Show file tree
Hide file tree
Showing 12 changed files with 71 additions and 71 deletions.
7 changes: 1 addition & 6 deletions test/gazebo_takeoff/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,4 @@ add_dependencies(test_${TEST_NAME}
${catkin_EXPORTED_TARGETS}
)

add_rostest(${TEST_NAME}.test
ARGS
test_path:=${CMAKE_CURRENT_SOURCE_DIR}
package_name:=${PROJECT_NAME}
test_name:=${TEST_NAME}
)
add_rostest(${TEST_NAME}.test)
15 changes: 10 additions & 5 deletions test/gazebo_takeoff/gazebo_takeoff.test
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
<launch>

<arg name="this_path" default="$(dirname)" />

<arg name="UAV_NAME" default="uav1" />
<arg name="UAV_TYPE" default="x500" />

<!-- these will be filled in from the CMakeLists -->
<arg name="test_path" default="" />
<arg name="test_name" default="" />
<arg name="package_name" default="" />
<!-- automatically deduce the test name -->
<arg name="test_name" default="$(eval arg('this_path').split('/')[-1])" />

<!-- automatically deduce the package name -->
<arg name="import_eval" default="eval('_' + '_import_' + '_')"/>
<arg name="package_eval" default="eval(arg('import_eval') + '(\'rospkg\')').get_package_name(arg('this_path'))" />
<arg name="package" default="$(eval eval(arg('package_eval')))" />

<include file="$(find mrs_uav_testing)/launch/gazebo_simulator.launch" />

Expand All @@ -21,7 +26,7 @@
<arg name="UAV_NAME" default="$(arg UAV_NAME)" />
</include>

<test pkg="$(arg package_name)" type="test_$(arg test_name)" test-name="$(arg test_name)" time-limit="60.0">
<test pkg="$(arg package)" type="test_$(arg test_name)" test-name="$(arg test_name)" time-limit="60.0">
<param name="test_name" value="$(arg test_name)" />
<param name="uav_name" value="$(arg UAV_NAME)" />
<param name="gazebo_spawner_params" value="1 --$(arg UAV_TYPE) --enable-rangefinder" />
Expand Down
7 changes: 1 addition & 6 deletions test/moving_drone/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,4 @@ add_dependencies(test_${TEST_NAME}
${catkin_EXPORTED_TARGETS}
)

add_rostest(${TEST_NAME}.test
ARGS
test_path:=${CMAKE_CURRENT_SOURCE_DIR}
package_name:=${PROJECT_NAME}
test_name:=${TEST_NAME}
)
add_rostest(${TEST_NAME}.test)
15 changes: 10 additions & 5 deletions test/moving_drone/moving_drone.test
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
<launch>

<arg name="this_path" default="$(dirname)" />

<arg name="UAV_NAME" default="uav1" />
<arg name="UAV_TYPE" default="x500" />

<!-- these will be filled in from the CMakeLists -->
<arg name="test_path" default="" />
<arg name="test_name" default="" />
<arg name="package_name" default="" />
<!-- automatically deduce the test name -->
<arg name="test_name" default="$(eval arg('this_path').split('/')[-1])" />

<!-- automatically deduce the package name -->
<arg name="import_eval" default="eval('_' + '_import_' + '_')"/>
<arg name="package_eval" default="eval(arg('import_eval') + '(\'rospkg\')').get_package_name(arg('this_path'))" />
<arg name="package" default="$(eval eval(arg('package_eval')))" />

<include file="$(find mrs_uav_testing)/launch/mrs_simulator.launch">
<arg name="UAV_NAME" default="$(arg UAV_NAME)" />
Expand All @@ -22,7 +27,7 @@
<arg name="UAV_NAME" default="$(arg UAV_NAME)" />
</include>

<test pkg="$(arg package_name)" type="test_$(arg test_name)" test-name="$(arg test_name)" time-limit="60.0">
<test pkg="$(arg package)" type="test_$(arg test_name)" test-name="$(arg test_name)" time-limit="60.0">
<param name="test_name" value="$(arg test_name)" />
<param name="uav_name" value="$(arg UAV_NAME)" />
</test>
Expand Down
7 changes: 1 addition & 6 deletions test/outside_safety_area/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,4 @@ add_dependencies(test_${TEST_NAME}
${catkin_EXPORTED_TARGETS}
)

add_rostest(${TEST_NAME}.test
ARGS
test_path:=${CMAKE_CURRENT_SOURCE_DIR}
package_name:=${PROJECT_NAME}
test_name:=${TEST_NAME}
)
add_rostest(${TEST_NAME}.test)
17 changes: 11 additions & 6 deletions test/outside_safety_area/outside_safety_area.test
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
<launch>

<arg name="this_path" default="$(dirname)" />

<arg name="UAV_NAME" default="uav1" />
<arg name="UAV_TYPE" default="x500" />

<!-- these will be filled in from the CMakeLists -->
<arg name="test_path" default="" />
<arg name="test_name" default="" />
<arg name="package_name" default="" />
<!-- automatically deduce the test name -->
<arg name="test_name" default="$(eval arg('this_path').split('/')[-1])" />

<!-- automatically deduce the package name -->
<arg name="import_eval" default="eval('_' + '_import_' + '_')"/>
<arg name="package_eval" default="eval(arg('import_eval') + '(\'rospkg\')').get_package_name(arg('this_path'))" />
<arg name="package" default="$(eval eval(arg('package_eval')))" />

<include file="$(find mrs_uav_testing)/launch/mrs_simulator.launch">
<arg name="UAV_NAME" default="$(arg UAV_NAME)" />
<arg name="mrs_simulator_config" default="$(arg test_path)/config/mrs_simulator.yaml" />
<arg name="mrs_simulator_config" default="$(dirname)/config/mrs_simulator.yaml" />
</include>

<include file="$(find mrs_multirotor_simulator)/launch/hw_api.launch">
Expand All @@ -23,7 +28,7 @@
<arg name="UAV_NAME" default="$(arg UAV_NAME)" />
</include>

<test pkg="$(arg package_name)" type="test_$(arg test_name)" test-name="$(arg test_name)" time-limit="60.0">
<test pkg="$(arg package)" type="test_$(arg test_name)" test-name="$(arg test_name)" time-limit="60.0">
<param name="test_name" value="$(arg test_name)" />
<param name="uav_name" value="$(arg UAV_NAME)" />
</test>
Expand Down
7 changes: 1 addition & 6 deletions test/takeoff/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,4 @@ add_dependencies(test_${TEST_NAME}
${catkin_EXPORTED_TARGETS}
)

add_rostest(${TEST_NAME}.test
ARGS
test_path:=${CMAKE_CURRENT_SOURCE_DIR}
package_name:=${PROJECT_NAME}
test_name:=${TEST_NAME}
)
add_rostest(${TEST_NAME}.test)
17 changes: 11 additions & 6 deletions test/takeoff/takeoff.test
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
<launch>

<arg name="this_path" default="$(dirname)" />

<arg name="UAV_NAME" default="uav1" />
<arg name="UAV_TYPE" default="x500" />

<!-- these will be filled in from the CMakeLists -->
<arg name="test_path" default="" />
<arg name="test_name" default="" />
<arg name="package_name" default="" />
<!-- automatically deduce the test name -->
<arg name="test_name" default="$(eval arg('this_path').split('/')[-1])" />

<!-- automatically deduce the package name -->
<arg name="import_eval" default="eval('_' + '_import_' + '_')"/>
<arg name="package_eval" default="eval(arg('import_eval') + '(\'rospkg\')').get_package_name(arg('this_path'))" />
<arg name="package" default="$(eval eval(arg('package_eval')))" />

<include file="$(find mrs_uav_testing)/launch/mrs_simulator.launch">
<arg name="UAV_NAME" default="$(arg UAV_NAME)" />
<arg name="mrs_simulator_config" default="$(arg test_path)/config/mrs_simulator.yaml" />
<arg name="mrs_simulator_config" default="$(dirname)/config/mrs_simulator.yaml" />
</include>

<include file="$(find mrs_multirotor_simulator)/launch/hw_api.launch">
Expand All @@ -23,7 +28,7 @@
<arg name="UAV_NAME" default="$(arg UAV_NAME)" />
</include>

<test pkg="$(arg package_name)" type="test_$(arg test_name)" test-name="$(arg test_name)" time-limit="60.0">
<test pkg="$(arg package)" type="test_$(arg test_name)" test-name="$(arg test_name)" time-limit="60.0">
<param name="test_name" value="$(arg test_name)" />
<param name="uav_name" value="$(arg UAV_NAME)" />
</test>
Expand Down
7 changes: 1 addition & 6 deletions test/topic_check/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,4 @@ add_dependencies(test_${TEST_NAME}
${catkin_EXPORTED_TARGETS}
)

add_rostest(${TEST_NAME}.test
ARGS
test_path:=${CMAKE_CURRENT_SOURCE_DIR}
package_name:=${PROJECT_NAME}
test_name:=${TEST_NAME}
)
add_rostest(${TEST_NAME}.test)
17 changes: 11 additions & 6 deletions test/topic_check/topic_check.test
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
<launch>

<arg name="this_path" default="$(dirname)" />

<arg name="UAV_NAME" default="uav1" />
<arg name="UAV_TYPE" default="x500" />

<!-- these will be filled in from the CMakeLists -->
<arg name="test_path" default="" />
<arg name="test_name" default="" />
<arg name="package_name" default="" />
<!-- automatically deduce the test name -->
<arg name="test_name" default="$(eval arg('this_path').split('/')[-1])" />

<!-- automatically deduce the package name -->
<arg name="import_eval" default="eval('_' + '_import_' + '_')"/>
<arg name="package_eval" default="eval(arg('import_eval') + '(\'rospkg\')').get_package_name(arg('this_path'))" />
<arg name="package" default="$(eval eval(arg('package_eval')))" />

<include file="$(find mrs_uav_testing)/launch/mrs_simulator.launch">
<arg name="UAV_NAME" default="$(arg UAV_NAME)" />
Expand All @@ -18,12 +23,12 @@

<include file="$(find mrs_uav_testing)/launch/mrs_uav_system.launch">
<arg name="automatic_start" default="true" />
<arg name="automatic_start_config" default="$(arg test_path)/config/automatic_start.yaml" />
<arg name="automatic_start_config" default="$(dirname)/config/automatic_start.yaml" />
<arg name="platform_config" default="$(find mrs_multirotor_simulator)/config/mrs_uav_system/$(arg UAV_TYPE).yaml" />
<arg name="UAV_NAME" default="$(arg UAV_NAME)" />
</include>

<test pkg="$(arg package_name)" type="test_$(arg test_name)" test-name="$(arg test_name)" time-limit="60.0">
<test pkg="$(arg package)" type="test_$(arg test_name)" test-name="$(arg test_name)" time-limit="60.0">
<param name="test_name" value="$(arg test_name)" />
<param name="uav_name" value="$(arg UAV_NAME)" />
</test>
Expand Down
7 changes: 1 addition & 6 deletions test/without_takeoff/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,4 @@ add_dependencies(test_${TEST_NAME}
${catkin_EXPORTED_TARGETS}
)

add_rostest(${TEST_NAME}.test
ARGS
test_path:=${CMAKE_CURRENT_SOURCE_DIR}
package_name:=${PROJECT_NAME}
test_name:=${TEST_NAME}
)
add_rostest(${TEST_NAME}.test)
19 changes: 12 additions & 7 deletions test/without_takeoff/without_takeoff.test
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
<launch>

<arg name="this_path" default="$(dirname)" />

<arg name="UAV_NAME" default="uav1" />
<arg name="UAV_TYPE" default="x500" />

<!-- these will be filled in from the CMakeLists -->
<arg name="test_path" default="" />
<arg name="test_name" default="" />
<arg name="package_name" default="" />
<!-- automatically deduce the test name -->
<arg name="test_name" default="$(eval arg('this_path').split('/')[-1])" />

<!-- automatically deduce the package name -->
<arg name="import_eval" default="eval('_' + '_import_' + '_')"/>
<arg name="package_eval" default="eval(arg('import_eval') + '(\'rospkg\')').get_package_name(arg('this_path'))" />
<arg name="package" default="$(eval eval(arg('package_eval')))" />

<include file="$(find mrs_uav_testing)/launch/mrs_simulator.launch">
<arg name="UAV_NAME" default="$(arg UAV_NAME)" />
<arg name="mrs_simulator_config" default="$(arg test_path)/config/mrs_simulator.yaml" />
<arg name="mrs_simulator_config" default="$(dirname)/config/mrs_simulator.yaml" />
</include>

<include file="$(find mrs_multirotor_simulator)/launch/hw_api.launch">
Expand All @@ -19,12 +24,12 @@

<include file="$(find mrs_uav_testing)/launch/mrs_uav_system.launch">
<arg name="automatic_start" default="true" />
<arg name="automatic_start_config" default="$(arg test_path)/config/automatic_start.yaml" />
<arg name="automatic_start_config" default="$(dirname)/config/automatic_start.yaml" />
<arg name="platform_config" default="$(find mrs_multirotor_simulator)/config/mrs_uav_system/$(arg UAV_TYPE).yaml" />
<arg name="UAV_NAME" default="$(arg UAV_NAME)" />
</include>

<test pkg="$(arg package_name)" type="test_$(arg test_name)" test-name="$(arg test_name)" time-limit="60.0">
<test pkg="$(arg package)" type="test_$(arg test_name)" test-name="$(arg test_name)" time-limit="60.0">
<param name="test_name" value="$(arg test_name)" />
<param name="uav_name" value="$(arg UAV_NAME)" />
</test>
Expand Down

0 comments on commit 101f8a9

Please sign in to comment.