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
Sometimes you will have to write tests to debug c-side code. This guide will be a guide on how to compile and run these tests.
13
+
14
+
## Adding the file to CMake
15
+
Before you can compile you need to tell CMake to actually build the file for you. If you are not creating a new set of tests, you may skip this section. The following steps show how to add a test file to CMake.
16
+
<Steps>
17
+
1. Navigate to the directory where you have written your test. As of writing this directory can be any one of the following.
18
+
*`test_interfaces/unit`
19
+
*`test_gs/unit` (Note: As of writing you will need to do extra work to get this to work. Contact a lead if you need to build this directory)
20
+
*`test_obc/unit`
21
+
2. Open the `CMakeLists.txt` file.
22
+
3. Add the correct files and dependencies to the `CMakeLists.txt`. Usually this will be a file path in the `TEST_SOURCES` variable to your `.cpp` file that contains the tests you want to run. As an example the `TEST_SOURCES` CMake variable in `CMakeLists.txt` under the `test_interfaces/unit` directory is shown below.
0 commit comments