mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
This commit introduces a new way to build unit tests. It is now possible
for each module to generate its own test library. The tests in these
libraries are then bundled into a single executable.
The test executable can be run with `ctest`. Even though the tests
reside in a single executable, they are still exposed as individual
tests to `ctest`, and thus can be selected via its `-R` argument.
Not yet ported tests still build & run as before.
The following rules apply:
- Test code should reside in the same directory as the code under test.
- Tests that target functionality in `somefile.{c,cc}` should reside in
`somefile_test.cc`.
- The namespace for tests is the `tests` sub-namespace of the code under
test. For example, tests for `blender::bke` should be in
`blender::bke:tests`.
- The test files should be listed in the module's `CMakeLists.txt` in a
`blender_add_test_lib()` call. See the `blenkernel` module for an
example.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D7649
|
||
|---|---|---|
| .. | ||
| intern | ||
| libmv | ||
| third_party/msinttypes | ||
| .clang-format | ||
| bundle.sh | ||
| ChangeLog | ||
| CMakeLists.txt | ||
| files.txt | ||
| libmv-capi.h | ||
| mkfiles.sh | ||