You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note the use of the build argument `REPO_SETUP=copy`, which adds a Docker instruction
50
-
to copy the SDK repo from the current working directory, rather than cloning from
50
+
to copy the SDK repo from the current working directory, rather than cloning from
51
51
GitHub. This approach may make more sense for developing on the SDK itself, or if
52
52
your C++ SDK development relies on a localversion of the SDK.
53
53
54
54
The examples above illustrated the use of several `--build-arg` arguments, namely
55
-
`BASE_TAG`, `GIT_TAG`, and `REPO_SETUP`. Please see
55
+
`BASE_TAG`, `GIT_TAG`, and `REPO_SETUP`. Please see
56
56
[Dockerfile.sdk-build](etc/docker/Dockerfile.sdk-build) for a complete account of
57
57
all build arguments and their defaults.
58
58
59
59
## Building Documentation Locally for Testing
60
60
The C++ sdk uses [Doxygen](https://www.doxygen.nl/) to generate documentation.
61
61
An automated workflow will generate and update our documentation on each merge,
62
-
and publish it to [cpp.viam.dev](https://cpp.viam.dev).
62
+
and publish it to [cpp.viam.dev](https://cpp.viam.dev).
63
63
64
64
Generating documentation locally to observe changes while developing with the
65
-
C++ SDK is simple.
65
+
C++ SDK is simple.
66
66
First, make sure doxygen is installed, e.g.,
67
67
```
68
68
(on mac) brew install doxygen
@@ -91,12 +91,26 @@ quickly as possible.
91
91
## A note on logging
92
92
93
93
Users should only interact with logging via the macros, classes, and functions in
94
-
[`viam/sdk/log/logging.hpp`](src/viam/sdk/log/logging.hpp). Logging is
94
+
[`viam/sdk/log/logging.hpp`](src/viam/sdk/log/logging.hpp). Logging is
95
95
implemented using Boost.Log, but this is an implementation detail subject
96
96
to change without warning. In particular, using Boost.Log macros such as
97
-
`BOOST_LOG_TRIVIAL` or `BOOST_LOG_SEV` is undefined behavior which will likely
97
+
`BOOST_LOG_TRIVIAL` or `BOOST_LOG_SEV` is undefined behavior which will likely
98
98
fail to output log messages.
99
99
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:
0 commit comments