diff options
author | Brecht Van Lommel <brecht@blender.org> | 2020-08-07 17:43:42 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-08-10 19:14:00 +0300 |
commit | 53d203dea8230da4e80f3cc61468a4e24ff6759c (patch) | |
tree | 3f1b7498fb1a3108e60a4355bec0e4eef76110e4 | |
parent | af77bf1f0f94cb07d5bf681d1f771d4106873780 (diff) |
Tests: move remaining gtests into their own module folders
And make them part of the blender_test runner. The one exception is blenlib
performance tests, which we don't want to run by default. They remain in their
own executable.
Differential Revision: https://developer.blender.org/D8498
-rw-r--r-- | intern/CMakeLists.txt | 4 | ||||
-rw-r--r-- | intern/ffmpeg/CMakeLists.txt (renamed from tests/gtests/ffmpeg/CMakeLists.txt) | 46 | ||||
-rw-r--r-- | intern/ffmpeg/tests/ffmpeg_codecs.cc (renamed from tests/gtests/ffmpeg/ffmpeg_codecs.cc) | 8 | ||||
-rw-r--r-- | intern/guardedalloc/CMakeLists.txt | 16 | ||||
-rw-r--r-- | intern/guardedalloc/tests/guardedalloc_alignment_test.cc (renamed from tests/gtests/guardedalloc/guardedalloc_alignment_test.cc) | 0 | ||||
-rw-r--r-- | intern/guardedalloc/tests/guardedalloc_overflow_test.cc (renamed from tests/gtests/guardedalloc/guardedalloc_overflow_test.cc) | 0 | ||||
-rw-r--r-- | source/blender/blenlib/CMakeLists.txt | 34 | ||||
-rw-r--r-- | source/blender/blenlib/tests/BLI_array_store_test.cc (renamed from tests/gtests/blenlib/BLI_array_store_test.cc) | 0 | ||||
-rw-r--r-- | source/blender/blenlib/tests/BLI_array_utils_test.cc (renamed from tests/gtests/blenlib/BLI_array_utils_test.cc) | 0 | ||||
-rw-r--r-- | source/blender/blenlib/tests/BLI_delaunay_2d_test.cc (renamed from tests/gtests/blenlib/BLI_delaunay_2d_test.cc) | 8 | ||||
-rw-r--r-- | source/blender/blenlib/tests/BLI_expr_pylike_eval_test.cc (renamed from tests/gtests/blenlib/BLI_expr_pylike_eval_test.cc) | 0 | ||||
-rw-r--r-- | source/blender/blenlib/tests/BLI_ghash_test.cc (renamed from tests/gtests/blenlib/BLI_ghash_test.cc) | 0 | ||||
-rw-r--r-- | source/blender/blenlib/tests/BLI_hash_mm2a_test.cc (renamed from tests/gtests/blenlib/BLI_hash_mm2a_test.cc) | 0 | ||||
-rw-r--r-- | source/blender/blenlib/tests/BLI_heap_simple_test.cc (renamed from tests/gtests/blenlib/BLI_heap_simple_test.cc) | 0 | ||||
-rw-r--r-- | source/blender/blenlib/tests/BLI_heap_test.cc (renamed from tests/gtests/blenlib/BLI_heap_test.cc) | 0 | ||||
-rw-r--r-- | source/blender/blenlib/tests/BLI_kdopbvh_test.cc (renamed from tests/gtests/blenlib/BLI_kdopbvh_test.cc) | 2 | ||||
-rw-r--r-- | source/blender/blenlib/tests/BLI_linklist_lockfree_test.cc (renamed from tests/gtests/blenlib/BLI_linklist_lockfree_test.cc) | 0 | ||||
-rw-r--r-- | source/blender/blenlib/tests/BLI_listbase_test.cc (renamed from tests/gtests/blenlib/BLI_listbase_test.cc) | 0 | ||||
-rw-r--r-- | source/blender/blenlib/tests/BLI_math_base_test.cc (renamed from tests/gtests/blenlib/BLI_math_base_test.cc) | 0 | ||||
-rw-r--r-- | source/blender/blenlib/tests/BLI_math_bits_test.cc (renamed from tests/gtests/blenlib/BLI_math_bits_test.cc) | 0 | ||||
-rw-r--r-- | source/blender/blenlib/tests/BLI_math_color_test.cc (renamed from tests/gtests/blenlib/BLI_math_color_test.cc) | 0 | ||||
-rw-r--r-- | source/blender/blenlib/tests/BLI_math_geom_test.cc (renamed from tests/gtests/blenlib/BLI_math_geom_test.cc) | 2 | ||||
-rw-r--r-- | source/blender/blenlib/tests/BLI_math_matrix_test.cc (renamed from tests/gtests/blenlib/BLI_math_matrix_test.cc) | 0 | ||||
-rw-r--r-- | source/blender/blenlib/tests/BLI_math_vector_test.cc (renamed from tests/gtests/blenlib/BLI_math_vector_test.cc) | 0 | ||||
-rw-r--r-- | source/blender/blenlib/tests/BLI_memiter_test.cc (renamed from tests/gtests/blenlib/BLI_memiter_test.cc) | 0 | ||||
-rw-r--r-- | source/blender/blenlib/tests/BLI_path_util_test.cc (renamed from tests/gtests/blenlib/BLI_path_util_test.cc) | 47 | ||||
-rw-r--r-- | source/blender/blenlib/tests/BLI_polyfill_2d_test.cc (renamed from tests/gtests/blenlib/BLI_polyfill_2d_test.cc) | 2 | ||||
-rw-r--r-- | source/blender/blenlib/tests/BLI_ressource_strings.h (renamed from tests/gtests/blenlib/BLI_ressource_strings.h) | 0 | ||||
-rw-r--r-- | source/blender/blenlib/tests/BLI_session_uuid_test.cc (renamed from tests/gtests/blenlib/BLI_session_uuid_test.cc) | 0 | ||||
-rw-r--r-- | source/blender/blenlib/tests/BLI_stack_test.cc (renamed from tests/gtests/blenlib/BLI_stack_test.cc) | 0 | ||||
-rw-r--r-- | source/blender/blenlib/tests/BLI_string_test.cc (renamed from tests/gtests/blenlib/BLI_string_test.cc) | 19 | ||||
-rw-r--r-- | source/blender/blenlib/tests/BLI_string_utf8_test.cc (renamed from tests/gtests/blenlib/BLI_string_utf8_test.cc) | 19 | ||||
-rw-r--r-- | source/blender/blenlib/tests/BLI_task_graph_test.cc (renamed from tests/gtests/blenlib/BLI_task_graph_test.cc) | 0 | ||||
-rw-r--r-- | source/blender/blenlib/tests/BLI_task_test.cc (renamed from tests/gtests/blenlib/BLI_task_test.cc) | 0 | ||||
-rw-r--r-- | source/blender/blenlib/tests/performance/BLI_ghash_performance_test.cc (renamed from tests/gtests/blenlib/BLI_ghash_performance_test.cc) | 54 | ||||
-rw-r--r-- | source/blender/blenlib/tests/performance/BLI_task_performance_test.cc (renamed from tests/gtests/blenlib/BLI_task_performance_test.cc) | 0 | ||||
-rw-r--r-- | source/blender/blenlib/tests/performance/CMakeLists.txt (renamed from tests/gtests/guardedalloc/CMakeLists.txt) | 10 | ||||
-rw-r--r-- | source/blender/blenloader/CMakeLists.txt | 14 | ||||
-rw-r--r-- | source/blender/blenloader/tests/blendfile_load_test.cc (renamed from tests/gtests/blenloader/blendfile_load_test.cc) | 0 | ||||
-rw-r--r-- | source/blender/blenloader/tests/blendfile_loading_base_test.cc (renamed from tests/gtests/blenloader/blendfile_loading_base_test.cc) | 0 | ||||
-rw-r--r-- | source/blender/blenloader/tests/blendfile_loading_base_test.h (renamed from tests/gtests/blenloader/blendfile_loading_base_test.h) | 0 | ||||
-rw-r--r-- | source/blender/bmesh/CMakeLists.txt | 13 | ||||
-rw-r--r-- | source/blender/bmesh/tests/bmesh_core_test.cc (renamed from tests/gtests/bmesh/bmesh_core_test.cc) | 0 | ||||
-rw-r--r-- | source/blender/io/alembic/CMakeLists.txt | 14 | ||||
-rw-r--r-- | source/blender/io/alembic/tests/abc_export_test.cc (renamed from tests/gtests/alembic/abc_export_test.cc) | 0 | ||||
-rw-r--r-- | source/blender/io/alembic/tests/abc_matrix_test.cc (renamed from tests/gtests/alembic/abc_matrix_test.cc) | 0 | ||||
-rw-r--r-- | source/blender/io/common/CMakeLists.txt | 5 | ||||
-rw-r--r-- | source/blender/io/common/intern/abstract_hierarchy_iterator_test.cc | 3 | ||||
-rw-r--r-- | tests/gtests/CMakeLists.txt | 14 | ||||
-rw-r--r-- | tests/gtests/alembic/CMakeLists.txt | 63 | ||||
-rw-r--r-- | tests/gtests/blenlib/CMakeLists.txt | 72 | ||||
-rw-r--r-- | tests/gtests/blenlib/stubs/bf_intern_eigen_stubs.h | 27 | ||||
-rw-r--r-- | tests/gtests/blenloader/CMakeLists.txt | 92 | ||||
-rw-r--r-- | tests/gtests/bmesh/CMakeLists.txt | 49 |
54 files changed, 143 insertions, 494 deletions
diff --git a/intern/CMakeLists.txt b/intern/CMakeLists.txt index 0758567bb78..c1792a312b2 100644 --- a/intern/CMakeLists.txt +++ b/intern/CMakeLists.txt @@ -77,6 +77,10 @@ if(WITH_QUADRIFLOW) add_subdirectory(quadriflow) endif() +if(WITH_CODEC_FFMPEG) + add_subdirectory(ffmpeg) +endif() + if(UNIX AND NOT APPLE) add_subdirectory(libc_compat) endif() diff --git a/tests/gtests/ffmpeg/CMakeLists.txt b/intern/ffmpeg/CMakeLists.txt index dbd4f9f1fed..e141da9cbca 100644 --- a/tests/gtests/ffmpeg/CMakeLists.txt +++ b/intern/ffmpeg/CMakeLists.txt @@ -14,31 +14,29 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # -# The Original Code is Copyright (C) 2014, Blender Foundation +# The Original Code is Copyright (C) 2020, Blender Foundation # All rights reserved. # ***** END GPL LICENSE BLOCK ***** -set(INC - . - .. - - ${FFMPEG_INCLUDE_DIRS} - ${PNG_INCLUDE_DIRS} - ${ZLIB_INCLUDE_DIRS} -) - -set(LIB - ${PNG_LIBRARIES} - ${FFMPEG_LIBRARIES} - ${ZLIB_LIBRARIES} -) - -if(WITH_IMAGE_OPENJPEG) - set(LIB ${LIB} ${OPENJPEG_LIBRARIES}) +if(WITH_GTESTS) + set(TEST_SRC + tests/ffmpeg_codecs.cc + ) + set(TEST_INC + ) + set(TEST_INC_SYS + ${FFMPEG_INCLUDE_DIRS} + ${PNG_INCLUDE_DIRS} + ${ZLIB_INCLUDE_DIRS} + ) + set(TEST_LIB + ${PNG_LIBRARIES} + ${FFMPEG_LIBRARIES} + ${ZLIB_LIBRARIES} + ) + if(WITH_IMAGE_OPENJPEG) + set(TEST_LIB ${TEST_LIB} ${OPENJPEG_LIBRARIES}) + endif() + include(GTestTesting) + blender_add_test_lib(bf_intern_ffmpeg_tests "${TEST_SRC}" "${TEST_INC}" "${TEST_INC_SYS}" "${TEST_LIB}") endif() - -setup_platform_linker_flags() -link_directories(${FFMPEG_LIBPATH} ${PNG_LIBPATH} ${ZLIB_LIBPATH}) -include_directories(${INC}) - -BLENDER_SRC_GTEST(ffmpeg "ffmpeg_codecs.cc" "${LIB}") diff --git a/tests/gtests/ffmpeg/ffmpeg_codecs.cc b/intern/ffmpeg/tests/ffmpeg_codecs.cc index bbf2b3a4111..d3cba6d228a 100644 --- a/tests/gtests/ffmpeg/ffmpeg_codecs.cc +++ b/intern/ffmpeg/tests/ffmpeg_codecs.cc @@ -85,25 +85,25 @@ bool test_codec_audio_by_name(const char *codecname, AVSampleFormat fmt) #define str(s) #s #define FFMPEG_TEST_VCODEC_ID(codec, fmt) \ - TEST(CheckCodec, codec##_##fmt) \ + TEST(ffmpeg, codec##_##fmt) \ { \ EXPECT_TRUE(test_codec_video_by_codecid(codec, fmt)); \ } #define FFMPEG_TEST_VCODEC_NAME(codec, fmt) \ - TEST(CheckCodec, codec##_##fmt) \ + TEST(ffmpeg, codec##_##fmt) \ { \ EXPECT_TRUE(test_codec_video_by_name(str(codec), fmt)); \ } #define FFMPEG_TEST_ACODEC_ID(codec, fmt) \ - TEST(CheckCodec, codec##_##fmt) \ + TEST(ffmpeg, codec##_##fmt) \ { \ EXPECT_TRUE(test_codec_audio_by_codecid(codec, fmt)); \ } #define FFMPEG_TEST_ACODEC_NAME(codec, fmt) \ - TEST(CheckCodec, codec) \ + TEST(ffmpeg, codec) \ { \ EXPECT_TRUE(test_codec_audio_by_name(str(codec), fmt)); \ } diff --git a/intern/guardedalloc/CMakeLists.txt b/intern/guardedalloc/CMakeLists.txt index 1ab365a376a..ccc1500c014 100644 --- a/intern/guardedalloc/CMakeLists.txt +++ b/intern/guardedalloc/CMakeLists.txt @@ -78,3 +78,19 @@ if(WITH_CXX_GUARDEDALLOC) ) blender_add_lib(bf_intern_guardedalloc_cpp "${SRC}" "${INC}" "${INC_SYS}" "${LIB}") endif() + +if(WITH_GTESTS) + set(TEST_SRC + tests/guardedalloc_alignment_test.cc + tests/guardedalloc_overflow_test.cc + ) + set(TEST_INC + ../../source/blender/blenlib + ) + set(TEST_LIB + bf_intern_guardedalloc + bf_blenlib + ) + include(GTestTesting) + blender_add_test_lib(bf_intern_guardedalloc_tests "${TEST_SRC}" "${INC};${TEST_INC}" "${INC_SYS}" "${LIB};${TEST_LIB}") +endif() diff --git a/tests/gtests/guardedalloc/guardedalloc_alignment_test.cc b/intern/guardedalloc/tests/guardedalloc_alignment_test.cc index 4c676c6cc76..4c676c6cc76 100644 --- a/tests/gtests/guardedalloc/guardedalloc_alignment_test.cc +++ b/intern/guardedalloc/tests/guardedalloc_alignment_test.cc diff --git a/tests/gtests/guardedalloc/guardedalloc_overflow_test.cc b/intern/guardedalloc/tests/guardedalloc_overflow_test.cc index bd47482d033..bd47482d033 100644 --- a/tests/gtests/guardedalloc/guardedalloc_overflow_test.cc +++ b/intern/guardedalloc/tests/guardedalloc_overflow_test.cc diff --git a/source/blender/blenlib/CMakeLists.txt b/source/blender/blenlib/CMakeLists.txt index a5af517ecca..819c74b6946 100644 --- a/source/blender/blenlib/CMakeLists.txt +++ b/source/blender/blenlib/CMakeLists.txt @@ -347,26 +347,58 @@ blender_add_lib(bf_blenlib "${SRC}" "${INC}" "${INC_SYS}" "${LIB}") if(WITH_GTESTS) set(TEST_SRC + tests/BLI_array_store_test.cc tests/BLI_array_test.cc + tests/BLI_array_utils_test.cc + tests/BLI_delaunay_2d_test.cc tests/BLI_disjoint_set_test.cc tests/BLI_edgehash_test.cc + tests/BLI_expr_pylike_eval_test.cc + tests/BLI_ghash_test.cc + tests/BLI_hash_mm2a_test.cc + tests/BLI_heap_simple_test.cc + tests/BLI_heap_test.cc tests/BLI_index_mask_test.cc tests/BLI_index_range_test.cc + tests/BLI_kdopbvh_test.cc tests/BLI_linear_allocator_test.cc + tests/BLI_linklist_lockfree_test.cc + tests/BLI_listbase_test.cc tests/BLI_map_test.cc tests/BLI_math_base_safe_test.cc + tests/BLI_math_base_test.cc + tests/BLI_math_bits_test.cc + tests/BLI_math_color_test.cc + tests/BLI_math_geom_test.cc + tests/BLI_math_matrix_test.cc + tests/BLI_math_vector_test.cc + tests/BLI_memiter_test.cc tests/BLI_memory_utils_test.cc tests/BLI_multi_value_map_test.cc + tests/BLI_path_util_test.cc + tests/BLI_polyfill_2d_test.cc + tests/BLI_ressource_strings.h + tests/BLI_session_uuid_test.cc tests/BLI_set_test.cc tests/BLI_span_test.cc tests/BLI_stack_cxx_test.cc + tests/BLI_stack_test.cc tests/BLI_string_ref_test.cc + tests/BLI_string_test.cc + tests/BLI_string_utf8_test.cc + tests/BLI_task_graph_test.cc + tests/BLI_task_test.cc tests/BLI_vector_set_test.cc tests/BLI_vector_test.cc ) + set(TEST_INC + ../imbuf + ) set(TEST_LIB bf_blenlib ) include(GTestTesting) - blender_add_test_lib(bf_bli_tests "${TEST_SRC}" "${INC};${TEST_INC}" "${INC_SYS}" "${LIB};${TEST_LIB}") + blender_add_test_lib(bf_blenlib_tests "${TEST_SRC}" "${INC};${TEST_INC}" "${INC_SYS}" "${LIB};${TEST_LIB}") + + add_subdirectory(tests/performance) endif() diff --git a/tests/gtests/blenlib/BLI_array_store_test.cc b/source/blender/blenlib/tests/BLI_array_store_test.cc index a1ec8ec7bb3..a1ec8ec7bb3 100644 --- a/tests/gtests/blenlib/BLI_array_store_test.cc +++ b/source/blender/blenlib/tests/BLI_array_store_test.cc diff --git a/tests/gtests/blenlib/BLI_array_utils_test.cc b/source/blender/blenlib/tests/BLI_array_utils_test.cc index 33b4cd35d52..33b4cd35d52 100644 --- a/tests/gtests/blenlib/BLI_array_utils_test.cc +++ b/source/blender/blenlib/tests/BLI_array_utils_test.cc diff --git a/tests/gtests/blenlib/BLI_delaunay_2d_test.cc b/source/blender/blenlib/tests/BLI_delaunay_2d_test.cc index 8d62b111e12..fd2de9864af 100644 --- a/tests/gtests/blenlib/BLI_delaunay_2d_test.cc +++ b/source/blender/blenlib/tests/BLI_delaunay_2d_test.cc @@ -126,6 +126,7 @@ static void fill_input_from_string(CDT_input *r_input, const char *spec) } } +#if DO_FILE_TESTS static void fill_input_from_file(CDT_input *in, const char *filename) { std::FILE *fp = std::fopen(filename, "rb"); @@ -142,6 +143,7 @@ static void fill_input_from_file(CDT_input *in, const char *filename) printf("couldn't open file %s\n", filename); } } +#endif static void free_spec_arrays(CDT_input *in) { @@ -251,6 +253,7 @@ static bool out_face_has_input_id(const CDT_result *r, int out_face_index, int i return false; } +#if DO_FILE_TESTS /* for debugging */ static void dump_result(CDT_result *r) { @@ -301,6 +304,7 @@ static void dump_result(CDT_result *r) } } } +#endif #if DO_REGULAR_TESTS TEST(delaunay, Empty) @@ -1708,8 +1712,8 @@ TEST(delaunay, random_tris_circle_b) #endif #if DO_FILE_TESTS -/* For timing large examples of points only. - * See fill_input_from_file for file format. +/* For manually testing performance by timing a large number of points from a + * file. See fill_input_from_file for file format. */ static void points_from_file_test(const char *filename) { diff --git a/tests/gtests/blenlib/BLI_expr_pylike_eval_test.cc b/source/blender/blenlib/tests/BLI_expr_pylike_eval_test.cc index aad21ae4ad4..aad21ae4ad4 100644 --- a/tests/gtests/blenlib/BLI_expr_pylike_eval_test.cc +++ b/source/blender/blenlib/tests/BLI_expr_pylike_eval_test.cc diff --git a/tests/gtests/blenlib/BLI_ghash_test.cc b/source/blender/blenlib/tests/BLI_ghash_test.cc index fcc0512cb9e..fcc0512cb9e 100644 --- a/tests/gtests/blenlib/BLI_ghash_test.cc +++ b/source/blender/blenlib/tests/BLI_ghash_test.cc diff --git a/tests/gtests/blenlib/BLI_hash_mm2a_test.cc b/source/blender/blenlib/tests/BLI_hash_mm2a_test.cc index c7bea8e15de..c7bea8e15de 100644 --- a/tests/gtests/blenlib/BLI_hash_mm2a_test.cc +++ b/source/blender/blenlib/tests/BLI_hash_mm2a_test.cc diff --git a/tests/gtests/blenlib/BLI_heap_simple_test.cc b/source/blender/blenlib/tests/BLI_heap_simple_test.cc index e717a6e2653..e717a6e2653 100644 --- a/tests/gtests/blenlib/BLI_heap_simple_test.cc +++ b/source/blender/blenlib/tests/BLI_heap_simple_test.cc diff --git a/tests/gtests/blenlib/BLI_heap_test.cc b/source/blender/blenlib/tests/BLI_heap_test.cc index 87e68c175a2..87e68c175a2 100644 --- a/tests/gtests/blenlib/BLI_heap_test.cc +++ b/source/blender/blenlib/tests/BLI_heap_test.cc diff --git a/tests/gtests/blenlib/BLI_kdopbvh_test.cc b/source/blender/blenlib/tests/BLI_kdopbvh_test.cc index f8a4fc1290a..2e8032400e3 100644 --- a/tests/gtests/blenlib/BLI_kdopbvh_test.cc +++ b/source/blender/blenlib/tests/BLI_kdopbvh_test.cc @@ -11,8 +11,6 @@ #include "BLI_math_vector.h" #include "BLI_rand.h" -#include "stubs/bf_intern_eigen_stubs.h" - /* -------------------------------------------------------------------- */ /* Helper Functions */ diff --git a/tests/gtests/blenlib/BLI_linklist_lockfree_test.cc b/source/blender/blenlib/tests/BLI_linklist_lockfree_test.cc index d1a527d57ac..d1a527d57ac 100644 --- a/tests/gtests/blenlib/BLI_linklist_lockfree_test.cc +++ b/source/blender/blenlib/tests/BLI_linklist_lockfree_test.cc diff --git a/tests/gtests/blenlib/BLI_listbase_test.cc b/source/blender/blenlib/tests/BLI_listbase_test.cc index e5b504a0040..e5b504a0040 100644 --- a/tests/gtests/blenlib/BLI_listbase_test.cc +++ b/source/blender/blenlib/tests/BLI_listbase_test.cc diff --git a/tests/gtests/blenlib/BLI_math_base_test.cc b/source/blender/blenlib/tests/BLI_math_base_test.cc index dc20c75576d..dc20c75576d 100644 --- a/tests/gtests/blenlib/BLI_math_base_test.cc +++ b/source/blender/blenlib/tests/BLI_math_base_test.cc diff --git a/tests/gtests/blenlib/BLI_math_bits_test.cc b/source/blender/blenlib/tests/BLI_math_bits_test.cc index 4fa4809beed..4fa4809beed 100644 --- a/tests/gtests/blenlib/BLI_math_bits_test.cc +++ b/source/blender/blenlib/tests/BLI_math_bits_test.cc diff --git a/tests/gtests/blenlib/BLI_math_color_test.cc b/source/blender/blenlib/tests/BLI_math_color_test.cc index 7df47e74eb0..7df47e74eb0 100644 --- a/tests/gtests/blenlib/BLI_math_color_test.cc +++ b/source/blender/blenlib/tests/BLI_math_color_test.cc diff --git a/tests/gtests/blenlib/BLI_math_geom_test.cc b/source/blender/blenlib/tests/BLI_math_geom_test.cc index ea86e5aa97e..44154d49128 100644 --- a/tests/gtests/blenlib/BLI_math_geom_test.cc +++ b/source/blender/blenlib/tests/BLI_math_geom_test.cc @@ -4,8 +4,6 @@ #include "BLI_math.h" -#include "stubs/bf_intern_eigen_stubs.h" - TEST(math_geom, DistToLine2DSimple) { float p[2] = {5.0f, 1.0f}, a[2] = {0.0f, 0.0f}, b[2] = {2.0f, 0.0f}; diff --git a/tests/gtests/blenlib/BLI_math_matrix_test.cc b/source/blender/blenlib/tests/BLI_math_matrix_test.cc index 9c47c02ceaf..9c47c02ceaf 100644 --- a/tests/gtests/blenlib/BLI_math_matrix_test.cc +++ b/source/blender/blenlib/tests/BLI_math_matrix_test.cc diff --git a/tests/gtests/blenlib/BLI_math_vector_test.cc b/source/blender/blenlib/tests/BLI_math_vector_test.cc index 7e75a521d4c..7e75a521d4c 100644 --- a/tests/gtests/blenlib/BLI_math_vector_test.cc +++ b/source/blender/blenlib/tests/BLI_math_vector_test.cc diff --git a/tests/gtests/blenlib/BLI_memiter_test.cc b/source/blender/blenlib/tests/BLI_memiter_test.cc index 3cc86630005..3cc86630005 100644 --- a/tests/gtests/blenlib/BLI_memiter_test.cc +++ b/source/blender/blenlib/tests/BLI_memiter_test.cc diff --git a/tests/gtests/blenlib/BLI_path_util_test.cc b/source/blender/blenlib/tests/BLI_path_util_test.cc index c9e6f3357ff..4b8e6ed8085 100644 --- a/tests/gtests/blenlib/BLI_path_util_test.cc +++ b/source/blender/blenlib/tests/BLI_path_util_test.cc @@ -2,56 +2,15 @@ #include "testing/testing.h" -#include "../../../source/blender/imbuf/IMB_imbuf.h" +#include "IMB_imbuf.h" + #include "BLI_fileops.h" #include "BLI_path_util.h" #include "BLI_string.h" #ifdef _WIN32 -# include "../../../source/blender/blenkernel/BKE_global.h" -#endif - -/* -------------------------------------------------------------------- */ -/* stubs */ - -extern "C" { - -#if _WIN32 -Global G = {0}; -#endif - -const char *GHOST_getUserDir(int version, const char *versionstr); -const char *GHOST_getSystemDir(int version, const char *versionstr); -#ifdef __linux__ -char *zLhm65070058860608_br_find_exe(const char *default_exe); -#endif - -const char *GHOST_getUserDir(int version, const char *versionstr) -{ - return "/home/user"; -} - -const char *GHOST_getSystemDir(int version, const char *versionstr) -{ - return "/system/path"; -} - -struct ImBuf; -void IMB_freeImBuf(struct ImBuf *ibuf) -{ -} -struct ImBuf *IMB_dupImBuf(const ImBuf *ibuf) -{ - return NULL; -} - -#ifdef __linux__ -char *zLhm65070058860608_br_find_exe(const char *default_exe) -{ - return NULL; -} +# include "BKE_global.h" #endif -} /* -------------------------------------------------------------------- */ /* tests */ diff --git a/tests/gtests/blenlib/BLI_polyfill_2d_test.cc b/source/blender/blenlib/tests/BLI_polyfill_2d_test.cc index 527a23ac3a8..a5949c58037 100644 --- a/tests/gtests/blenlib/BLI_polyfill_2d_test.cc +++ b/source/blender/blenlib/tests/BLI_polyfill_2d_test.cc @@ -27,8 +27,6 @@ # include "BLI_polyfill_2d_beautify.h" #endif -#include "stubs/bf_intern_eigen_stubs.h" - static void polyfill_to_obj(const char *id, const float poly[][2], const unsigned int poly_tot, diff --git a/tests/gtests/blenlib/BLI_ressource_strings.h b/source/blender/blenlib/tests/BLI_ressource_strings.h index 119aaeb0036..119aaeb0036 100644 --- a/tests/gtests/blenlib/BLI_ressource_strings.h +++ b/source/blender/blenlib/tests/BLI_ressource_strings.h diff --git a/tests/gtests/blenlib/BLI_session_uuid_test.cc b/source/blender/blenlib/tests/BLI_session_uuid_test.cc index 1a5f17be06c..1a5f17be06c 100644 --- a/tests/gtests/blenlib/BLI_session_uuid_test.cc +++ b/source/blender/blenlib/tests/BLI_session_uuid_test.cc diff --git a/tests/gtests/blenlib/BLI_stack_test.cc b/source/blender/blenlib/tests/BLI_stack_test.cc index 211916e3193..211916e3193 100644 --- a/tests/gtests/blenlib/BLI_stack_test.cc +++ b/source/blender/blenlib/tests/BLI_stack_test.cc diff --git a/tests/gtests/blenlib/BLI_string_test.cc b/source/blender/blenlib/tests/BLI_string_test.cc index 0358a1611f2..1760b7966e3 100644 --- a/tests/gtests/blenlib/BLI_string_test.cc +++ b/source/blender/blenlib/tests/BLI_string_test.cc @@ -20,25 +20,6 @@ using std::string; using std::vector; /* -------------------------------------------------------------------- */ -/* stubs */ - -extern "C" { - -int mk_wcwidth(wchar_t ucs); -int mk_wcswidth(const wchar_t *pwcs, size_t n); - -int mk_wcwidth(wchar_t ucs) -{ - return 0; -} - -int mk_wcswidth(const wchar_t *pwcs, size_t n) -{ - return 0; -} -} - -/* -------------------------------------------------------------------- */ /* tests */ /* BLI_str_partition */ diff --git a/tests/gtests/blenlib/BLI_string_utf8_test.cc b/source/blender/blenlib/tests/BLI_string_utf8_test.cc index c496f918dc0..96df4d2b71a 100644 --- a/tests/gtests/blenlib/BLI_string_utf8_test.cc +++ b/source/blender/blenlib/tests/BLI_string_utf8_test.cc @@ -11,25 +11,6 @@ * quite their share of lines, they deserved their own file. */ /* -------------------------------------------------------------------- */ -/* stubs */ - -extern "C" { - -int mk_wcwidth(wchar_t ucs); -int mk_wcswidth(const wchar_t *pwcs, size_t n); - -int mk_wcwidth(wchar_t ucs) -{ - return 0; -} - -int mk_wcswidth(const wchar_t *pwcs, size_t n) -{ - return 0; -} -} - -/* -------------------------------------------------------------------- */ /* tests */ /* Breaking strings is confusing here, prefer over-long lines. */ diff --git a/tests/gtests/blenlib/BLI_task_graph_test.cc b/source/blender/blenlib/tests/BLI_task_graph_test.cc index efcbf923625..efcbf923625 100644 --- a/tests/gtests/blenlib/BLI_task_graph_test.cc +++ b/source/blender/blenlib/tests/BLI_task_graph_test.cc diff --git a/tests/gtests/blenlib/BLI_task_test.cc b/source/blender/blenlib/tests/BLI_task_test.cc index 3abaf6a6c0b..3abaf6a6c0b 100644 --- a/tests/gtests/blenlib/BLI_task_test.cc +++ b/source/blender/blenlib/tests/BLI_task_test.cc diff --git a/tests/gtests/blenlib/BLI_ghash_performance_test.cc b/source/blender/blenlib/tests/performance/BLI_ghash_performance_test.cc index afabbcaae80..c471b32a39a 100644 --- a/tests/gtests/blenlib/BLI_ghash_performance_test.cc +++ b/source/blender/blenlib/tests/performance/BLI_ghash_performance_test.cc @@ -479,60 +479,6 @@ TEST(ghash, Int2NoHash50000000) } #endif -/* Int_v2: 20M of randomly-generated integer vectors. */ - -static void int2_ghash_tests(GHash *ghash, const char *id, const unsigned int nbr) -{ - printf("\n========== STARTING %s ==========\n", id); - - void *data_v = MEM_mallocN(sizeof(unsigned int[2]) * (size_t)nbr, __func__); - unsigned int(*data)[2] = (unsigned int(*)[2])data_v; - unsigned int(*dt)[2]; - unsigned int i, j; - - { - RNG *rng = BLI_rng_new(1); - for (i = nbr, dt = data; i--; dt++) { - for (j = 2; j--;) { - (*dt)[j] = BLI_rng_get_uint(rng); - } - } - BLI_rng_free(rng); - } - - { - TIMEIT_START(int_v2_insert); - -#ifdef GHASH_RESERVE - BLI_ghash_reserve(ghash, nbr); -#endif - - for (i = nbr, dt = data; i--; dt++) { - BLI_ghash_insert(ghash, *dt, POINTER_FROM_UINT(i)); - } - - TIMEIT_END(int_v2_insert); - } - - PRINTF_GHASH_STATS(ghash); - - { - TIMEIT_START(int_v2_lookup); - - for (i = nbr, dt = data; i--; dt++) { - void *v = BLI_ghash_lookup(ghash, (void *)(*dt)); - EXPECT_EQ(POINTER_AS_UINT(v), i); - } - - TIMEIT_END(int_v2_lookup); - } - - BLI_ghash_free(ghash, NULL, NULL); - MEM_freeN(data); - - printf("========== ENDED %s ==========\n\n", id); -} - /* MultiSmall: create and manipulate a lot of very small ghashes * (90% < 10 items, 9% < 100 items, 1% < 1000 items). */ diff --git a/tests/gtests/blenlib/BLI_task_performance_test.cc b/source/blender/blenlib/tests/performance/BLI_task_performance_test.cc index 208f168b599..208f168b599 100644 --- a/tests/gtests/blenlib/BLI_task_performance_test.cc +++ b/source/blender/blenlib/tests/performance/BLI_task_performance_test.cc diff --git a/tests/gtests/guardedalloc/CMakeLists.txt b/source/blender/blenlib/tests/performance/CMakeLists.txt index 6ca444f28b3..c7cb65f78b2 100644 --- a/tests/gtests/guardedalloc/CMakeLists.txt +++ b/source/blender/blenlib/tests/performance/CMakeLists.txt @@ -21,15 +21,17 @@ set(INC . .. - ../../../intern/guardedalloc ../../../source/blender/blenlib + ../../../source/blender/makesdna + ../../../intern/guardedalloc + ../../../intern/atomic ) +setup_libdirs() include_directories(${INC}) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}") set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}") - -BLENDER_TEST(guardedalloc_alignment "") -BLENDER_TEST(guardedalloc_overflow "") +BLENDER_TEST_PERFORMANCE(BLI_ghash_performance "bf_blenlib") +BLENDER_TEST_PERFORMANCE(BLI_task_performance "bf_blenlib") diff --git a/source/blender/blenloader/CMakeLists.txt b/source/blender/blenloader/CMakeLists.txt index 7eab0651d97..c56e0b5ad2e 100644 --- a/source/blender/blenloader/CMakeLists.txt +++ b/source/blender/blenloader/CMakeLists.txt @@ -98,3 +98,17 @@ blender_add_lib(bf_blenloader "${SRC}" "${INC}" "${INC_SYS}" "${LIB}") # needed so writefile.c can use dna_type_offsets.h add_dependencies(bf_blenloader bf_dna) + +if(WITH_GTESTS) + set(TEST_SRC + tests/blendfile_loading_base_test.cc + tests/blendfile_load_test.cc + ) + set(TEST_INC + ) + set(TEST_LIB + bf_blenloader + ) + include(GTestTesting) + blender_add_test_lib(bf_blenloader_tests "${TEST_SRC}" "${INC};${TEST_INC}" "${INC_SYS}" "${LIB};${TEST_LIB}") +endif() diff --git a/tests/gtests/blenloader/blendfile_load_test.cc b/source/blender/blenloader/tests/blendfile_load_test.cc index 2ba3e3fcd88..2ba3e3fcd88 100644 --- a/tests/gtests/blenloader/blendfile_load_test.cc +++ b/source/blender/blenloader/tests/blendfile_load_test.cc diff --git a/tests/gtests/blenloader/blendfile_loading_base_test.cc b/source/blender/blenloader/tests/blendfile_loading_base_test.cc index d74bab4b31c..d74bab4b31c 100644 --- a/tests/gtests/blenloader/blendfile_loading_base_test.cc +++ b/source/blender/blenloader/tests/blendfile_loading_base_test.cc diff --git a/tests/gtests/blenloader/blendfile_loading_base_test.h b/source/blender/blenloader/tests/blendfile_loading_base_test.h index a5e75ef6df8..a5e75ef6df8 100644 --- a/tests/gtests/blenloader/blendfile_loading_base_test.h +++ b/source/blender/blenloader/tests/blendfile_loading_base_test.h diff --git a/source/blender/bmesh/CMakeLists.txt b/source/blender/bmesh/CMakeLists.txt index fca411e594f..b97b5cc95f2 100644 --- a/source/blender/bmesh/CMakeLists.txt +++ b/source/blender/bmesh/CMakeLists.txt @@ -204,3 +204,16 @@ if(WITH_FREESTYLE) endif() blender_add_lib(bf_bmesh "${SRC}" "${INC}" "${INC_SYS}" "${LIB}") + +if(WITH_GTESTS) + set(TEST_SRC + tests/bmesh_core_test.cc + ) + set(TEST_INC + ) + set(TEST_LIB + bf_bmesh + ) + include(GTestTesting) + blender_add_test_lib(bf_bmesh_tests "${TEST_SRC}" "${INC};${TEST_INC}" "${INC_SYS}" "${LIB};${TEST_LIB}") +endif() diff --git a/tests/gtests/bmesh/bmesh_core_test.cc b/source/blender/bmesh/tests/bmesh_core_test.cc index afbc11e0722..afbc11e0722 100644 --- a/tests/gtests/bmesh/bmesh_core_test.cc +++ b/source/blender/bmesh/tests/bmesh_core_test.cc diff --git a/source/blender/io/alembic/CMakeLists.txt b/source/blender/io/alembic/CMakeLists.txt index 681d6d04acd..de99a2c9d65 100644 --- a/source/blender/io/alembic/CMakeLists.txt +++ b/source/blender/io/alembic/CMakeLists.txt @@ -110,3 +110,17 @@ list(APPEND LIB ) blender_add_lib(bf_alembic "${SRC}" "${INC}" "${INC_SYS}" "${LIB}") + +if(WITH_GTESTS) + set(TEST_SRC + tests/abc_export_test.cc + tests/abc_matrix_test.cc + ) + set(TEST_INC + ) + set(TEST_LIB + bf_alembic + ) + include(GTestTesting) + blender_add_test_lib(bf_io_alembic_tests "${TEST_SRC}" "${INC};${TEST_INC}" "${INC_SYS}" "${LIB};${TEST_LIB}") +endif() diff --git a/tests/gtests/alembic/abc_export_test.cc b/source/blender/io/alembic/tests/abc_export_test.cc index 5c2b505958e..5c2b505958e 100644 --- a/tests/gtests/alembic/abc_export_test.cc +++ b/source/blender/io/alembic/tests/abc_export_test.cc diff --git a/tests/gtests/alembic/abc_matrix_test.cc b/source/blender/io/alembic/tests/abc_matrix_test.cc index b58e989b1a1..b58e989b1a1 100644 --- a/tests/gtests/alembic/abc_matrix_test.cc +++ b/source/blender/io/alembic/tests/abc_matrix_test.cc diff --git a/source/blender/io/common/CMakeLists.txt b/source/blender/io/common/CMakeLists.txt index d3341767f8b..7e39af32f11 100644 --- a/source/blender/io/common/CMakeLists.txt +++ b/source/blender/io/common/CMakeLists.txt @@ -55,8 +55,11 @@ if(WITH_GTESTS) intern/hierarchy_context_order_test.cc intern/object_identifier_test.cc ) + set(TEST_INC + ../../blenloader + ) set(TEST_LIB - bf_blenloader_test + bf_blenloader_tests bf_io_common ) include(GTestTesting) diff --git a/source/blender/io/common/intern/abstract_hierarchy_iterator_test.cc b/source/blender/io/common/intern/abstract_hierarchy_iterator_test.cc index 2bc7560e177..cbb2e63a99f 100644 --- a/source/blender/io/common/intern/abstract_hierarchy_iterator_test.cc +++ b/source/blender/io/common/intern/abstract_hierarchy_iterator_test.cc @@ -17,7 +17,8 @@ * All rights reserved. */ #include "IO_abstract_hierarchy_iterator.h" -#include "blenloader/blendfile_loading_base_test.h" + +#include "tests/blendfile_loading_base_test.h" #include "BLI_math.h" #include "DEG_depsgraph.h" diff --git a/tests/gtests/CMakeLists.txt b/tests/gtests/CMakeLists.txt index 9a7509f81f3..2a89aaa4aea 100644 --- a/tests/gtests/CMakeLists.txt +++ b/tests/gtests/CMakeLists.txt @@ -3,19 +3,9 @@ if(WITH_GTESTS) # Otherwise we get warnings here that we cant fix in external projects remove_strict_flags() - # Build common test runner + # Build common test executable used by most tests add_subdirectory(runner) - # Build tests not yet ported to the common runner + # Build utility library used by test executables add_subdirectory(testing) - add_subdirectory(blenlib) - add_subdirectory(blenloader) - add_subdirectory(guardedalloc) - add_subdirectory(bmesh) - if(WITH_CODEC_FFMPEG) - add_subdirectory(ffmpeg) - endif() - if(WITH_ALEMBIC) - add_subdirectory(alembic) - endif() endif() diff --git a/tests/gtests/alembic/CMakeLists.txt b/tests/gtests/alembic/CMakeLists.txt deleted file mode 100644 index 90f1829fc77..00000000000 --- a/tests/gtests/alembic/CMakeLists.txt +++ /dev/null @@ -1,63 +0,0 @@ -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# The Original Code is Copyright (C) 2014, Blender Foundation -# All rights reserved. -# ***** END GPL LICENSE BLOCK ***** - -set(INC - . - .. - ../../../source/blender/blenlib - ../../../source/blender/blenkernel - ../../../source/blender/io/alembic - ../../../source/blender/io/common - ../../../source/blender/io/usd/intern - ../../../source/blender/makesdna - ../../../source/blender/depsgraph - ${ALEMBIC_INCLUDE_DIRS} - ${BOOST_INCLUDE_DIR} - ${HDF5_INCLUDE_DIRS} - ${OPENEXR_INCLUDE_DIRS} -) - -set(LIB - bf_blenloader # Should not be needed but gives linking error without it. - bf_intern_opencolorio # Should not be needed but gives windows linker errors if the ocio libs are linked before this - bf_gpu # Should not be needed but gives windows linker errors if the ocio libs are linked before this - bf_alembic - - ${OPENEXR_LIBRARIES} - ${BOOST_LIBRARIES} -) - -include_directories(${INC}) - -setup_libdirs() -get_property(BLENDER_SORTED_LIBS GLOBAL PROPERTY BLENDER_SORTED_LIBS_PROP) - -if(WITH_BUILDINFO) - set(_buildinfo_src "$<TARGET_OBJECTS:buildinfoobj>") -else() - set(_buildinfo_src "") -endif() - -# For motivation on doubling BLENDER_SORTED_LIBS, see ../bmesh/CMakeLists.txt -BLENDER_SRC_GTEST(alembic "abc_matrix_test.cc;abc_export_test.cc;${_buildinfo_src}" "${LIB}") - -unset(_buildinfo_src) - -setup_liblinks(alembic_test) diff --git a/tests/gtests/blenlib/CMakeLists.txt b/tests/gtests/blenlib/CMakeLists.txt deleted file mode 100644 index bb0a5b63f71..00000000000 --- a/tests/gtests/blenlib/CMakeLists.txt +++ /dev/null @@ -1,72 +0,0 @@ -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# The Original Code is Copyright (C) 2014, Blender Foundation -# All rights reserved. -# ***** END GPL LICENSE BLOCK ***** - -set(INC - . - .. - ../../../source/blender/blenlib - ../../../source/blender/makesdna - ../../../intern/guardedalloc - ../../../intern/atomic -) - -setup_libdirs() -include_directories(${INC}) - -set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS}") -set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} ${PLATFORM_LINKFLAGS_DEBUG}") - -if(WIN32) - set(BLI_path_util_extra_libs "bf_blenlib;bf_intern_utfconv;extern_wcwidth;${ZLIB_LIBRARIES}") -else() - set(BLI_path_util_extra_libs "bf_blenlib;extern_wcwidth;${ZLIB_LIBRARIES}") -endif() - -BLENDER_TEST(BLI_array_store "bf_blenlib") -BLENDER_TEST(BLI_array_utils "bf_blenlib") -BLENDER_TEST(BLI_delaunay_2d "bf_blenlib") -BLENDER_TEST(BLI_expr_pylike_eval "bf_blenlib") -BLENDER_TEST(BLI_ghash "bf_blenlib") -BLENDER_TEST(BLI_hash_mm2a "bf_blenlib") -BLENDER_TEST(BLI_heap "bf_blenlib") -BLENDER_TEST(BLI_heap_simple "bf_blenlib") -BLENDER_TEST(BLI_kdopbvh "bf_blenlib;bf_intern_numaapi") -BLENDER_TEST(BLI_linklist_lockfree "bf_blenlib;bf_intern_numaapi") -BLENDER_TEST(BLI_listbase "bf_blenlib") -BLENDER_TEST(BLI_math_base "bf_blenlib") -BLENDER_TEST(BLI_math_bits "bf_blenlib") -BLENDER_TEST(BLI_math_color "bf_blenlib") -BLENDER_TEST(BLI_math_geom "bf_blenlib") -BLENDER_TEST(BLI_math_matrix "bf_blenlib") -BLENDER_TEST(BLI_math_vector "bf_blenlib") -BLENDER_TEST(BLI_memiter "bf_blenlib") -BLENDER_TEST(BLI_path_util "${BLI_path_util_extra_libs}") -BLENDER_TEST(BLI_polyfill_2d "bf_blenlib") -BLENDER_TEST(BLI_session_uuid "bf_blenlib") -BLENDER_TEST(BLI_stack "bf_blenlib") -BLENDER_TEST(BLI_string "bf_blenlib") -BLENDER_TEST(BLI_string_utf8 "bf_blenlib") -BLENDER_TEST(BLI_task "bf_blenlib;bf_intern_numaapi") -BLENDER_TEST(BLI_task_graph "bf_blenlib;bf_intern_numaapi") - -BLENDER_TEST_PERFORMANCE(BLI_ghash_performance "bf_blenlib") -BLENDER_TEST_PERFORMANCE(BLI_task_performance "bf_blenlib") - -unset(BLI_path_util_extra_libs) diff --git a/tests/gtests/blenlib/stubs/bf_intern_eigen_stubs.h b/tests/gtests/blenlib/stubs/bf_intern_eigen_stubs.h deleted file mode 100644 index dec2631fc63..00000000000 --- a/tests/gtests/blenlib/stubs/bf_intern_eigen_stubs.h +++ /dev/null @@ -1,27 +0,0 @@ -/* Apache License, Version 2.0 */ - -extern "C" { - -void EIG_svd_square_matrix( - const int size, const float *matrix, float *r_U, float *r_S, float *r_V); -bool EIG_self_adjoint_eigen_solve(const int size, - const float *matrix, - float *r_eigen_values, - float *r_eigen_vectors); - -bool EIG_self_adjoint_eigen_solve(const int size, - const float *matrix, - float *r_eigen_values, - float *r_eigen_vectors) -{ - BLI_assert(0); - UNUSED_VARS(size, matrix, r_eigen_values, r_eigen_vectors); - return false; -} - -void EIG_svd_square_matrix(const int size, const float *matrix, float *r_U, float *r_S, float *r_V) -{ - BLI_assert(0); - UNUSED_VARS(size, matrix, r_U, r_S, r_V); -} -} diff --git a/tests/gtests/blenloader/CMakeLists.txt b/tests/gtests/blenloader/CMakeLists.txt deleted file mode 100644 index 5c071c614c6..00000000000 --- a/tests/gtests/blenloader/CMakeLists.txt +++ /dev/null @@ -1,92 +0,0 @@ -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# The Original Code is Copyright (C) 2019 by Blender Foundation. -# ***** END GPL LICENSE BLOCK ***** - -set(INC - . - .. - ../../../source/blender/blenkernel - ../../../source/blender/blenlib - ../../../source/blender/blenloader - ../../../source/blender/depsgraph - ../../../source/blender/imbuf - ../../../source/blender/makesdna - ../../../source/blender/makesrna - ../../../source/blender/windowmanager - ../../../intern/guardedalloc - ${GLOG_INCLUDE_DIRS} - ${GFLAGS_INCLUDE_DIRS} - ../../../extern/gtest/include -) - -set(SRC - blendfile_loading_base_test.cc - blendfile_loading_base_test.h -) - -set(LIB -) - -blender_add_lib(bf_blenloader_test "${SRC}" "${INC}" "${INC_SYS}" "${LIB}") - - -set(INC - . - .. - ../../../source/blender/blenlib - ../../../source/blender/blenloader - ../../../source/blender/blenkernel - ../../../source/blender/makesdna - ../../../source/blender/makesrna - ../../../source/blender/depsgraph - ../../../intern/guardedalloc -) - -set(LIB - bf_blenloader_test - bf_blenloader - - # Should not be needed but gives windows linker errors if the ocio libs are linked before this: - bf_intern_opencolorio - bf_gpu -) - -include_directories(${INC}) - -setup_libdirs() -get_property(BLENDER_SORTED_LIBS GLOBAL PROPERTY BLENDER_SORTED_LIBS_PROP) - - -set(SRC - blendfile_load_test.cc -) -if(WITH_BUILDINFO) - list(APPEND SRC - "$<TARGET_OBJECTS:buildinfoobj>" - ) -endif() - -BLENDER_SRC_GTEST_EX( - NAME blenloader - SRC "${SRC}" - EXTRA_LIBS "${LIB}" - COMMAND_ARGS --test-assets-dir "${CMAKE_SOURCE_DIR}/../lib/tests") - -unset(_buildinfo_src) - -setup_liblinks(blenloader_test) diff --git a/tests/gtests/bmesh/CMakeLists.txt b/tests/gtests/bmesh/CMakeLists.txt deleted file mode 100644 index f9e1c97c405..00000000000 --- a/tests/gtests/bmesh/CMakeLists.txt +++ /dev/null @@ -1,49 +0,0 @@ -# ***** BEGIN GPL LICENSE BLOCK ***** -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software Foundation, -# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# The Original Code is Copyright (C) 2014, Blender Foundation -# All rights reserved. -# ***** END GPL LICENSE BLOCK ***** - -set(INC - . - .. - ../../../source/blender/blenlib - ../../../source/blender/makesdna - ../../../source/blender/bmesh - ../../../intern/guardedalloc -) - -set(LIB - bf_blenloader # Should not be needed but gives linking error without it. - bf_intern_opencolorio # Should not be needed but gives windows linker errors if the ocio libs are linked before this - bf_gpu # Should not be needed but gives windows linker errors if the ocio libs are linked before this - bf_bmesh -) - -include_directories(${INC}) - -setup_libdirs() - -if(WITH_BUILDINFO) - set(_buildinfo_src "$<TARGET_OBJECTS:buildinfoobj>") -else() - set(_buildinfo_src "") -endif() -BLENDER_SRC_GTEST(bmesh_core "bmesh_core_test.cc;${_buildinfo_src}" "${LIB}") -unset(_buildinfo_src) - -setup_liblinks(bmesh_core_test) |