diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-06-29 19:15:02 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-06-29 19:15:02 +0300 |
commit | 117bcfe039c6cd3c235e6a8da064a8c283176648 (patch) | |
tree | cc7a78455108c9e3e584aa4a48e4d663a9d411ce | |
parent | a8bc5f0cdb0217401e418355db71ea042ca552d1 (diff) |
GTests: do not add 'performance' tests to auto-ran tests (with ctest or 'make test')...
-rw-r--r-- | build_files/cmake/Modules/GTestTesting.cmake | 16 | ||||
-rw-r--r-- | tests/gtests/blenlib/CMakeLists.txt | 2 |
2 files changed, 14 insertions, 4 deletions
diff --git a/build_files/cmake/Modules/GTestTesting.cmake b/build_files/cmake/Modules/GTestTesting.cmake index 6a9cae22f33..b98d15ecd41 100644 --- a/build_files/cmake/Modules/GTestTesting.cmake +++ b/build_files/cmake/Modules/GTestTesting.cmake @@ -12,7 +12,7 @@ # #============================================================================= -macro(BLENDER_SRC_GTEST NAME SRC EXTRA_LIBS) +macro(BLENDER_SRC_GTEST_EX NAME SRC EXTRA_LIBS DO_ADD_TEST) if(WITH_GTESTS) get_property(_current_include_directories DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} @@ -40,10 +40,20 @@ macro(BLENDER_SRC_GTEST NAME SRC EXTRA_LIBS) RUNTIME_OUTPUT_DIRECTORY_RELEASE "${TESTS_OUTPUT_DIR}" RUNTIME_OUTPUT_DIRECTORY_DEBUG "${TESTS_OUTPUT_DIR}" INCLUDE_DIRECTORIES "${TEST_INC}") - add_test(${NAME}_test ${TESTS_OUTPUT_DIR}/${NAME}_test) + if(${DO_ADD_TEST}) + add_test(${NAME}_test ${TESTS_OUTPUT_DIR}/${NAME}_test) + endif() endif() endmacro() +macro(BLENDER_SRC_GTEST NAME SRC EXTRA_LIBS) + BLENDER_SRC_GTEST_EX("${NAME}" "${SRC}" "${EXTRA_LIBS}" "TRUE") +endmacro() + macro(BLENDER_TEST NAME EXTRA_LIBS) - BLENDER_SRC_GTEST("${NAME}" "${NAME}_test.cc" "${EXTRA_LIBS}") + BLENDER_SRC_GTEST_EX("${NAME}" "${NAME}_test.cc" "${EXTRA_LIBS}" "TRUE") +endmacro() + +macro(BLENDER_TEST_PERFORMANCE NAME EXTRA_LIBS) + BLENDER_SRC_GTEST_EX("${NAME}" "${NAME}_test.cc" "${EXTRA_LIBS}" "FALSE") endmacro() diff --git a/tests/gtests/blenlib/CMakeLists.txt b/tests/gtests/blenlib/CMakeLists.txt index 20b876053d9..ae773a05e8d 100644 --- a/tests/gtests/blenlib/CMakeLists.txt +++ b/tests/gtests/blenlib/CMakeLists.txt @@ -46,5 +46,5 @@ BLENDER_TEST(BLI_hash_mm2a "bf_blenlib") BLENDER_TEST(BLI_ghash "bf_blenlib") if(WITH_TESTS_PERFORMANCE) - BLENDER_TEST(BLI_ghash_performance "bf_blenlib") + BLENDER_TEST_PERFORMANCE(BLI_ghash_performance "bf_blenlib") endif() |