Skip to content

Commit 0d912b2

Browse files
authored
[RSDK-7426] Make it more obvious how to run the tests for the C++ SDK (#446)
1 parent 76935e7 commit 0d912b2

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,20 @@ to change without warning. In particular, using Boost.Log macros such as
9797
`BOOST_LOG_TRIVIAL` or `BOOST_LOG_SEV` is undefined behavior which will likely
9898
fail to output log messages.
9999

100+
## Running Tests
101+
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:
102+
```
103+
ctest
104+
```
105+
Or to avoid navigating all the way to the folder you can specify the test directory, for example:
106+
```
107+
ctest --test-dir build/src/viam/sdk/tests/
108+
```
109+
Additionally, for more useful ctest options explore:
110+
```
111+
ctest --help
112+
```
113+
100114
## License
101115
Copyright 2022 Viam Inc.
102116

0 commit comments

Comments
 (0)