Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLASH-406] CI run gtest cases #163

Merged
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions dbms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ if (ENABLE_TESTS)

# attach all dbms gtest sources
grep_gtest_sources(${ClickHouse_SOURCE_DIR}/dbms dbms_gtest_sources)
add_executable(unit_tests_dbms ${dbms_gtest_sources})
target_link_libraries(unit_tests_dbms gtest_main dbms)
add_executable(unit_tests_dbms EXCLUDE_FROM_ALL ${dbms_gtest_sources})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should name it gtests_dbms? The same as other unit_tests_*.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These name is defined in Clickhouse, and I just use them...
Agree that gtest_* is more easy to understand, changes done.

target_link_libraries(unit_tests_dbms gtest_main dbms clickhouse_functions)
target_compile_options(unit_tests_dbms PRIVATE -Wno-unknown-pragmas)
add_check(unit_tests_dbms)
endif ()
16 changes: 8 additions & 8 deletions dbms/src/Analyzers/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
add_executable(collect_aliases collect_aliases.cpp)
add_executable(collect_aliases EXCLUDE_FROM_ALL collect_aliases.cpp)
target_link_libraries(collect_aliases dbms)

add_executable(collect_tables collect_tables.cpp)
add_executable(collect_tables EXCLUDE_FROM_ALL collect_tables.cpp)
target_link_libraries(collect_tables dbms clickhouse_storages_system)

add_executable(analyze_columns analyze_columns.cpp)
add_executable(analyze_columns EXCLUDE_FROM_ALL analyze_columns.cpp)
target_link_libraries(analyze_columns dbms clickhouse_storages_system)

add_executable(type_and_constant_inference type_and_constant_inference.cpp)
add_executable(type_and_constant_inference EXCLUDE_FROM_ALL type_and_constant_inference.cpp)
target_link_libraries(type_and_constant_inference
clickhouse_storages_system clickhouse_functions clickhouse_aggregate_functions clickhouse_table_functions)

add_executable(analyze_result_of_query analyze_result_of_query.cpp)
add_executable(analyze_result_of_query EXCLUDE_FROM_ALL analyze_result_of_query.cpp)
target_link_libraries(analyze_result_of_query dbms clickhouse_storages_system)

add_executable(translate_positional_arguments translate_positional_arguments.cpp)
add_executable(translate_positional_arguments EXCLUDE_FROM_ALL translate_positional_arguments.cpp)
target_link_libraries(translate_positional_arguments dbms)

add_executable(optimize_group_order_limit_by optimize_group_order_limit_by.cpp)
add_executable(optimize_group_order_limit_by EXCLUDE_FROM_ALL optimize_group_order_limit_by.cpp)
target_link_libraries(optimize_group_order_limit_by dbms clickhouse_storages_system)

add_executable(analyze_lambdas analyze_lambdas.cpp)
add_executable(analyze_lambdas EXCLUDE_FROM_ALL analyze_lambdas.cpp)
target_link_libraries(analyze_lambdas dbms)
16 changes: 8 additions & 8 deletions dbms/src/Common/ZooKeeper/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
add_executable(zkutil_test_commands zkutil_test_commands.cpp)
add_executable(zkutil_test_commands EXCLUDE_FROM_ALL zkutil_test_commands.cpp)
target_link_libraries(zkutil_test_commands clickhouse_common_zookeeper)

add_executable(zkutil_test_commands_new_lib zkutil_test_commands_new_lib.cpp)
add_executable(zkutil_test_commands_new_lib EXCLUDE_FROM_ALL zkutil_test_commands_new_lib.cpp)
target_link_libraries(zkutil_test_commands_new_lib clickhouse_common_zookeeper)

add_executable(zkutil_test_lock zkutil_test_lock.cpp)
add_executable(zkutil_test_lock EXCLUDE_FROM_ALL zkutil_test_lock.cpp)
target_link_libraries(zkutil_test_lock clickhouse_common_zookeeper)

add_executable(zkutil_expiration_test zkutil_expiration_test.cpp)
add_executable(zkutil_expiration_test EXCLUDE_FROM_ALL zkutil_expiration_test.cpp)
target_link_libraries(zkutil_expiration_test clickhouse_common_zookeeper)

add_executable(zkutil_test_async zkutil_test_async.cpp)
add_executable(zkutil_test_async EXCLUDE_FROM_ALL zkutil_test_async.cpp)
target_link_libraries(zkutil_test_async clickhouse_common_zookeeper)

add_executable(zkutil_zookeeper_holder zkutil_zookeeper_holder.cpp)
add_executable(zkutil_zookeeper_holder EXCLUDE_FROM_ALL zkutil_zookeeper_holder.cpp)
target_link_libraries(zkutil_zookeeper_holder clickhouse_common_zookeeper)

