Skip to content

Commit

Permalink
CAR 6008 - Temporarily disable failing unit tests in carma-platform's…
Browse files Browse the repository at this point in the history
… CI (#2333)

* disable failing unit tests

* resolve conflicts

* disable ros1 unit tests

* diasbled unit tests

* disable ros test:

* fixes for disabling unit test

* fix for disabling platoon controllers ros test

* fix for disabling platoon controllers ros test2

* fix for disabling platoon controllers ros test3

* fix for disabling platoon controllers ros test4

* skip some ros2 pkgs in ros1 build

* skip test of ros2 pkgs

* skip test of ros2 pkgs2

* skip test of ros2 pkgs3

* skip test of ros2 pkgs4

* skip test of ros2 pkgs5

* skip test of ros2 pkgs6

* update ci to run on 8 core

* disable some ros2 tests

* skip some ros2 unit tests

* skip some ros2 unit tests

* skip some ros2 unit tests2

* skip some ros2 unit tests3

* disable unit tests

* disable utils tests ros1

* disable more unit tests

* disable more tests

* disable ctest

* add comments and github issue to disabled tests

* update comment

* address PR comments

* disable test for stop and dwell

* address pr comments

* removed TODO

* comment failing test
  • Loading branch information
saina-ramyar committed Mar 8, 2024
1 parent 9d92822 commit 3e7ca4f
Show file tree
Hide file tree
Showing 42 changed files with 2,008 additions and 1,849 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/Ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
working-directory: "/opt/carma/"

# Specify the runner environment
runs-on: ubuntu-latest
runs-on: ubuntu-latest-8-cores

# Set up a Docker container for the job
container:
Expand Down Expand Up @@ -58,9 +58,13 @@ jobs:
- name: Run ROS1 C++ Tests
# Run ROS1 C++ tests
# The skipped ROS 1 packages here should match the ROS 1 packages that are skipped during the build in docker/install.sh"

# These tests has been temporarily disabled to support Continuous Improvement (CI) processes.
# Related GitHub Issue: <https://github.com/usdot-fhwa-stol/carma-platform/issues/2335>
# some ROS2 packages unit tests are triggered during ROS1 tests, so they are temporarily being skipped.
run: |
source "$INIT_ENV"
sed -i 's/colcon test /colcon test --packages-skip novatel_oem7_msgs tracetools tracetools_test /' /home/carma/.ci-image/engineering_tools/code_coverage/make_with_coverage.bash
sed -i 's/colcon test /colcon test --packages-skip novatel_oem7_msgs tracetools tracetools_test carma_launch_testing carma_message_utilities ros2bag ros2trace tracetools_launch tracetools_read tracetools_trace rosbag2 carma_utils /' /home/carma/.ci-image/engineering_tools/code_coverage/make_with_coverage.bash
make_with_coverage.bash -t -e /opt/carma/ -o ./coverage_reports/gcov
- name: Backup ROS1 compile_commands.json
Expand Down
262 changes: 134 additions & 128 deletions approaching_emergency_vehicle_plugin/test/test_approaching_erv.cpp

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions basic_autonomy/test/test_waypoint_generation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,10 @@ TEST(BasicAutonomyTest, get_nearest_basic_point_index)
detailed_config, visited_lanelets), std::invalid_argument);
}

// These tests has been temporarily disabled to support Continuous Improvement (CI) processes.
// Related GitHub Issue: <https://github.com/usdot-fhwa-stol/carma-platform/issues/2335>

/**
TEST(BasicAutonomyTest, test_verify_yield)
{
auto node = std::make_shared<carma_ros2_utils::CarmaLifecycleNode>(rclcpp::NodeOptions());
Expand Down Expand Up @@ -893,7 +896,7 @@ TEST(BasicAutonomyTest, get_nearest_basic_point_index)
ASSERT_FALSE(basic_autonomy::waypoint_generation::is_valid_yield_plan(node, tp2));
}

*/

} // namespace basic_autonomy

Expand All @@ -911,4 +914,4 @@ int main(int argc, char ** argv)
rclcpp::shutdown();

return success;
}
}
6 changes: 4 additions & 2 deletions carma_cooperative_perception/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,10 @@ if(carma_cooperative_perception_BUILD_TESTS)
)

add_launch_test(test/track_list_to_external_object_list_launch_test.py)
add_launch_test(test/multiple_object_tracker_duplicates_launch_test.py)
add_launch_test(test/multiple_object_tracker_static_obstacle_launch_test.py)
# This test has been temporarily disabled to support Continuous Improvement (CI) processes.
# Related GitHub Issue: <https://github.com/usdot-fhwa-stol/carma-platform/issues/2335>
# add_launch_test(test/multiple_object_tracker_duplicates_launch_test.py)
# add_launch_test(test/multiple_object_tracker_static_obstacle_launch_test.py)
add_launch_test(test/host_vehicle_filter_launch_test.py)

endif()
Expand Down
6 changes: 6 additions & 0 deletions carma_cooperative_perception/dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ if(carma_cooperative_perception_BUILD_TESTS)

list(APPEND AMENT_LINT_AUTO_EXCLUDE
ament_cmake_uncrustify # Using clang-format instead
# This test has been temporarily disabled to support Continuous Improvement (CI) processes.
# Related GitHub Issue: <https://github.com/usdot-fhwa-stol/carma-platform/issues/2335>
ament_cmake_cppcheck
ament_cmake_cppcheck
ament_cmake_cpplint
ament_cmake_flake8
)

set(ament_cmake_clang_format_CONFIG_FILE ${PROJECT_SOURCE_DIR}/.clang-format)
Expand Down
20 changes: 15 additions & 5 deletions carma_cooperative_perception/test/test_msg_conversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ TEST(ToTimeMsg, NulloptSeconds)
EXPECT_DOUBLE_EQ(actual_msg.sec, expected_msg.sec);
EXPECT_DOUBLE_EQ(actual_msg.nanosec, expected_msg.nanosec);
}
// These tests has been temporarily disabled to support Continuous Improvement (CI) processes.
// Related GitHub Issue: <https://github.com/usdot-fhwa-stol/carma-platform/issues/2335>

/**
TEST(ToDetectionMsg, Simple)
{
carma_v2x_msgs::msg::SensorDataSharingMessage sdsm_msg;
Expand Down Expand Up @@ -122,7 +125,7 @@ TEST(ToDetectionMsg, Simple)
EXPECT_EQ(detection.id, "BADDCAFE-1");
EXPECT_EQ(detection.motion_model, detection.MOTION_MODEL_CTRV);
}

*/
TEST(CalcDetectionTimeStamp, Simple)
{
carma_cooperative_perception::DDateTime d_date_time;
Expand Down Expand Up @@ -221,6 +224,10 @@ TEST(ToDetectionListMsg, FromExternalObjectList)
EXPECT_EQ(std::size(detection_list.detections), 2U);
}

// These tests has been temporarily disabled to support Continuous Improvement (CI) processes.
// Related GitHub Issue: <https://github.com/usdot-fhwa-stol/carma-platform/issues/2335>

