diff --git a/README.md b/README.md index c4447a8fb..5f0dcb3e2 100644 --- a/README.md +++ b/README.md @@ -97,6 +97,20 @@ to change without warning. In particular, using Boost.Log macros such as `BOOST_LOG_TRIVIAL` or `BOOST_LOG_SEV` is undefined behavior which will likely fail to output log messages. +## 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 +``` +Or to avoid navigating all the way to the folder you can specify the test directory, for example: +``` +ctest --test-dir build/src/viam/sdk/tests/ +``` +Additionally, for more useful ctest options explore: +``` +ctest --help +``` + ## License Copyright 2022 Viam Inc.