add_executable (zk_many_watches_reconnect zk_many_watches_reconnect.cpp)
add_executable (zk_many_watches_reconnect EXCLUDE_FROM_ALL zk_many_watches_reconnect.cpp)
target_link_libraries (zk_many_watches_reconnect clickhouse_common_zookeeper clickhouse_common_config)

add_executable (zookeeper_impl zookeeper_impl.cpp)
add_executable (zookeeper_impl EXCLUDE_FROM_ALL zookeeper_impl.cpp)
target_link_libraries (zookeeper_impl clickhouse_common_zookeeper)
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@

using namespace DB;

TEST(zkutil, zookeeper_connected)
/// Disable zookeeper tests since tiflash don't use zookeeper

TEST(zkutil, DISABLED_zookeeper_connected)
{
auto zookeeper = std::make_unique<zkutil::ZooKeeper>("localhost:2181");
try
Expand All @@ -29,7 +31,7 @@ TEST(zkutil, zookeeper_connected)
}
}

TEST(zkutil, multi_nice_exception_msg)
TEST(zkutil, DISABLED_multi_nice_exception_msg)
{
auto zookeeper = std::make_unique<zkutil::ZooKeeper>("localhost:2181");

Expand Down Expand Up @@ -67,7 +69,7 @@ TEST(zkutil, multi_nice_exception_msg)
}


TEST(zkutil, multi_async)
TEST(zkutil, DISABLED_multi_async)
{
auto zookeeper = std::make_unique<zkutil::ZooKeeper>("localhost:2181");
zkutil::Requests ops;
Expand Down Expand Up @@ -129,7 +131,7 @@ TEST(zkutil, multi_async)
}
}

TEST(zkutil, watch_get_children_with_chroot)
TEST(zkutil, DISABLED_watch_get_children_with_chroot)
{
try
{
Expand Down Expand Up @@ -160,7 +162,7 @@ TEST(zkutil, watch_get_children_with_chroot)
}
}

TEST(zkutil, multi_create_sequential)
TEST(zkutil, DISABLED_multi_create_sequential)
{
try
{
Expand Down
50 changes: 25 additions & 25 deletions dbms/src/Common/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,76 +1,76 @@
add_executable (hashes_test hashes_test.cpp)
add_executable (hashes_test EXCLUDE_FROM_ALL hashes_test.cpp)
target_link_libraries (hashes_test dbms)

add_executable (sip_hash sip_hash.cpp)
add_executable (sip_hash EXCLUDE_FROM_ALL sip_hash.cpp)
target_link_libraries (sip_hash clickhouse_common_io)

add_executable (sip_hash_perf sip_hash_perf.cpp)
add_executable (sip_hash_perf EXCLUDE_FROM_ALL sip_hash_perf.cpp)
target_link_libraries (sip_hash_perf clickhouse_common_io)

add_executable (auto_array auto_array.cpp)
add_executable (auto_array EXCLUDE_FROM_ALL auto_array.cpp)
target_link_libraries (auto_array clickhouse_common_io)

add_executable (lru_cache lru_cache.cpp)
add_executable (lru_cache EXCLUDE_FROM_ALL lru_cache.cpp)
target_link_libraries (lru_cache clickhouse_common_io)

add_executable (hash_table hash_table.cpp)
add_executable (hash_table EXCLUDE_FROM_ALL hash_table.cpp)
target_link_libraries (hash_table clickhouse_common_io)

add_executable (small_table small_table.cpp)
add_executable (small_table EXCLUDE_FROM_ALL small_table.cpp)
target_link_libraries (small_table clickhouse_common_io)

add_executable (parallel_aggregation parallel_aggregation.cpp)
add_executable (parallel_aggregation EXCLUDE_FROM_ALL parallel_aggregation.cpp)
target_link_libraries (parallel_aggregation clickhouse_common_io)

add_executable (parallel_aggregation2 parallel_aggregation2.cpp)
add_executable (parallel_aggregation2 EXCLUDE_FROM_ALL parallel_aggregation2.cpp)
target_link_libraries (parallel_aggregation2 clickhouse_common_io)

add_executable (int_hashes_perf int_hashes_perf.cpp AvalancheTest.cpp Random.cpp)
add_executable (int_hashes_perf EXCLUDE_FROM_ALL int_hashes_perf.cpp AvalancheTest.cpp Random.cpp)
target_link_libraries (int_hashes_perf clickhouse_common_io)

add_executable (simple_cache simple_cache.cpp)
add_executable (simple_cache EXCLUDE_FROM_ALL simple_cache.cpp)
target_include_directories (simple_cache PRIVATE ${DBMS_INCLUDE_DIR})
target_link_libraries (simple_cache common)

add_executable (compact_array compact_array.cpp)
add_executable (compact_array EXCLUDE_FROM_ALL compact_array.cpp)
target_link_libraries (compact_array clickhouse_common_io ${Boost_FILESYSTEM_LIBRARY})

add_executable (radix_sort radix_sort.cpp)
add_executable (radix_sort EXCLUDE_FROM_ALL radix_sort.cpp)
target_link_libraries (radix_sort clickhouse_common_io)

add_executable (shell_command_test shell_command_test.cpp)
add_executable (shell_command_test EXCLUDE_FROM_ALL shell_command_test.cpp)
target_link_libraries (shell_command_test clickhouse_common_io)

add_executable (arena_with_free_lists arena_with_free_lists.cpp)
add_executable (arena_with_free_lists EXCLUDE_FROM_ALL arena_with_free_lists.cpp)
target_link_libraries (arena_with_free_lists clickhouse_common_io)

add_executable (pod_array pod_array.cpp)
add_executable (pod_array EXCLUDE_FROM_ALL pod_array.cpp)
target_link_libraries (pod_array clickhouse_common_io)

add_executable (thread_creation_latency thread_creation_latency.cpp)
add_executable (thread_creation_latency EXCLUDE_FROM_ALL thread_creation_latency.cpp)
target_link_libraries (thread_creation_latency clickhouse_common_io)

add_executable (thread_pool thread_pool.cpp)
add_executable (thread_pool EXCLUDE_FROM_ALL thread_pool.cpp)
target_link_libraries (thread_pool clickhouse_common_io)

add_executable (array_cache array_cache.cpp)
add_executable (array_cache EXCLUDE_FROM_ALL array_cache.cpp)
target_link_libraries (array_cache clickhouse_common_io)

add_executable (space_saving space_saving.cpp)
add_executable (space_saving EXCLUDE_FROM_ALL space_saving.cpp)
target_link_libraries (space_saving clickhouse_common_io)

add_executable (integer_hash_tables_and_hashes integer_hash_tables_and_hashes.cpp)
add_executable (integer_hash_tables_and_hashes EXCLUDE_FROM_ALL integer_hash_tables_and_hashes.cpp)
target_include_directories (integer_hash_tables_and_hashes BEFORE PRIVATE ${SPARCEHASH_INCLUDE_DIR})
target_link_libraries (integer_hash_tables_and_hashes clickhouse_common_io)

add_executable (allocator allocator.cpp)
add_executable (allocator EXCLUDE_FROM_ALL allocator.cpp)
target_link_libraries (allocator clickhouse_common_io)

add_executable (cow_columns cow_columns.cpp)
add_executable (cow_columns EXCLUDE_FROM_ALL cow_columns.cpp)
target_link_libraries (cow_columns clickhouse_common_io)

add_executable (stopwatch stopwatch.cpp)
add_executable (stopwatch EXCLUDE_FROM_ALL stopwatch.cpp)
target_link_libraries (stopwatch clickhouse_common_io)

add_executable (persisted_container persisted_container.cpp)
add_executable (persisted_container EXCLUDE_FROM_ALL persisted_container.cpp)
target_link_libraries (persisted_container clickhouse_common_io)
12 changes: 6 additions & 6 deletions dbms/src/Core/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
add_executable (exception exception.cpp)
add_executable (exception EXCLUDE_FROM_ALL exception.cpp)
target_link_libraries (exception clickhouse_common_io)

add_executable (string_pool string_pool.cpp)
add_executable (string_pool EXCLUDE_FROM_ALL string_pool.cpp)
target_link_libraries (string_pool clickhouse_common_io)
target_include_directories (string_pool BEFORE PRIVATE ${SPARCEHASH_INCLUDE_DIR})

add_executable (field field.cpp)
add_executable (field EXCLUDE_FROM_ALL field.cpp)
target_link_libraries (field dbms)

add_executable (move_field move_field.cpp)
add_executable (move_field EXCLUDE_FROM_ALL move_field.cpp)
target_link_libraries (move_field clickhouse_common_io)

add_executable (rvo_test rvo_test.cpp)
add_executable (rvo_test EXCLUDE_FROM_ALL rvo_test.cpp)
target_link_libraries (rvo_test Threads::Threads)

add_executable (string_ref_hash string_ref_hash.cpp)
add_executable (string_ref_hash EXCLUDE_FROM_ALL string_ref_hash.cpp)
target_link_libraries (string_ref_hash clickhouse_common_io)
36 changes: 18 additions & 18 deletions dbms/src/DataStreams/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,29 @@ include_directories (${CMAKE_CURRENT_BINARY_DIR})

set(SRCS )

add_executable (tab_separated_streams tab_separated_streams.cpp ${SRCS})
target_link_libraries (tab_separated_streams dbms)
add_executable (tab_separated_streams EXCLUDE_FROM_ALL tab_separated_streams.cpp ${SRCS})
target_link_libraries (tab_separated_streams dbms clickhouse_functions)

add_executable (block_row_transforms block_row_transforms.cpp ${SRCS})
target_link_libraries (block_row_transforms dbms)
add_executable (block_row_transforms EXCLUDE_FROM_ALL block_row_transforms.cpp ${SRCS})
target_link_libraries (block_row_transforms dbms clickhouse_functions)

add_executable (expression_stream expression_stream.cpp ${SRCS})
target_link_libraries (expression_stream dbms clickhouse_storages_system)
add_executable (expression_stream EXCLUDE_FROM_ALL expression_stream.cpp ${SRCS})
target_link_libraries (expression_stream dbms clickhouse_storages_system clickhouse_functions)

add_executable (native_streams native_streams.cpp ${SRCS})
target_link_libraries (native_streams dbms)
add_executable (native_streams EXCLUDE_FROM_ALL native_streams.cpp ${SRCS})
target_link_libraries (native_streams dbms clickhouse_functions)

add_executable (filter_stream filter_stream.cpp ${SRCS})
target_link_libraries (filter_stream dbms clickhouse_storages_system)
add_executable (filter_stream EXCLUDE_FROM_ALL filter_stream.cpp ${SRCS})
target_link_libraries (filter_stream dbms clickhouse_storages_system clickhouse_functions)

add_executable (filter_stream_hitlog filter_stream_hitlog.cpp ${SRCS})
target_link_libraries (filter_stream_hitlog dbms)
add_executable (filter_stream_hitlog EXCLUDE_FROM_ALL filter_stream_hitlog.cpp ${SRCS})
target_link_libraries (filter_stream_hitlog dbms clickhouse_functions)

add_executable (sorting_stream sorting_stream.cpp ${SRCS})
target_link_libraries (sorting_stream dbms)
add_executable (sorting_stream EXCLUDE_FROM_ALL sorting_stream.cpp ${SRCS})
target_link_libraries (sorting_stream dbms clickhouse_functions)

add_executable (union_stream2 union_stream2.cpp ${SRCS})
target_link_libraries (union_stream2 dbms)
add_executable (union_stream2 EXCLUDE_FROM_ALL union_stream2.cpp ${SRCS})
target_link_libraries (union_stream2 dbms clickhouse_functions)

add_executable (collapsing_sorted_stream collapsing_sorted_stream.cpp ${SRCS})
target_link_libraries (collapsing_sorted_stream dbms)
add_executable (collapsing_sorted_stream EXCLUDE_FROM_ALL collapsing_sorted_stream.cpp ${SRCS})
target_link_libraries (collapsing_sorted_stream dbms clickhouse_functions)
6 changes: 3 additions & 3 deletions dbms/src/DataTypes/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ include_directories (${CMAKE_CURRENT_BINARY_DIR})

set(SRCS )

add_executable (data_types_number_fixed data_types_number_fixed.cpp ${SRCS})
add_executable (data_types_number_fixed EXCLUDE_FROM_ALL data_types_number_fixed.cpp ${SRCS})
target_link_libraries (data_types_number_fixed dbms)

add_executable (data_type_string data_type_string.cpp ${SRCS})
add_executable (data_type_string EXCLUDE_FROM_ALL data_type_string.cpp ${SRCS})
target_link_libraries (data_type_string dbms)

add_executable (data_type_get_common_type data_type_get_common_type.cpp ${SRCS})
add_executable (data_type_get_common_type EXCLUDE_FROM_ALL data_type_get_common_type.cpp ${SRCS})
target_link_libraries (data_type_get_common_type dbms gtest_main)
6 changes: 3 additions & 3 deletions dbms/src/Functions/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
include_directories (${CMAKE_CURRENT_BINARY_DIR})

add_executable (number_traits number_traits.cpp)
add_executable (number_traits EXCLUDE_FROM_ALL number_traits.cpp)
target_link_libraries (number_traits dbms)

add_executable (strings_trim strings_trim.cpp)
add_executable (strings_trim EXCLUDE_FROM_ALL strings_trim.cpp)
target_link_libraries (strings_trim dbms gtest_main clickhouse_functions)

add_executable (strings_pad strings_pad.cpp)
add_executable (strings_pad EXCLUDE_FROM_ALL strings_pad.cpp)
target_link_libraries (strings_pad dbms gtest_main clickhouse_functions)
Loading