Skip to content

Commit 86ba843

Browse files
author
shuxu.li
committed
refactor: Simplify test setup using a common CMake function
1 parent afa050f commit 86ba843

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

test/CMakeLists.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ function(add_iceberg_test test_name)
4343

4444
target_sources(${test_name} PRIVATE ${ARG_SOURCES})
4545

46+
if(ARG_USE_BUNDLE)
47+
target_link_libraries(${test_name} PRIVATE iceberg_bundle_static GTest::gtest_main
48+
GTest::gmock)
49+
else()
50+
target_link_libraries(${test_name} PRIVATE iceberg_static GTest::gtest_main
51+
GTest::gmock)
52+
endif()
53+
4654
add_test(NAME ${test_name} COMMAND ${test_name})
4755
endfunction()
4856

@@ -80,7 +88,8 @@ add_iceberg_test(util_test
8088
SOURCES
8189
formatter_test.cc
8290
config_test.cc
83-
visit_type_test.cc)
91+
visit_type_test.cc
92+
string_utils_test.cc)
8493

8594
if(ICEBERG_BUILD_BUNDLE)
8695
add_iceberg_test(avro_test
@@ -91,6 +100,7 @@ if(ICEBERG_BUILD_BUNDLE)
91100
avro_schema_test.cc
92101
avro_stream_test.cc
93102
manifest_list_reader_test.cc
103+
manifest_reader_test.cc
94104
test_common.cc)
95105

96106
add_iceberg_test(arrow_test

0 commit comments

Comments
 (0)