Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2020-07-24 13:40:20 +0300
committerJacques Lucke <jacques@blender.org>2020-07-24 13:40:20 +0300
commitf495b583bee5d43755c19bea4704e40d0e0f8a54 (patch)
tree26c151f759cdc245ae1ca3111056583c732f8d25 /tests
parentb53c46d760568f02cd8be45547a4ffacad3c7b47 (diff)
parentec17b45034fbc9278bb42ea574bdaf2b8a6857e3 (diff)
Merge branch 'blender-v2.90-release'
Diffstat (limited to 'tests')
-rw-r--r--tests/gtests/blenloader/blendfile_loading_base_test.cc8
-rw-r--r--tests/gtests/testing/CMakeLists.txt2
-rw-r--r--tests/gtests/testing/testing_main.cc3
3 files changed, 5 insertions, 8 deletions
diff --git a/tests/gtests/blenloader/blendfile_loading_base_test.cc b/tests/gtests/blenloader/blendfile_loading_base_test.cc
index f15ae615e8a..1f3a312de5d 100644
--- a/tests/gtests/blenloader/blendfile_loading_base_test.cc
+++ b/tests/gtests/blenloader/blendfile_loading_base_test.cc
@@ -100,14 +100,6 @@ void BlendfileLoadingBaseTest::TearDownTestCase()
BKE_blender_atexit();
- if (MEM_get_memory_blocks_in_use() != 0) {
- size_t mem_in_use = MEM_get_memory_in_use() + MEM_get_memory_in_use();
- printf("Error: Not freed memory blocks: %u, total unfreed memory %f MB\n",
- MEM_get_memory_blocks_in_use(),
- (double)mem_in_use / 1024 / 1024);
- MEM_printmemlist();
- }
-
BKE_tempdir_session_purge();
testing::Test::TearDownTestCase();
diff --git a/tests/gtests/testing/CMakeLists.txt b/tests/gtests/testing/CMakeLists.txt
index c8a7f487c5d..d557b27f272 100644
--- a/tests/gtests/testing/CMakeLists.txt
+++ b/tests/gtests/testing/CMakeLists.txt
@@ -28,6 +28,7 @@ set(INC
${GLOG_INCLUDE_DIRS}
${GFLAGS_INCLUDE_DIRS}
../../../extern/gtest/include
+ ../../../intern/guardedalloc
)
set(INC_SYS
@@ -40,6 +41,7 @@ set(SRC
)
set(LIB
+ bf_intern_guardedalloc
)
blender_add_lib(bf_testing_main "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/tests/gtests/testing/testing_main.cc b/tests/gtests/testing/testing_main.cc
index 0acdcf3a8a5..9816e71526b 100644
--- a/tests/gtests/testing/testing_main.cc
+++ b/tests/gtests/testing/testing_main.cc
@@ -19,6 +19,8 @@
#include "testing/testing.h"
+#include "MEM_guardedalloc.h"
+
DEFINE_string(test_assets_dir, "", "lib/tests directory from SVN containing the test assets.");
DEFINE_string(test_release_dir, "", "bin/{blender version} directory of the current build.");
@@ -46,6 +48,7 @@ const std::string &flags_test_release_dir()
int main(int argc, char **argv)
{
+ MEM_initialize_memleak_detection();
testing::InitGoogleTest(&argc, argv);
BLENDER_GFLAGS_NAMESPACE::ParseCommandLineFlags(&argc, &argv, true);
google::InitGoogleLogging(argv[0]);