diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2021-01-11 13:29:30 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2021-01-11 13:29:30 +0300 |
commit | 54f8a5dd737388d89332f3074eba01edc9efa8c1 (patch) | |
tree | 5ed34e5235a250625130aeab7bdc4cbc5647071c /tests/gtests/runner/CMakeLists.txt | |
parent | 63cea2b793d0dd98b69cab156ba3be4dcf9f234a (diff) |
Tests: run suites instead of individual test cases
Group all tests of a test suite into a single test command invocation.
This reduces the number of invocations by `ctest` by an order of
magnitude.
Since rB56aa5b0d8c6b663, `bin/tests/blender_test` was run for every
individual test. Having over a 1000 tests made testing slower than
necessary. Individual tests can still be run if desired by invocation of
`bin/tests/blender_test --gtest_filter=suitename.testname`.
NOTE: For this commit to have an immediate effect, it may be necessary
to remove the `tests` and `Testing` directories and some CMake files
from your build directory and rebuild. Run `ctest -N` to see the list of
tests; there should be less than 200.
Reviewed By: sergey, LazyDodo, sebbas
Maniphest Tasks: T83222
Differential Revision: https://developer.blender.org/D9649
Diffstat (limited to 'tests/gtests/runner/CMakeLists.txt')
-rw-r--r-- | tests/gtests/runner/CMakeLists.txt | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/tests/gtests/runner/CMakeLists.txt b/tests/gtests/runner/CMakeLists.txt index 6640d798ed6..85b80979074 100644 --- a/tests/gtests/runner/CMakeLists.txt +++ b/tests/gtests/runner/CMakeLists.txt @@ -71,36 +71,3 @@ elseif(APPLE) endif() unset(_test_libs) - -# This runs the blender_test executable with `--gtest_list_tests`, then -# exposes those tests individually to the ctest runner. -# See https://cmake.org/cmake/help/v3.18/module/GoogleTest.html -# -# We have our own modified copy of this CMake module. -include(GTest) - -set(_GOOGLETEST_DISCOVER_TESTS_SCRIPT - ${CMAKE_SOURCE_DIR}/build_files/cmake/Modules/GTestAddTests.cmake -) - -if(APPLE) - set(_test_release_dir ${TEST_INSTALL_DIR}/Blender.app/Contents/Resources/${BLENDER_VERSION}) -else() - if(WIN32 OR WITH_INSTALL_PORTABLE) - set(_test_release_dir ${TEST_INSTALL_DIR}/${BLENDER_VERSION}) - else() - set(_test_release_dir ${TEST_INSTALL_DIR}/share/blender/${BLENDER_VERSION}) - endif() -endif() - -gtest_discover_tests(blender_test - WORKING_DIRECTORY "${TEST_INSTALL_DIR}" -# So that it will run after the install phase that will copy the required libraries - DISCOVERY_MODE PRE_TEST -# So that unit tests know where to find files: - EXTRA_ARGS - --test-assets-dir "${CMAKE_SOURCE_DIR}/../lib/tests" - --test-release-dir "${_test_release_dir}" -) - -unset(_test_release_dir) |