Commit dbe5c5ee authored by Guido Casati's avatar Guido Casati

Minor additions to UnitTests.md

parent 57644223
......@@ -25,7 +25,8 @@ ninja tests
```
Then, you can run `ctest` to run all tests:
```
```bash
$ ctest
Test project /home/richie/w/ctest/build
Start 1: nr_rlc_tests
......@@ -36,6 +37,8 @@ Test project /home/richie/w/ctest/build
Total Test time (real) = 0.06 sec
```
The user can see all available tests by typing `ctest -N` and then run a specific with `ctest -R <test_name>`, e.g. `ctest -R nr_rlc_tests`.
A couple of interesting variables are `--verbose`, `--output-on-failure`.
# How to add a new test
......@@ -59,7 +62,8 @@ process is
In the simplest case, in an existing `CMakeLists.txt`, you might add the
following:
```
```bash
if(ENABLE_TESTS)
add_executable(my_test mytest.c)
add_dependencies(tests my_test)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment