Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(path_generator): add tests #215

Merged
merged 3 commits into from
Feb 28, 2025

Conversation

kosuke55
Copy link
Contributor

@kosuke55 kosuke55 commented Feb 24, 2025

Description

This PR adds tests to autoware_path_generator package.

this PR rquires porting autoware_test_utils to core

Related links

Parent Issue:

  • Link

How was this PR tested?

colcon test --packages-select autoware_path_generator --event-handlers console_cohesion+

gives the following result:

1: [==========] Running 6 tests from 2 test suites.
1: [----------] Global test environment set-up.
1: [----------] 1 test from PlanningModuleInterfaceTest
1: [ RUN      ] PlanningModuleInterfaceTest.NodeTestWithExceptionTrajectory
1: [ERROR] [1736402288.630362225] [path_generator]: input route is empty, ignoring...
1: [       OK ] PlanningModuleInterfaceTest.NodeTestWithExceptionTrajectory (1694 ms)
1: [----------] 1 test from PlanningModuleInterfaceTest (1694 ms total)
1: 
1: [----------] 5 tests from PathGeneratorUtilsTest
1: [ RUN      ] PathGeneratorUtilsTest.getPreviousLaneletWithinRoute
1: [       OK ] PathGeneratorUtilsTest.getPreviousLaneletWithinRoute (55 ms)
1: [ RUN      ] PathGeneratorUtilsTest.getNextLaneletWithinRoute
1: [       OK ] PathGeneratorUtilsTest.getNextLaneletWithinRoute (46 ms)
1: [ RUN      ] PathGeneratorUtilsTest.getLaneletsWithinRouteUpTo
1: [       OK ] PathGeneratorUtilsTest.getLaneletsWithinRouteUpTo (45 ms)
1: [ RUN      ] PathGeneratorUtilsTest.getLaneletsWithinRouteAfter
1: [       OK ] PathGeneratorUtilsTest.getLaneletsWithinRouteAfter (45 ms)
1: [ RUN      ] PathGeneratorUtilsTest.getLaneletsWithinRoute
1: [       OK ] PathGeneratorUtilsTest.getLaneletsWithinRoute (46 ms)
1: [----------] 5 tests from PathGeneratorUtilsTest (237 ms total)
1: 
1: [----------] Global test environment tear-down
1: [==========] 6 tests from 2 test suites ran. (1931 ms total)
1: [  PASSED  ] 6 tests.

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

Copy link

github-actions bot commented Feb 24, 2025

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

@kosuke55
Copy link
Contributor Author

this PR rquires porting autoware_test_utils to core

@kosuke55 kosuke55 added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Feb 24, 2025
@kosuke55 kosuke55 force-pushed the test/path_generator branch from 4e8379f to 1d60923 Compare February 24, 2025 05:05
@xmfcx xmfcx added the type:new-feature New functionalities or additions, feature requests. label Feb 26, 2025
@xmfcx xmfcx assigned kosuke55 and unassigned youtalk and mitsudome-r Feb 26, 2025
@kosuke55 kosuke55 force-pushed the test/path_generator branch from 1d60923 to 99f1633 Compare February 28, 2025 04:47
@kosuke55
Copy link
Contributor Author

@takayuki5168 @satoshi-ota
could you review this PR?

Copy link
Contributor

@satoshi-ota satoshi-ota left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

mitukou1109 and others added 3 commits February 28, 2025 13:54
* add tests

Signed-off-by: mitukou1109 <[email protected]>

* adapt test to new test manager

Signed-off-by: mitukou1109 <[email protected]>

* migrate to autoware_internal_planning_msgs

Signed-off-by: mitukou1109 <[email protected]>

* use intersection map for unit tests

Signed-off-by: mitukou1109 <[email protected]>

---------

Signed-off-by: mitukou1109 <[email protected]>

fix pre-commit

Signed-off-by: kosuke55 <[email protected]>

fix pre-commit

Signed-off-by: kosuke55 <[email protected]>
…_interface.cpp

Signed-off-by: kosuke55 <[email protected]>

Co-authored-by: Satoshi OTA <[email protected]>
Signed-off-by: kosuke55 <[email protected]>
Signed-off-by: kosuke55 <[email protected]>
@kosuke55 kosuke55 force-pushed the test/path_generator branch from 939c871 to 562d83d Compare February 28, 2025 04:54
@kosuke55 kosuke55 enabled auto-merge (squash) February 28, 2025 04:56
Copy link

codecov bot commented Feb 28, 2025

Codecov Report

Attention: Patch coverage is 62.74510% with 57 lines in your changes missing coverage. Please review.

Project coverage is 7.62%. Comparing base (4cb18f5) to head (562d83d).
Report is 59 commits behind head on main.

Files with missing lines Patch % Lines
...ning/autoware_path_generator/test/test_lanelet.cpp 47.72% 2 Missing and 44 partials ⚠️
...anning/autoware_path_generator/test/utils_test.hpp 79.16% 7 Missing and 3 partials ⚠️
...erator/test/test_path_generator_node_interface.cpp 94.11% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #215       +/-   ##
==========================================
- Coverage   78.75%   7.62%   -71.14%     
==========================================
  Files          11     118      +107     
  Lines         193    9855     +9662     
  Branches       73    1138     +1065     
==========================================
+ Hits          152     751      +599     
- Misses         11    8995     +8984     
- Partials       30     109       +79     
Flag Coverage Δ
differential 7.62% <62.74%> (?)
total ?

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kosuke55 kosuke55 merged commit 1860a40 into autowarefoundation:main Feb 28, 2025
24 of 26 checks passed
danielsanchezaran pushed a commit to tier4/autoware.core that referenced this pull request Mar 3, 2025
* test(path_generator): add tests

* add tests

Signed-off-by: mitukou1109 <[email protected]>

* adapt test to new test manager

Signed-off-by: mitukou1109 <[email protected]>

* migrate to autoware_internal_planning_msgs

Signed-off-by: mitukou1109 <[email protected]>

* use intersection map for unit tests

Signed-off-by: mitukou1109 <[email protected]>

---------

Signed-off-by: mitukou1109 <[email protected]>

fix pre-commit

Signed-off-by: kosuke55 <[email protected]>

fix pre-commit

Signed-off-by: kosuke55 <[email protected]>

* Update planning/autoware_path_generator/test/test_path_generator_node_interface.cpp

Signed-off-by: kosuke55 <[email protected]>

Co-authored-by: Satoshi OTA <[email protected]>
Signed-off-by: kosuke55 <[email protected]>

* fix for latest

Signed-off-by: kosuke55 <[email protected]>

---------

Signed-off-by: kosuke55 <[email protected]>
Co-authored-by: Mitsuhiro Sakamoto <[email protected]>
Co-authored-by: Satoshi OTA <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) type:new-feature New functionalities or additions, feature requests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants