-
Notifications
You must be signed in to change notification settings - Fork 669
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rename test utils to autoware test utils
Signed-off-by: Zulfaqar Azmi <[email protected]>
- Loading branch information
1 parent
fbe43f1
commit 4080550
Showing
45 changed files
with
43,098 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
cmake_minimum_required(VERSION 3.14) | ||
project(autoware_test_utils) | ||
|
||
find_package(autoware_cmake REQUIRED) | ||
autoware_package() | ||
|
||
ament_auto_add_library(autoware_test_utils SHARED | ||
src/autoware_test_utils.cpp) | ||
|
||
ament_auto_add_library(mock_data_parser SHARED | ||
src/mock_data_parser.cpp) | ||
|
||
target_link_libraries(mock_data_parser | ||
yaml-cpp | ||
) | ||
|
||
if(BUILD_TESTING) | ||
ament_add_ros_isolated_gtest(test_mock_data_parser | ||
test/test_mock_data_parser.cpp) | ||
|
||
target_link_libraries(test_mock_data_parser | ||
mock_data_parser) | ||
endif() | ||
|
||
ament_auto_package(INSTALL_TO_SHARE | ||
config | ||
test_map | ||
test_data | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Test Utils | ||
|
||
## Background | ||
|
||
Several Autoware's components and modules have already adopted unit testing, so a common library to ease the process of writing unit tests is necessary. | ||
|
||
## Purpose | ||
|
||
The objective of the `test_utils` is to develop a unit testing library for the Autoware components. This library will include | ||
|
||
- commonly used functions | ||
- input/mock data parser | ||
- maps for testing | ||
- common routes and mock data for testing. | ||
|
||
## Available Maps | ||
|
||
The following maps are available [here](https://github.com/autowarefoundation/autoware.universe/tree/main/planning/test_utils/test_map) | ||
|
||
### Common | ||
|
||
The common map contains multiple types of usable inputs, including shoulder lanes, intersections, and some regulatory elements. The common map is named `lanelet2_map.osm` in the folder. | ||
|
||
![common](./images/common.png) | ||
|
||
### 2 km Straight | ||
|
||
The 2 km straight lanelet map consists of two lanes that run in the same direction. The map is named `2km_test.osm`. | ||
|
||
![two_km](./images/2km-test.png) | ||
|
||
The following illustrates the design of the map. | ||
|
||
![straight_diagram](./images/2km-test.svg) | ||
|
||
## Example use cases | ||
|
||
### Autoware Planning Test Manager | ||
|
||
The goal of the [Autoware Planning Test Manager](https://autowarefoundation.github.io/autoware.universe/main/planning/autoware_planning_test_manager/) is to test planning module nodes. The `PlanningInterfaceTestManager` class ([source code](https://github.com/autowarefoundation/autoware.universe/blob/main/planning/autoware_planning_test_manager/src/autoware_planning_test_manager.cpp)) creates wrapper functions based on the `test_utils` functions. |
Oops, something went wrong.