File tree Expand file tree Collapse file tree 1 file changed +30
-1
lines changed
docs/+current/modules/testing/cmake Expand file tree Collapse file tree 1 file changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -7,4 +7,33 @@ author: RSP Systems A/S
77
88# Test Executor
99
10- _ TODO: ..._
10+ When tests are registered (_ via [ ctest's ` add_test() ` ] ( https://cmake.org/cmake/help/latest/command/add_test.html ) _ ),
11+ a "test executor" (_ cmake script_ ) is requested executed. The executor is then responsible for invoking the actual test
12+ callback, that has been specified via [ ` define_test() ` ] ( ./03_test.md#parameters ) .
13+ In addition, the executor is also responsible for executing eventual
14+ [ before and after callbacks] ( ./02_test_case.md#before-after-callbacks ) , for the test case.
15+
16+ ## Location
17+
18+ The executor can be found at:
19+ [ ` rsp/testing/executor.cmake ` ] ( https://github.com/rsps/cmake-scripts/blob/main/cmake/rsp/testing/executor.cmake ) .
20+
21+ ## Custom Executor
22+
23+ To use a custom executor, set the path to your executor via the ` RSP_TEST_EXECUTOR_PATH ` property.
24+ This _ SHOULD_ be done before specifying your test suites.
25+
26+ ``` cmake
27+ # ...in your /tests/CMakeLists.txt
28+
29+ enable_testing()
30+
31+ project(my_package_tests LANGUAGES NONE)
32+
33+ include("rsp/testing")
34+
35+ # Set path to custom test executor
36+ set(RSP_TEST_EXECUTOR_PATH "../cmake/my_custom_test_executor.cmake")
37+
38+ define_test_suite("unit" DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/unit")
39+ ```
You can’t perform that action at this time.
0 commit comments