From 4f9beeb06bb862f7d99a0e5d1ea643526bad6dc1 Mon Sep 17 00:00:00 2001
From: Pavel Tsayukov
Date: Fri, 9 Aug 2024 00:40:58 +0300
Subject: [PATCH 01/12] Add tests for library/cpp/getopts into listfile (#183)
---
library/cpp/getopt/CMakeLists.txt | 4 ++
library/cpp/getopt/ut/CMakeLists.txt | 69 ++++++++++++++++++++++++++++
2 files changed, 73 insertions(+)
create mode 100644 library/cpp/getopt/ut/CMakeLists.txt
diff --git a/library/cpp/getopt/CMakeLists.txt b/library/cpp/getopt/CMakeLists.txt
index ca6a1ad61ff..f64ff40d5cf 100644
--- a/library/cpp/getopt/CMakeLists.txt
+++ b/library/cpp/getopt/CMakeLists.txt
@@ -1,3 +1,7 @@
+if (YDB_SDK_TESTS)
+ add_subdirectory(ut)
+endif()
+
_ydb_sdk_add_library(getopt-small)
target_link_libraries(getopt-small
PUBLIC
diff --git a/library/cpp/getopt/ut/CMakeLists.txt b/library/cpp/getopt/ut/CMakeLists.txt
new file mode 100644
index 00000000000..ee1a898a7ca
--- /dev/null
+++ b/library/cpp/getopt/ut/CMakeLists.txt
@@ -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
+)
From 5b77a2b13137cb1f3360da22646b711e7dfa5dab Mon Sep 17 00:00:00 2001
From: Pavel Tsayukov
Date: Fri, 9 Aug 2024 00:48:48 +0300
Subject: [PATCH 02/12] Add tests for library/cpp/http/fetch into listfile
(#184)
---
library/cpp/http/fetch/CMakeLists.txt | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/library/cpp/http/fetch/CMakeLists.txt b/library/cpp/http/fetch/CMakeLists.txt
index 12fe4e060f6..821b12ed803 100644
--- a/library/cpp/http/fetch/CMakeLists.txt
+++ b/library/cpp/http/fetch/CMakeLists.txt
@@ -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
From d8e884f92f6c6abb5a5046d2ae1b116f2c130672 Mon Sep 17 00:00:00 2001
From: Pavel Tsayukov
Date: Fri, 9 Aug 2024 00:56:37 +0300
Subject: [PATCH 03/12] Add tests for library/cpp/http/io into listfile (#185)
---
library/cpp/http/io/CMakeLists.txt | 54 ++++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)
diff --git a/library/cpp/http/io/CMakeLists.txt b/library/cpp/http/io/CMakeLists.txt
index 65fb7215ef6..f3f3f5afb51 100644
--- a/library/cpp/http/io/CMakeLists.txt
+++ b/library/cpp/http/io/CMakeLists.txt
@@ -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
From faed923754412941dd972ddce91696edbb62faeb Mon Sep 17 00:00:00 2001
From: Pavel Tsayukov
Date: Fri, 9 Aug 2024 01:00:51 +0300
Subject: [PATCH 04/12] Add tests for library/cpp/http/misc into listfile
(#186)
---
library/cpp/http/misc/CMakeLists.txt | 32 ++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/library/cpp/http/misc/CMakeLists.txt b/library/cpp/http/misc/CMakeLists.txt
index 24f85a90fe2..768628b3e9b 100644
--- a/library/cpp/http/misc/CMakeLists.txt
+++ b/library/cpp/http/misc/CMakeLists.txt
@@ -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
From c0afb4b11edf0e3e19f865ede7a2e95f7fcbdcef Mon Sep 17 00:00:00 2001
From: Pavel Tsayukov
Date: Fri, 9 Aug 2024 13:30:23 +0300
Subject: [PATCH 05/12] Add tests for library/cpp/lcs into listfile (#191)
---
library/cpp/lcs/CMakeLists.txt | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/library/cpp/lcs/CMakeLists.txt b/library/cpp/lcs/CMakeLists.txt
index aae1e3664a1..e48e848ebbd 100644
--- a/library/cpp/lcs/CMakeLists.txt
+++ b/library/cpp/lcs/CMakeLists.txt
@@ -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
From eae0a4b1c437d596b1dd91871bf7daa7450a5398 Mon Sep 17 00:00:00 2001
From: Pavel Tsayukov
Date: Sun, 11 Aug 2024 16:12:00 +0300
Subject: [PATCH 06/12] Add tests for library/cpp/streams/brotli into listfile
(#198)
---
library/cpp/streams/brotli/CMakeLists.txt | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/library/cpp/streams/brotli/CMakeLists.txt b/library/cpp/streams/brotli/CMakeLists.txt
index 84bd7bfa1bf..e6dd2a84eac 100644
--- a/library/cpp/streams/brotli/CMakeLists.txt
+++ b/library/cpp/streams/brotli/CMakeLists.txt
@@ -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
From 4ca070d9000a39d1ed511d6951270b355434cc35 Mon Sep 17 00:00:00 2001
From: Pavel Tsayukov
Date: Sun, 11 Aug 2024 16:12:42 +0300
Subject: [PATCH 07/12] Add tests for library/cpp/streams/bzip2 into listfile
(#199)
---
library/cpp/streams/bzip2/CMakeLists.txt | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/library/cpp/streams/bzip2/CMakeLists.txt b/library/cpp/streams/bzip2/CMakeLists.txt
index f90adbcf427..8f2ef9e46a5 100644
--- a/library/cpp/streams/bzip2/CMakeLists.txt
+++ b/library/cpp/streams/bzip2/CMakeLists.txt
@@ -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
From d9dbf9944c9b2feb4119b2a5b3ad919660de2d1d Mon Sep 17 00:00:00 2001
From: Pavel Tsayukov
Date: Sun, 11 Aug 2024 16:13:24 +0300
Subject: [PATCH 08/12] Add tests for library/cpp/streams/zstd into listfile
(#201)
---
library/cpp/streams/zstd/CMakeLists.txt | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/library/cpp/streams/zstd/CMakeLists.txt b/library/cpp/streams/zstd/CMakeLists.txt
index f12e3a31f8d..b18333e3385 100644
--- a/library/cpp/streams/zstd/CMakeLists.txt
+++ b/library/cpp/streams/zstd/CMakeLists.txt
@@ -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
From c72f4a4fe2133709bd557c77dfda2e34d8d18fdf Mon Sep 17 00:00:00 2001
From: Pavel Tsayukov
Date: Sun, 11 Aug 2024 16:19:10 +0300
Subject: [PATCH 09/12] Add tests for library/cpp/string_utils into listfile
(#202)
---
library/cpp/string_utils/quote/CMakeLists.txt | 14 +++++++++++++-
.../string_utils/relaxed_escaper/CMakeLists.txt | 12 ++++++++++++
library/cpp/string_utils/url/CMakeLists.txt | 12 ++++++++++++
3 files changed, 37 insertions(+), 1 deletion(-)
diff --git a/library/cpp/string_utils/quote/CMakeLists.txt b/library/cpp/string_utils/quote/CMakeLists.txt
index 4e761636244..79aafb2e319 100644
--- a/library/cpp/string_utils/quote/CMakeLists.txt
+++ b/library/cpp/string_utils/quote/CMakeLists.txt
@@ -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
)
diff --git a/library/cpp/string_utils/relaxed_escaper/CMakeLists.txt b/library/cpp/string_utils/relaxed_escaper/CMakeLists.txt
index 060f387e3fc..fea2d62aabe 100644
--- a/library/cpp/string_utils/relaxed_escaper/CMakeLists.txt
+++ b/library/cpp/string_utils/relaxed_escaper/CMakeLists.txt
@@ -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
diff --git a/library/cpp/string_utils/url/CMakeLists.txt b/library/cpp/string_utils/url/CMakeLists.txt
index 3e88d6846cc..ab20705d364 100644
--- a/library/cpp/string_utils/url/CMakeLists.txt
+++ b/library/cpp/string_utils/url/CMakeLists.txt
@@ -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
From bf2cf95ff9797365da9721ce4f8d32d4fbe487f3 Mon Sep 17 00:00:00 2001
From: Pavel Tsayukov
Date: Sun, 11 Aug 2024 16:22:25 +0300
Subject: [PATCH 10/12] Add tests for library/cpp/threading/chunk_queue into
listfile (#203)
---
library/cpp/threading/chunk_queue/CMakeLists.txt | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/library/cpp/threading/chunk_queue/CMakeLists.txt b/library/cpp/threading/chunk_queue/CMakeLists.txt
index 8dfb90e9f34..f3a5bb4307a 100644
--- a/library/cpp/threading/chunk_queue/CMakeLists.txt
+++ b/library/cpp/threading/chunk_queue/CMakeLists.txt
@@ -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
From d27ff16cdf3d0a36b99be83bfc44bea648b28dff Mon Sep 17 00:00:00 2001
From: Pavel Tsayukov
Date: Sun, 11 Aug 2024 17:21:08 +0300
Subject: [PATCH 11/12] Add tests for library/cpp/threading/light_rw_lock into
listfile (#206)
---
library/cpp/threading/light_rw_lock/CMakeLists.txt | 4 ++++
library/cpp/threading/light_rw_lock/ut/CMakeLists.txt | 9 +++++++++
2 files changed, 13 insertions(+)
create mode 100644 library/cpp/threading/light_rw_lock/ut/CMakeLists.txt
diff --git a/library/cpp/threading/light_rw_lock/CMakeLists.txt b/library/cpp/threading/light_rw_lock/CMakeLists.txt
index c60a8c0195e..3735a286ad0 100644
--- a/library/cpp/threading/light_rw_lock/CMakeLists.txt
+++ b/library/cpp/threading/light_rw_lock/CMakeLists.txt
@@ -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
diff --git a/library/cpp/threading/light_rw_lock/ut/CMakeLists.txt b/library/cpp/threading/light_rw_lock/ut/CMakeLists.txt
new file mode 100644
index 00000000000..8545c251d93
--- /dev/null
+++ b/library/cpp/threading/light_rw_lock/ut/CMakeLists.txt
@@ -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
+)
From 9d397164eb4ed907982b214ba9fa0f34b6816f25 Mon Sep 17 00:00:00 2001
From: Pavel Tsayukov
Date: Sun, 11 Aug 2024 17:23:51 +0300
Subject: [PATCH 12/12] Add tests for
library/cpp/threading/unicode/normalization into listfile (#208)
---
library/cpp/unicode/normalization/CMakeLists.txt | 4 ++++
library/cpp/unicode/normalization/ut/CMakeLists.txt | 9 +++++++++
2 files changed, 13 insertions(+)
create mode 100644 library/cpp/unicode/normalization/ut/CMakeLists.txt
diff --git a/library/cpp/unicode/normalization/CMakeLists.txt b/library/cpp/unicode/normalization/CMakeLists.txt
index 8ffe5caef08..c3a653e2ddb 100644
--- a/library/cpp/unicode/normalization/CMakeLists.txt
+++ b/library/cpp/unicode/normalization/CMakeLists.txt
@@ -1,3 +1,7 @@
+if (YDB_SDK_TESTS)
+ add_subdirectory(ut)
+endif()
+
_ydb_sdk_add_library(unicode-normalization)
target_link_libraries(unicode-normalization PUBLIC
diff --git a/library/cpp/unicode/normalization/ut/CMakeLists.txt b/library/cpp/unicode/normalization/ut/CMakeLists.txt
new file mode 100644
index 00000000000..69d818af14b
--- /dev/null
+++ b/library/cpp/unicode/normalization/ut/CMakeLists.txt
@@ -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
+)