Run CTest tests#
In addition to CMake integration, canary can run CTest tests natively. Simply pass the path to a CMake build directory containing CTest tests:
$ canary run CMAKE_BINARY_DIR
canary will read the CTest instructions for each test added by add_test and run the test.
Supported CTest properties#
The following CTest properties are supported by canary.
Unsupported CTest properties#
The following CTest properties are not supported by canary.
Note
Contact the canary developers if you require any one of these properties to run your test suite.
Differences in behavior from CTest#
DEPENDS#
The CTest DEPENDS property sets the execution order, but “the results of those tests are not considered, the dependency relationship is purely for order of execution”. In canary, the results of the tests are considered. See depends_on.
RESOURCE_GROUPS#
canary supports the CTest resource specification file. See Resource allocation.
*_REGULAR_EXPRESSION behavior#
*_REGULAR_EXPRESSION patterns are evaluated in the following order:
- If
PASS_REGULAR_EXPRESSIONis defined set status to
successif any pass regular expression matches, otherwise set status tofailed.- If
SKIP_RETURN_CODEis defined set status to
skippedif the test’s return code is equal toSKIP_RETURN_CODE- If
SKIP_REGULAR_EXPRESSIONis defined set status to
skippedif any skip regular expression matches- If
FAIL_REGULAR_EXPRESSIONis defined set status to
failedif any fail regular expression matches
Thus, if a test defines both PASS_REGULAR_EXPRESSION and FAIL_REGULAR_EXPRESSION and the output contains both patterns, the test will be marked as failed since the fail regular expression is evaluated last.