/*
TEST(ToExternalObject, FromTrack)
{
carma_cooperative_perception_interfaces::msg::Track track;
Expand Down Expand Up @@ -263,7 +270,8 @@ TEST(ToExternalObject, FromTrack)
EXPECT_EQ(external_object.pose, track.pose);
EXPECT_EQ(external_object.velocity, track.twist);
}

*/
/*
TEST(ToExternalObject, FromTrackNonNumericId)
{
carma_cooperative_perception_interfaces::msg::Track track;
Expand Down Expand Up @@ -304,7 +312,8 @@ TEST(ToExternalObject, FromTrackNonNumericId)
EXPECT_EQ(external_object.pose, track.pose);
EXPECT_EQ(external_object.velocity, track.twist);
}

*/
/*
TEST(ToExternalObject, FromTrackNegativeId)
{
carma_cooperative_perception_interfaces::msg::Track track;
Expand Down Expand Up @@ -345,7 +354,8 @@ TEST(ToExternalObject, FromTrackNegativeId)
EXPECT_EQ(external_object.pose, track.pose);
EXPECT_EQ(external_object.velocity, track.twist);
}

*/
/**
TEST(ToExternalObject, FromTrackIdTooLarge)
{
carma_cooperative_perception_interfaces::msg::Track track;
Expand Down Expand Up @@ -386,7 +396,7 @@ TEST(ToExternalObject, FromTrackIdTooLarge)
EXPECT_EQ(external_object.pose, track.pose);
EXPECT_EQ(external_object.velocity, track.twist);
}

*/
TEST(ToExternalObjectList, FromTrackList)
{
carma_cooperative_perception_interfaces::msg::TrackList track_list;
Expand Down
13 changes: 8 additions & 5 deletions carma_guidance_plugins/test/node_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ bool has_publisher(std::shared_ptr<carma_ros2_utils::CarmaLifecycleNode> node, c
{
bool found = false;
for (const auto& endpoint : node->get_publishers_info_by_topic(topic_name)) {

std::cerr << "name: " << endpoint.node_name() << " type: " << endpoint.topic_type() << std::endl;

if (endpoint.node_name() == node->get_name() && endpoint.topic_type() == type)
Expand All @@ -41,7 +41,7 @@ bool has_subscriber(std::shared_ptr<carma_ros2_utils::CarmaLifecycleNode> node,
{
bool found = false;
for (const auto& endpoint : node->get_subscriptions_info_by_topic(topic_name)) {

std::cerr << "name: " << endpoint.node_name() << " type: " << endpoint.topic_type() << std::endl;

if (endpoint.node_name() == node->get_name() && endpoint.topic_type() == type)
Expand All @@ -55,7 +55,7 @@ bool has_service(std::shared_ptr<carma_ros2_utils::CarmaLifecycleNode> node, std
{
bool found = false;
for (const auto& [service_k, type_v] : node->get_service_names_and_types_by_node(node->get_name(), "")) {

std::cerr << "service: " << service_k << " type: " << type_v[0] << std::endl;

if ( service_k == service_name && type_v[0] == type)
Expand All @@ -68,6 +68,9 @@ bool has_service(std::shared_ptr<carma_ros2_utils::CarmaLifecycleNode> node, std
namespace carma_guidance_plugins
{

// These tests has been temporarily disabled to support Continuous Improvement (CI) processes.
// Related GitHub Issue: <https://github.com/usdot-fhwa-stol/carma-platform/issues/2335>
/**
TEST(carma_guidance_plugins_test, connections_test) {
Expand Down Expand Up @@ -143,7 +146,7 @@ TEST(carma_guidance_plugins_test, connections_test) {
ASSERT_TRUE(has_subscriber(control_plugin, "TestControlPlugin/plan_trajectory", "carma_planning_msgs/msg/TrajectoryPlan"));
}

*/
} // carma_guidance_plugins

int main(int argc, char ** argv)
Expand All @@ -159,4 +162,4 @@ int main(int argc, char ** argv)
rclcpp::shutdown();

return success;
}
}
14 changes: 8 additions & 6 deletions carma_wm/test/CollisionDetectionTest.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2022 LEIDOS.dev
*
*
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
Expand Down Expand Up @@ -150,7 +150,7 @@ namespace carma_wm
collision_detection::MovingObject mo1 = {ob1, linear_velocity, future_polygons_tuple};

__uint64_t target_time = 3;

collision_detection::MovingObject result = collision_detection::PredictObjectPosition(mo1,target_time);

std::vector<collision_detection::point_t> points = result.object_polygon.outer();
Expand Down Expand Up @@ -259,14 +259,16 @@ namespace carma_wm
ASSERT_TRUE(result);

}

// These tests has been temporarily disabled to support Continuous Improvement (CI) processes.
// Related GitHub Issue: <https://github.com/usdot-fhwa-stol/carma-platform/issues/2335>
/**
TEST(CollisionDetectionTest, WorldCollisionDetection)
{
carma_perception_msgs::msg::RoadwayObstacleList rwol;
carma_planning_msgs::msg::TrajectoryPlan tp;
geometry_msgs::msg::Twist velocity;
geometry_msgs::msg::Vector3 linear_velocity;
Expand All @@ -275,7 +277,7 @@ namespace carma_wm
velocity.linear = linear_velocity;
geometry_msgs::msg::Vector3 size;
size.x = 4;
size.y = 2;
Expand Down Expand Up @@ -380,7 +382,7 @@ namespace carma_wm
ASSERT_EQ(result.size(),1);
}

*/
TEST(CollisionDetectionFalseTest, WorldCollisionDetection)
{

Expand Down
25 changes: 14 additions & 11 deletions carma_wm/test/GeometryTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ TEST(GeometryTest, computeCurvature)

/*!
* \brief Test utility function to generate a lanelet of fixed curvature
*
*
* \param center_of_curvature The center of the circle that will generate the lanelet
* \param radius_of_curvature The radius size of the circle that describes
* \param arc_radians The number of radians to traverse the sweep of the circle
* \param sample_count How many points to sample evenly spaced across the arc
* \return A lanelet matching the input geometry description
*/
std::vector<lanelet::Point3d>
std::vector<lanelet::Point3d>
generate_const_curvature_linestring(
lanelet::BasicPoint2d center_of_curvature,
double radius_of_curvature,
Expand All @@ -85,19 +85,22 @@ generate_const_curvature_linestring(

double x, y;
for (int i = 0; i < sample_count; i++) {
x = center_of_curvature[0]
+ radius_of_curvature
x = center_of_curvature[0]
+ radius_of_curvature
* std::cos(arc_radians / sample_count * i);
y = center_of_curvature[1]
+ radius_of_curvature
* std::sin(arc_radians / sample_count * i);

out.push_back(getPoint(x, y, 0.0));
}

return out;
}

// These tests has been temporarily disabled to support Continuous Improvement (CI) processes.
// Related GitHub Issue: <https://github.com/usdot-fhwa-stol/carma-platform/issues/2335>
/**
TEST(Geometry, local_curvatures)
{
CARMAWorldModel cmw;
Expand All @@ -123,7 +126,7 @@ TEST(Geometry, local_curvatures)
// Test single lanelet constant curvature
lanelet::BasicPoint2d origin = getBasicPoint(0.0, 0.0);
// Curve with centerline at radius 10, curvature 1/10
std::vector<lanelet::Point3d> left_2 = generate_const_curvature_linestring(origin, 5, M_PI / 2.0, 20);
std::vector<lanelet::Point3d> left_2 = generate_const_curvature_linestring(origin, 5, M_PI / 2.0, 20);
std::vector<lanelet::Point3d> right_2 = generate_const_curvature_linestring(origin, 15, M_PI / 2.0, 20);
auto ll_2 = getLanelet(left_2, right_2);
std::vector<lanelet::ConstLanelet> lanelets2 = { lanelet::utils::toConst(ll_2) };
Expand All @@ -140,7 +143,7 @@ TEST(Geometry, local_curvatures)
// Test single lanelet constant curvature 2
// Curve with centerline at radius 20, curvature 1/20
std::vector<lanelet::Point3d> left_3 = generate_const_curvature_linestring(origin, 10, M_PI / 2.0, 10);
std::vector<lanelet::Point3d> left_3 = generate_const_curvature_linestring(origin, 10, M_PI / 2.0, 10);
std::vector<lanelet::Point3d> right_3 = generate_const_curvature_linestring(origin, 30, M_PI / 2.0, 10);
auto ll_3 = getLanelet(left_3, right_3);
//lanelet::LineString3d center_ls3(lanelet::utils::getId(), center_3);
Expand All @@ -161,7 +164,7 @@ TEST(Geometry, local_curvatures)
// Test single lanelet constant curvature 3
// Curve with centerline at radius 1, curvature 1
std::vector<lanelet::Point3d> left_4 = generate_const_curvature_linestring(origin, 0.5, M_PI / 2.0, 5);
std::vector<lanelet::Point3d> left_4 = generate_const_curvature_linestring(origin, 0.5, M_PI / 2.0, 5);
std::vector<lanelet::Point3d> right_4 = generate_const_curvature_linestring(origin, 1.5, M_PI / 2.0, 5);
auto ll_4 = getLanelet(left_4, right_4);
Expand Down Expand Up @@ -200,7 +203,7 @@ TEST(Geometry, local_curvatures)
std::vector<lanelet::ConstLanelet> lanelets_5 = { lanelet::utils::toConst(ll_empty) };
ASSERT_THROW(geometry::local_curvatures(lanelets_5), std::invalid_argument);
}

*/
TEST(GeometryTest, trackPos)
{

Expand Down Expand Up @@ -636,7 +639,7 @@ TEST(GeometryTest, compute_tangent_orientations_straight)
}

std::vector<double> result;
lanelet::BasicLineString2d centerline = carma_wm::geometry::concatenate_lanelets(lanelets_as_vec);
lanelet::BasicLineString2d centerline = carma_wm::geometry::concatenate_lanelets(lanelets_as_vec);
result = carma_wm::geometry::compute_tangent_orientations(centerline);
ASSERT_EQ(9, result.size());

Expand All @@ -646,7 +649,7 @@ TEST(GeometryTest, compute_tangent_orientations_straight)
}
}

TEST(GeometryTest, concatenate_line_string_dedupe)
TEST(GeometryTest, concatenate_line_string_dedupe)
{
auto p1 = Eigen::Vector2d(-1, 0);
auto p2 = Eigen::Vector2d(-1, 1);
Expand Down
Loading

0 comments on commit 3e7ca4f

Please sign in to comment.