Skip to content

Conversation

@gabegottlob
Copy link
Contributor

Added a section to the README to make the location of the tests and how to run the tests more clear.

@gabegottlob gabegottlob requested a review from a team as a code owner May 30, 2025 16:01
@gabegottlob gabegottlob requested review from lia-viam and stuqdog and removed request for a team May 30, 2025 16:01
Comment on lines +100 to +104
## Running Tests
Tests for the SDK are located in `src/viam/sdk/tests`. The CMakeLists.txt file in that directory defines how to build them. When the SDK is built, the test executables are placed in the test folder within your specified build directory (e.g., `build`, if you followed the instructions in [`BUILDING.md`](https://github.com/viamrobotics/viam-cpp-sdk/blob/main/BUILDING.md)). The test executable files can be run individually. To run the entire test suite at once, navigate to the `tests` folder in your build directory and run:
```
ctest
```
Copy link
Member

Choose a reason for hiding this comment

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

(optional) might be worth noting that you can also run the entire test suite without having to navigate to the folder with ctest --test-dir src/viam/sdk/tests/

Copy link
Member

Choose a reason for hiding this comment

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

Also probably worth noting that there are many other interesting ctest options you can use too, to filter tests, or rerun only failures, etc. I don't think we should try to document those, but encouraging developers to expore ctest --help would only be a good thing.

Copy link
Collaborator

@lia-viam lia-viam left a comment

Choose a reason for hiding this comment

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

seconding ethan's comment, but otherwise lgtm!

@stuqdog stuqdog merged commit 0d912b2 into viamrobotics:main Jun 3, 2025
2 checks passed
@gabegottlob gabegottlob deleted the RSDK-7426 branch June 3, 2025 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants