From dbe5c5ee61047a56a10496e2f74a4dc501a779ef Mon Sep 17 00:00:00 2001 From: Guido Casati Date: Fri, 16 Aug 2024 17:01:52 +0200 Subject: [PATCH] Minor additions to UnitTests.md --- doc/UnitTests.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/UnitTests.md b/doc/UnitTests.md index d1bbbed0ae..b9dc1194ff 100644 --- a/doc/UnitTests.md +++ b/doc/UnitTests.md @@ -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 `, 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)