Skip to content

Library unit tests #291

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

Merged
merged 12 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 4 additions & 0 deletions library/cpp/getopt/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
if (YDB_SDK_TESTS)
add_subdirectory(ut)
endif()

_ydb_sdk_add_library(getopt-small)
target_link_libraries(getopt-small
PUBLIC
Expand Down
69 changes: 69 additions & 0 deletions library/cpp/getopt/ut/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
add_ydb_test(NAME getopt-last_getopt_ut
SOURCES
last_getopt_ut.cpp
LINK_LIBRARIES
getopt
cpp-testing-unittest_main
LABELS
unit
)

add_ydb_test(NAME getopt-modchooser_ut
SOURCES
modchooser_ut.cpp
LINK_LIBRARIES
getopt
cpp-testing-unittest_main
LABELS
unit
)

add_ydb_test(NAME getopt-opt2_ut
SOURCES
opt2_ut.cpp
LINK_LIBRARIES
getopt
cpp-testing-unittest_main
LABELS
unit
)

add_ydb_test(NAME getopt-opt_ut
SOURCES
opt_ut.cpp
LINK_LIBRARIES
getopt
cpp-testing-unittest_main
LABELS
unit
)

add_ydb_test(NAME getopt-posix_getopt_ut
SOURCES
posix_getopt_ut.cpp
LINK_LIBRARIES
getopt
cpp-testing-unittest_main
LABELS
unit
)

add_ydb_test(NAME getopt-wrap_ut
SOURCES
wrap.cpp
LINK_LIBRARIES
getopt-small
cpp-testing-unittest_main
LABELS
unit
)

add_ydb_test(NAME getopt-ygetopt_ut
SOURCES
ygetopt_ut.cpp
LINK_LIBRARIES
getopt
cpp-testing-unittest_main
LABELS
unit
)
22 changes: 22 additions & 0 deletions library/cpp/http/fetch/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
if (YDB_SDK_TESTS)
add_ydb_test(NAME http-fetch-httpfsm_ut
SOURCES
httpfsm_ut.cpp
LINK_LIBRARIES
http-fetch
cpp-testing-unittest_main
LABELS
unit
)

add_ydb_test(NAME http-fetch-httpparser_ut
SOURCES
httpparser_ut.cpp
LINK_LIBRARIES
http-fetch
cpp-testing-unittest_main
LABELS
unit
)
endif(YDB_SDK_TESTS)

_ydb_sdk_add_library(http-fetch)

target_link_libraries(http-fetch
Expand Down
54 changes: 54 additions & 0 deletions library/cpp/http/io/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,57 @@
if (YDB_SDK_TESTS)
add_ydb_test(NAME http-io-chunk_ut
SOURCES
chunk_ut.cpp
LINK_LIBRARIES
http-io
cpp-testing-unittest_main
LABELS
unit
)

add_ydb_test(NAME http-io-compression_ut
SOURCES
compression_ut.cpp
LINK_LIBRARIES
http-io
cpp-testing-unittest_main
LABELS
unit
)

add_ydb_test(NAME http-io-headers_ut
SOURCES
headers_ut.cpp
LINK_LIBRARIES
http-io
cpp-testing-unittest_main
LABELS
unit
)

add_ydb_test(NAME http-io-stream_ut
SOURCES
stream_ut.cpp
LINK_LIBRARIES
yutil
http-io
http-server
cpp-testing-unittest_main
LABELS
unit
)

add_ydb_test(NAME http-io-stream_ut_medium
SOURCES
stream_ut_medium.cpp
LINK_LIBRARIES
http-io
cpp-testing-unittest_main
LABELS
unit
)
endif(YDB_SDK_TESTS)

_ydb_sdk_add_library(http-io)

target_link_libraries(http-io
Expand Down
32 changes: 32 additions & 0 deletions library/cpp/http/misc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
if (YDB_SDK_TESTS)
add_ydb_test(NAME http-misc-httpdate_ut
SOURCES
httpdate_ut.cpp
LINK_LIBRARIES
http-misc
cpp-testing-unittest_main
LABELS
unit
)

add_ydb_test(NAME http-misc-httpreqdata_ut
SOURCES
httpreqdata_ut.cpp
LINK_LIBRARIES
http-misc
cpp-testing-unittest_main
LABELS
unit
)

add_ydb_test(NAME http-misc-parsed_request_ut
SOURCES
parsed_request_ut.cpp
LINK_LIBRARIES
http-misc
cpp-testing-unittest_main
LABELS
unit
)
endif(YDB_SDK_TESTS)

_ydb_sdk_add_library(http-misc)

target_link_libraries(http-misc
Expand Down
12 changes: 12 additions & 0 deletions library/cpp/lcs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
if (YDB_SDK_TESTS)
add_ydb_test(NAME lcs-lcs_via_lis_ut
SOURCES
lcs_via_lis_ut.cpp
LINK_LIBRARIES
lcs
cpp-testing-unittest_main
LABELS
unit
)
endif()

_ydb_sdk_add_library(lcs)

target_link_libraries(lcs
Expand Down
12 changes: 12 additions & 0 deletions library/cpp/streams/brotli/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
if (YDB_SDK_TESTS)
add_ydb_test(NAME streams-brotli-ut
SOURCES
brotli_ut.cpp
LINK_LIBRARIES
streams-brotli
cpp-testing-unittest_main
LABELS
unit
)
endif()

_ydb_sdk_add_library(streams-brotli)

target_link_libraries(streams-brotli
Expand Down
12 changes: 12 additions & 0 deletions library/cpp/streams/bzip2/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
if (YDB_SDK_TESTS)
add_ydb_test(NAME streams-bzip2-ut
SOURCES
bzip2_ut.cpp
LINK_LIBRARIES
streams-bzip2
cpp-testing-unittest_main
LABELS
unit
)
endif()

_ydb_sdk_add_library(streams-bzip2)

target_link_libraries(streams-bzip2
Expand Down
12 changes: 12 additions & 0 deletions library/cpp/streams/zstd/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
if (YDB_SDK_TESTS)
add_ydb_test(NAME streams-zstd-ut
SOURCES
zstd_ut.cpp
LINK_LIBRARIES
streams-zstd
cpp-testing-unittest_main
LABELS
unit
)
endif()

_ydb_sdk_add_library(streams-zstd)
target_link_libraries(streams-zstd
PUBLIC
Expand Down
14 changes: 13 additions & 1 deletion library/cpp/string_utils/quote/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
if (YDB_SDK_TESTS)
add_ydb_test(NAME string_utils-quote-ut
SOURCES
quote_ut.cpp
LINK_LIBRARIES
string_utils-quote
cpp-testing-unittest_main
LABELS
unit
)
endif()

_ydb_sdk_add_library(string_utils-quote)

target_link_libraries(string_utils-quote
target_link_libraries(string_utils-quote
PUBLIC
yutil
)
Expand Down
12 changes: 12 additions & 0 deletions library/cpp/string_utils/relaxed_escaper/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
if (YDB_SDK_TESTS)
add_ydb_test(NAME string_utils-relaxed_escaper-ut
SOURCES
relaxed_escaper_ut.cpp
LINK_LIBRARIES
string_utils-relaxed_escaper
cpp-testing-unittest_main
LABELS
unit
)
endif()

_ydb_sdk_add_library(string_utils-relaxed_escaper)

target_link_libraries(string_utils-relaxed_escaper
Expand Down
12 changes: 12 additions & 0 deletions library/cpp/string_utils/url/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
if (YDB_SDK_TESTS)
add_ydb_test(NAME string_utils-url-ut
SOURCES
url_ut.cpp
LINK_LIBRARIES
string_utils-url
cpp-testing-unittest_main
LABELS
unit
)
endif()

_ydb_sdk_add_library(string_utils-url)

target_link_libraries(string_utils-url
Expand Down
12 changes: 12 additions & 0 deletions library/cpp/threading/chunk_queue/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
if (YDB_SDK_TESTS)
add_ydb_test(NAME threading-chunk_queue-ut
SOURCES
queue_ut.cpp
LINK_LIBRARIES
threading-chunk_queue
cpp-testing-unittest_main
LABELS
unit
)
endif()

_ydb_sdk_add_library(threading-chunk_queue)

target_link_libraries(threading-chunk_queue PUBLIC
Expand Down
4 changes: 4 additions & 0 deletions library/cpp/threading/light_rw_lock/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
if (YDB_SDK_TESTS)
add_subdirectory(ut)
endif()

_ydb_sdk_add_library(threading-light_rw_lock)

target_link_libraries(threading-light_rw_lock PUBLIC
Expand Down
9 changes: 9 additions & 0 deletions library/cpp/threading/light_rw_lock/ut/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
add_ydb_test(NAME threading-light_rw_lock-ut
SOURCES
rwlock_ut.cpp
LINK_LIBRARIES
threading-light_rw_lock
cpp-testing-unittest_main
LABELS
unit
)
4 changes: 4 additions & 0 deletions library/cpp/unicode/normalization/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
if (YDB_SDK_TESTS)
add_subdirectory(ut)
endif()

_ydb_sdk_add_library(unicode-normalization)

target_link_libraries(unicode-normalization PUBLIC
Expand Down
9 changes: 9 additions & 0 deletions library/cpp/unicode/normalization/ut/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
add_ydb_test(NAME unicode-normalization-ut
SOURCES
normalization_ut.cpp
LINK_LIBRARIES
unicode-normalization
cpp-testing-unittest_main
LABELS
unit
)
Loading