-
Notifications
You must be signed in to change notification settings - Fork 667
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add how to rebuild a package, how to run unit tests, and how to limit directories to run unit tests tier4/autoware.iv#1545 tier4/autoware.iv#1924
- Loading branch information
1 parent
694fc43
commit 2c8517d
Showing
1 changed file
with
26 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,28 @@ | ||
# TierIV Unit Test Guideline | ||
|
||
See [confluence page](https://tier4.atlassian.net/wiki/spaces/AIP/pages/1400045921/T4) | ||
## How to run unit tests | ||
|
||
You may modify the code before running unit tests. This is how to rebuild the package you modified. | ||
|
||
```sh | ||
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-up-to <package name> | ||
``` | ||
|
||
`package name` must be the name of a package that contains package.xml | ||
|
||
Use the commands below to run unit tests. `--packages-skip-test-passed` can be used to ignore test cases that already passed. | ||
|
||
```sh | ||
source install/setup.bash | ||
colcon test --event-handlers console_cohesion+ --packages-skip-test-passed | ||
``` | ||
|
||
If you would like to run unit tests in a specific directory, you can use the `--base-paths` option. For example, if you would like to run unit tests in autoware.iv, you can run | ||
|
||
```sh | ||
colcon test --event-handlers console_cohesion+ --base-paths src/autoware/autoware.iv --packages-skip-test-passed | ||
``` | ||
|
||
## How to write unit tests | ||
|
||
See [confluence page](https://tier4.atlassian.net/wiki/spaces/AIP/pages/1400045921/T4) for the details. |