aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authoralexv-smirnov <alex@ydb.tech>2023-03-15 19:59:12 +0300
committeralexv-smirnov <alex@ydb.tech>2023-03-15 19:59:12 +0300
commit056bb284ccf8dd6793ec3a54ffa36c4fb2b9ad11 (patch)
tree4740980126f32e3af7937ba0ca5f83e59baa4ab0 /util
parent269126dcced1cc8b53eb4398b4a33e5142f10290 (diff)
downloadydb-056bb284ccf8dd6793ec3a54ffa36c4fb2b9ad11.tar.gz
add library/cpp/actors, ymake build to ydb oss export
Diffstat (limited to 'util')
-rw-r--r--util/charset/ut/ya.make16
-rw-r--r--util/charset/ya.make34
-rw-r--r--util/datetime/benchmark/gmtime_r/ya.make13
-rw-r--r--util/datetime/benchmark/ya.make5
-rw-r--r--util/datetime/ut/ya.make15
-rw-r--r--util/datetime/ya.make9
-rw-r--r--util/digest/benchmark/murmur/ya.make7
-rw-r--r--util/digest/benchmark/ya.make3
-rw-r--r--util/digest/ut/ya.make15
-rw-r--r--util/digest/ut_cython/ya.make16
-rw-r--r--util/digest/ya.make12
-rw-r--r--util/draft/ut/ya.make20
-rw-r--r--util/draft/ya.make25
-rw-r--r--util/folder/ut/ya.make20
-rw-r--r--util/folder/ut_cython/ya.make16
-rw-r--r--util/folder/ya.make11
-rw-r--r--util/generic/ut/ya.make73
-rw-r--r--util/generic/ut_cython/ya.make25
-rw-r--r--util/generic/ya.make11
-rw-r--r--util/memory/ut/ya.make15
-rw-r--r--util/memory/ut_cython/ya.make16
-rw-r--r--util/memory/ya.make11
-rw-r--r--util/network/ut/ya.make22
-rw-r--r--util/network/ya.make5
-rw-r--r--util/random/ut/ya.make18
-rw-r--r--util/random/ya.make5
-rw-r--r--util/stream/ut/ya.make30
-rw-r--r--util/stream/ut_cython/ya.make16
-rw-r--r--util/stream/ya.make11
-rw-r--r--util/string/ut/ya.make23
-rw-r--r--util/string/ut_cython/ya.make16
-rw-r--r--util/string/ya.make11
-rw-r--r--util/system/ut/stdin_osfhandle/ya.make13
-rw-r--r--util/system/ut/ya.make89
-rw-r--r--util/system/ut_cython/ya.make16
-rw-r--r--util/system/ya.make11
-rw-r--r--util/thread/ut/ya.make17
-rw-r--r--util/thread/ya.make5
-rw-r--r--util/ut/ya.make9
-rw-r--r--util/ya.make406
40 files changed, 1111 insertions, 0 deletions
diff --git a/util/charset/ut/ya.make b/util/charset/ut/ya.make
new file mode 100644
index 0000000000..e9a3e2ffa6
--- /dev/null
+++ b/util/charset/ut/ya.make
@@ -0,0 +1,16 @@
+UNITTEST_FOR(util/charset)
+
+SUBSCRIBER(g:util-subscribers)
+
+DATA(arcadia/util/charset/ut/utf8)
+
+SRCS(
+ utf8_ut.cpp
+ wide_ut.cpp
+)
+
+INCLUDE(${ARCADIA_ROOT}/util/tests/ya_util_tests.inc)
+
+REQUIREMENTS(ram:17)
+
+END()
diff --git a/util/charset/ya.make b/util/charset/ya.make
new file mode 100644
index 0000000000..09323f44c2
--- /dev/null
+++ b/util/charset/ya.make
@@ -0,0 +1,34 @@
+LIBRARY()
+
+SUBSCRIBER(g:util-subscribers)
+
+NO_UTIL()
+
+IF (TSTRING_IS_STD_STRING)
+ CFLAGS(GLOBAL -DTSTRING_IS_STD_STRING)
+ENDIF()
+
+JOIN_SRCS(
+ all_charset.cpp
+ generated/unidata.cpp
+ recode_result.cpp
+ unicode_table.cpp
+ unidata.cpp
+ utf8.cpp
+ wide.cpp
+)
+
+IF (ARCH_X86_64 AND NOT DISABLE_INSTRUCTION_SETS)
+ SRC_C_SSE41(wide_sse41.cpp)
+ELSE()
+ SRC(
+ wide_sse41.cpp
+ -DSSE41_STUB
+ )
+ENDIF()
+
+END()
+
+RECURSE_FOR_TESTS(
+ ut
+)
diff --git a/util/datetime/benchmark/gmtime_r/ya.make b/util/datetime/benchmark/gmtime_r/ya.make
new file mode 100644
index 0000000000..32acd7c1c0
--- /dev/null
+++ b/util/datetime/benchmark/gmtime_r/ya.make
@@ -0,0 +1,13 @@
+SUBSCRIBER(g:util-subscribers)
+
+Y_BENCHMARK()
+
+PEERDIR(
+ util/draft
+)
+
+SRCS(
+ main.cpp
+)
+
+END()
diff --git a/util/datetime/benchmark/ya.make b/util/datetime/benchmark/ya.make
new file mode 100644
index 0000000000..6c9ed6cfd4
--- /dev/null
+++ b/util/datetime/benchmark/ya.make
@@ -0,0 +1,5 @@
+SUBSCRIBER(g:util-subscribers)
+
+RECURSE(
+ gmtime_r
+)
diff --git a/util/datetime/ut/ya.make b/util/datetime/ut/ya.make
new file mode 100644
index 0000000000..70f63305d5
--- /dev/null
+++ b/util/datetime/ut/ya.make
@@ -0,0 +1,15 @@
+UNITTEST_FOR(util)
+
+SUBSCRIBER(g:util-subscribers)
+
+SRCS(
+ datetime/base_ut.cpp
+ datetime/cputimer_ut.cpp
+ datetime/parser_deprecated_ut.cpp
+ datetime/parser_ut.cpp
+ datetime/uptime_ut.cpp
+)
+
+INCLUDE(${ARCADIA_ROOT}/util/tests/ya_util_tests.inc)
+
+END()
diff --git a/util/datetime/ya.make b/util/datetime/ya.make
new file mode 100644
index 0000000000..f4a66598a0
--- /dev/null
+++ b/util/datetime/ya.make
@@ -0,0 +1,9 @@
+SUBSCRIBER(g:util-subscribers)
+
+RECURSE(
+ benchmark
+)
+
+RECURSE_FOR_TESTS(
+ ut
+)
diff --git a/util/digest/benchmark/murmur/ya.make b/util/digest/benchmark/murmur/ya.make
new file mode 100644
index 0000000000..39559996ab
--- /dev/null
+++ b/util/digest/benchmark/murmur/ya.make
@@ -0,0 +1,7 @@
+G_BENCHMARK()
+
+SRCS(
+ main.cpp
+)
+
+END()
diff --git a/util/digest/benchmark/ya.make b/util/digest/benchmark/ya.make
new file mode 100644
index 0000000000..bfc0faff9e
--- /dev/null
+++ b/util/digest/benchmark/ya.make
@@ -0,0 +1,3 @@
+RECURSE(
+ murmur
+)
diff --git a/util/digest/ut/ya.make b/util/digest/ut/ya.make
new file mode 100644
index 0000000000..b6e56efeec
--- /dev/null
+++ b/util/digest/ut/ya.make
@@ -0,0 +1,15 @@
+UNITTEST_FOR(util)
+
+SUBSCRIBER(g:util-subscribers)
+
+SRCS(
+ digest/city_ut.cpp
+ digest/fnv_ut.cpp
+ digest/multi_ut.cpp
+ digest/murmur_ut.cpp
+ digest/sequence_ut.cpp
+)
+
+INCLUDE(${ARCADIA_ROOT}/util/tests/ya_util_tests.inc)
+
+END()
diff --git a/util/digest/ut_cython/ya.make b/util/digest/ut_cython/ya.make
new file mode 100644
index 0000000000..7a17a589cf
--- /dev/null
+++ b/util/digest/ut_cython/ya.make
@@ -0,0 +1,16 @@
+PY23_TEST()
+
+SUBSCRIBER(g:util-subscribers)
+
+SRCDIR(util/digest)
+
+PY_SRCS(
+ NAMESPACE util.digest
+ multi_ut.pyx
+)
+
+TEST_SRCS(
+ test_digest.py
+)
+
+END()
diff --git a/util/digest/ya.make b/util/digest/ya.make
new file mode 100644
index 0000000000..d1c47dc23b
--- /dev/null
+++ b/util/digest/ya.make
@@ -0,0 +1,12 @@
+SUBSCRIBER(g:util-subscribers)
+
+RECURSE(
+ benchmark
+ ut
+)
+
+IF (NOT OS_IOS AND NOT OS_ANDROID AND NOT USE_SYSTEM_PYTHON)
+ RECURSE(
+ ut_cython
+ )
+ENDIF()
diff --git a/util/draft/ut/ya.make b/util/draft/ut/ya.make
new file mode 100644
index 0000000000..bd637f8cda
--- /dev/null
+++ b/util/draft/ut/ya.make
@@ -0,0 +1,20 @@
+UNITTEST()
+
+SUBSCRIBER(g:util-subscribers)
+
+SRCDIR(util/draft)
+
+PEERDIR(
+ util/draft
+)
+
+SRCS(
+ date_ut.cpp
+ datetime_ut.cpp
+ holder_vector_ut.cpp
+ memory_ut.cpp
+)
+
+INCLUDE(${ARCADIA_ROOT}/util/tests/ya_util_tests.inc)
+
+END()
diff --git a/util/draft/ya.make b/util/draft/ya.make
new file mode 100644
index 0000000000..6bb0cae553
--- /dev/null
+++ b/util/draft/ya.make
@@ -0,0 +1,25 @@
+LIBRARY()
+
+SUBSCRIBER(g:util-subscribers)
+
+NO_UTIL()
+
+IF (TSTRING_IS_STD_STRING)
+ CFLAGS(GLOBAL -DTSTRING_IS_STD_STRING)
+ENDIF()
+
+SRCS(
+ date.cpp
+ datetime.cpp
+ enum.cpp
+ holder_vector.cpp
+ ip.cpp
+ matrix.cpp
+ memory.cpp
+)
+
+END()
+
+RECURSE_FOR_TESTS(
+ ut
+)
diff --git a/util/folder/ut/ya.make b/util/folder/ut/ya.make
new file mode 100644
index 0000000000..2ffaa8a2ec
--- /dev/null
+++ b/util/folder/ut/ya.make
@@ -0,0 +1,20 @@
+UNITTEST_FOR(util)
+
+SUBSCRIBER(g:util-subscribers)
+
+SRCS(
+ folder/dirut_ut.cpp
+ folder/filelist_ut.cpp
+ folder/fts_ut.cpp
+ folder/iterator_ut.cpp
+ folder/path_ut.cpp
+ folder/pathsplit_ut.cpp
+)
+
+PEERDIR(
+ library/cpp/threading/future
+)
+
+INCLUDE(${ARCADIA_ROOT}/util/tests/ya_util_tests.inc)
+
+END()
diff --git a/util/folder/ut_cython/ya.make b/util/folder/ut_cython/ya.make
new file mode 100644
index 0000000000..5cc8534a58
--- /dev/null
+++ b/util/folder/ut_cython/ya.make
@@ -0,0 +1,16 @@
+PY23_TEST()
+
+SUBSCRIBER(g:util-subscribers)
+
+SRCDIR(util/folder)
+
+PY_SRCS(
+ NAMESPACE util.folder
+ path_ut.pyx
+)
+
+TEST_SRCS(
+ test_folder.py
+)
+
+END()
diff --git a/util/folder/ya.make b/util/folder/ya.make
new file mode 100644
index 0000000000..c995d26bde
--- /dev/null
+++ b/util/folder/ya.make
@@ -0,0 +1,11 @@
+SUBSCRIBER(g:util-subscribers)
+
+RECURSE_FOR_TESTS(
+ ut
+)
+
+IF (NOT OS_IOS AND NOT OS_ANDROID AND NOT USE_SYSTEM_PYTHON)
+ RECURSE(
+ ut_cython
+ )
+ENDIF()
diff --git a/util/generic/ut/ya.make b/util/generic/ut/ya.make
new file mode 100644
index 0000000000..98dda8111e
--- /dev/null
+++ b/util/generic/ut/ya.make
@@ -0,0 +1,73 @@
+UNITTEST_FOR(util)
+
+SUBSCRIBER(g:util-subscribers)
+
+FORK_TESTS()
+
+SRCS(
+ generic/adaptor_ut.cpp
+ generic/algorithm_ut.cpp
+ generic/array_ref_ut.cpp
+ generic/array_size_ut.cpp
+ generic/bitmap_ut.cpp
+ generic/bitops_ut.cpp
+ generic/buffer_ut.cpp
+ generic/cast_ut.cpp
+ generic/deque_ut.cpp
+ generic/explicit_type_ut.cpp
+ generic/flags_ut.cpp
+ generic/function_ref_ut.cpp
+ generic/function_ut.cpp
+ generic/guid_ut.cpp
+ generic/hash_primes_ut.cpp
+ generic/hash_ut.cpp
+ generic/intrlist_ut.cpp
+ generic/is_in_ut.cpp
+ generic/iterator_range_ut.cpp
+ generic/iterator_ut.cpp
+ generic/lazy_value_ut.cpp
+ generic/list_ut.cpp
+ generic/map_ut.cpp
+ generic/mapfindptr_ut.cpp
+ generic/maybe_ut.cpp
+ generic/mem_copy_ut.cpp
+ generic/objects_counter_ut.cpp
+ generic/overloaded_ut.cpp
+ generic/ptr_ut.cpp
+ generic/queue_ut.cpp
+ generic/scope_ut.cpp
+ generic/serialized_enum_ut.cpp
+ generic/set_ut.cpp
+ generic/singleton_ut.cpp
+ generic/size_literals_ut.cpp
+ generic/stack_ut.cpp
+ generic/store_policy_ut.cpp
+ generic/strbuf_ut.cpp
+ generic/string_ut.cpp
+ generic/typelist_ut.cpp
+ generic/typetraits_ut.cpp
+ generic/utility_ut.cpp
+ generic/va_args_ut.cpp
+ generic/vector_ut.cpp
+ generic/xrange_ut.cpp
+ generic/yexception_ut.c
+ generic/yexception_ut.cpp
+ generic/ylimits_ut.cpp
+ generic/ymath_ut.cpp
+)
+
+INCLUDE(${ARCADIA_ROOT}/util/tests/ya_util_tests.inc)
+
+IF (NOT OS_IOS AND NOT ARCH_PPC64LE)
+ # Abseil fails to build (with linkage error) on ios and with compilation error on PowerPC
+ # (somewhere in unscaledcycleclock.cc).
+ PEERDIR(
+ library/cpp/containers/absl_flat_hash
+ )
+
+ SRCS(
+ generic/string_transparent_hash_ut.cpp
+ )
+ENDIF()
+
+END()
diff --git a/util/generic/ut_cython/ya.make b/util/generic/ut_cython/ya.make
new file mode 100644
index 0000000000..ea923ff413
--- /dev/null
+++ b/util/generic/ut_cython/ya.make
@@ -0,0 +1,25 @@
+PY23_TEST()
+
+SUBSCRIBER(g:util-subscribers)
+
+SRCDIR(util/generic)
+
+PY_SRCS(
+ NAMESPACE util.generic
+ array_ref_ut.pyx
+ deque_ut.pyx
+ hash_set_ut.pyx
+ hash_ut.pyx
+ list_ut.pyx
+ map_ut.pyx
+ maybe_ut.pyx
+ ptr_ut.pyx
+ string_ut.pyx
+ vector_ut.pyx
+)
+
+TEST_SRCS(
+ test_generic.py
+)
+
+END()
diff --git a/util/generic/ya.make b/util/generic/ya.make
new file mode 100644
index 0000000000..c995d26bde
--- /dev/null
+++ b/util/generic/ya.make
@@ -0,0 +1,11 @@
+SUBSCRIBER(g:util-subscribers)
+
+RECURSE_FOR_TESTS(
+ ut
+)
+
+IF (NOT OS_IOS AND NOT OS_ANDROID AND NOT USE_SYSTEM_PYTHON)
+ RECURSE(
+ ut_cython
+ )
+ENDIF()
diff --git a/util/memory/ut/ya.make b/util/memory/ut/ya.make
new file mode 100644
index 0000000000..fbddc4ca4e
--- /dev/null
+++ b/util/memory/ut/ya.make
@@ -0,0 +1,15 @@
+UNITTEST_FOR(util)
+
+SUBSCRIBER(g:util-subscribers)
+
+SRCS(
+ memory/addstorage_ut.cpp
+ memory/blob_ut.cpp
+ memory/pool_ut.cpp
+ memory/smallobj_ut.cpp
+ memory/tempbuf_ut.cpp
+)
+
+INCLUDE(${ARCADIA_ROOT}/util/tests/ya_util_tests.inc)
+
+END()
diff --git a/util/memory/ut_cython/ya.make b/util/memory/ut_cython/ya.make
new file mode 100644
index 0000000000..d8a06845b1
--- /dev/null
+++ b/util/memory/ut_cython/ya.make
@@ -0,0 +1,16 @@
+PY23_TEST()
+
+SUBSCRIBER(g:util-subscribers)
+
+SRCDIR(util/memory)
+
+PY_SRCS(
+ NAMESPACE util.memory
+ blob_ut.pyx
+)
+
+TEST_SRCS(
+ test_memory.py
+)
+
+END()
diff --git a/util/memory/ya.make b/util/memory/ya.make
new file mode 100644
index 0000000000..c995d26bde
--- /dev/null
+++ b/util/memory/ya.make
@@ -0,0 +1,11 @@
+SUBSCRIBER(g:util-subscribers)
+
+RECURSE_FOR_TESTS(
+ ut
+)
+
+IF (NOT OS_IOS AND NOT OS_ANDROID AND NOT USE_SYSTEM_PYTHON)
+ RECURSE(
+ ut_cython
+ )
+ENDIF()
diff --git a/util/network/ut/ya.make b/util/network/ut/ya.make
new file mode 100644
index 0000000000..f62c919852
--- /dev/null
+++ b/util/network/ut/ya.make
@@ -0,0 +1,22 @@
+UNITTEST_FOR(util)
+
+REQUIREMENTS(network:full)
+
+SUBSCRIBER(g:util-subscribers)
+
+PEERDIR(
+ library/cpp/threading/future
+)
+
+SRCS(
+ network/address_ut.cpp
+ network/endpoint_ut.cpp
+ network/ip_ut.cpp
+ network/poller_ut.cpp
+ network/sock_ut.cpp
+ network/socket_ut.cpp
+)
+
+INCLUDE(${ARCADIA_ROOT}/util/tests/ya_util_tests.inc)
+
+END()
diff --git a/util/network/ya.make b/util/network/ya.make
new file mode 100644
index 0000000000..08f8a28a88
--- /dev/null
+++ b/util/network/ya.make
@@ -0,0 +1,5 @@
+SUBSCRIBER(g:util-subscribers)
+
+RECURSE_FOR_TESTS(
+ ut
+)
diff --git a/util/random/ut/ya.make b/util/random/ut/ya.make
new file mode 100644
index 0000000000..66c9078fbd
--- /dev/null
+++ b/util/random/ut/ya.make
@@ -0,0 +1,18 @@
+UNITTEST_FOR(util)
+
+SUBSCRIBER(g:util-subscribers)
+
+SRCS(
+ random/common_ops_ut.cpp
+ random/easy_ut.cpp
+ random/entropy_ut.cpp
+ random/fast_ut.cpp
+ random/normal_ut.cpp
+ random/mersenne_ut.cpp
+ random/random_ut.cpp
+ random/shuffle_ut.cpp
+)
+
+INCLUDE(${ARCADIA_ROOT}/util/tests/ya_util_tests.inc)
+
+END()
diff --git a/util/random/ya.make b/util/random/ya.make
new file mode 100644
index 0000000000..08f8a28a88
--- /dev/null
+++ b/util/random/ya.make
@@ -0,0 +1,5 @@
+SUBSCRIBER(g:util-subscribers)
+
+RECURSE_FOR_TESTS(
+ ut
+)
diff --git a/util/stream/ut/ya.make b/util/stream/ut/ya.make
new file mode 100644
index 0000000000..c2e268cb02
--- /dev/null
+++ b/util/stream/ut/ya.make
@@ -0,0 +1,30 @@
+UNITTEST_FOR(util)
+
+SUBSCRIBER(g:util-subscribers)
+
+SRCS(
+ stream/aligned_ut.cpp
+ stream/buffer_ut.cpp
+ stream/buffered_ut.cpp
+ stream/direct_io_ut.cpp
+ stream/file_ut.cpp
+ stream/format_ut.cpp
+ stream/format_std_ut.cpp
+ stream/hex_ut.cpp
+ stream/input_ut.cpp
+ stream/ios_ut.cpp
+ stream/labeled_ut.cpp
+ stream/length_ut.cpp
+ stream/mem_ut.cpp
+ stream/multi_ut.cpp
+ stream/printf_ut.cpp
+ stream/str_ut.cpp
+ stream/tokenizer_ut.cpp
+ stream/walk_ut.cpp
+ stream/zerocopy_output_ut.cpp
+ stream/zlib_ut.cpp
+)
+
+INCLUDE(${ARCADIA_ROOT}/util/tests/ya_util_tests.inc)
+
+END()
diff --git a/util/stream/ut_cython/ya.make b/util/stream/ut_cython/ya.make
new file mode 100644
index 0000000000..841a8fb0ba
--- /dev/null
+++ b/util/stream/ut_cython/ya.make
@@ -0,0 +1,16 @@
+PY23_TEST()
+
+SUBSCRIBER(g:util-subscribers)
+
+SRCDIR(util/stream)
+
+PY_SRCS(
+ NAMESPACE util.stream
+ str_ut.pyx
+)
+
+TEST_SRCS(
+ test_stream.py
+)
+
+END()
diff --git a/util/stream/ya.make b/util/stream/ya.make
new file mode 100644
index 0000000000..c995d26bde
--- /dev/null
+++ b/util/stream/ya.make
@@ -0,0 +1,11 @@
+SUBSCRIBER(g:util-subscribers)
+
+RECURSE_FOR_TESTS(
+ ut
+)
+
+IF (NOT OS_IOS AND NOT OS_ANDROID AND NOT USE_SYSTEM_PYTHON)
+ RECURSE(
+ ut_cython
+ )
+ENDIF()
diff --git a/util/string/ut/ya.make b/util/string/ut/ya.make
new file mode 100644
index 0000000000..7243176bfe
--- /dev/null
+++ b/util/string/ut/ya.make
@@ -0,0 +1,23 @@
+UNITTEST_FOR(util)
+
+SUBSCRIBER(g:util-subscribers)
+
+SRCS(
+ string/builder_ut.cpp
+ string/cast_ut.cpp
+ string/escape_ut.cpp
+ string/join_ut.cpp
+ string/hex_ut.cpp
+ string/printf_ut.cpp
+ string/split_ut.cpp
+ string/strip_ut.cpp
+ string/subst_ut.cpp
+ string/type_ut.cpp
+ string/util_ut.cpp
+ string/vector_ut.cpp
+ string/ascii_ut.cpp
+)
+
+INCLUDE(${ARCADIA_ROOT}/util/tests/ya_util_tests.inc)
+
+END()
diff --git a/util/string/ut_cython/ya.make b/util/string/ut_cython/ya.make
new file mode 100644
index 0000000000..99a29c96ce
--- /dev/null
+++ b/util/string/ut_cython/ya.make
@@ -0,0 +1,16 @@
+PY23_TEST()
+
+SUBSCRIBER(g:util-subscribers)
+
+SRCDIR(util/string)
+
+PY_SRCS(
+ NAMESPACE util.string
+ cast_ut.pyx
+)
+
+TEST_SRCS(
+ test_string.py
+)
+
+END()
diff --git a/util/string/ya.make b/util/string/ya.make
new file mode 100644
index 0000000000..c995d26bde
--- /dev/null
+++ b/util/string/ya.make
@@ -0,0 +1,11 @@
+SUBSCRIBER(g:util-subscribers)
+
+RECURSE_FOR_TESTS(
+ ut
+)
+
+IF (NOT OS_IOS AND NOT OS_ANDROID AND NOT USE_SYSTEM_PYTHON)
+ RECURSE(
+ ut_cython
+ )
+ENDIF()
diff --git a/util/system/ut/stdin_osfhandle/ya.make b/util/system/ut/stdin_osfhandle/ya.make
new file mode 100644
index 0000000000..224bf2e5fa
--- /dev/null
+++ b/util/system/ut/stdin_osfhandle/ya.make
@@ -0,0 +1,13 @@
+PROGRAM()
+
+SUBSCRIBER(g:util-subscribers)
+
+SRCS(
+ main.cpp
+)
+
+NO_UTIL()
+
+BUILD_ONLY_IF(OS_WINDOWS)
+
+END()
diff --git a/util/system/ut/ya.make b/util/system/ut/ya.make
new file mode 100644
index 0000000000..20c6973552
--- /dev/null
+++ b/util/system/ut/ya.make
@@ -0,0 +1,89 @@
+UNITTEST_FOR(util)
+
+SUBSCRIBER(g:util-subscribers)
+
+FORK_TESTS()
+
+FORK_SUBTESTS()
+
+SPLIT_FACTOR(40)
+
+TIMEOUT(300)
+
+SIZE(MEDIUM)
+
+IF (OS_DARWIN)
+ SIZE(LARGE)
+ TAG(ya:fat ya:force_sandbox ya:exotic_platform)
+ TIMEOUT(3600)
+ENDIF()
+
+PEERDIR(
+ library/cpp/testing/benchmark
+)
+
+SRCS(
+ system/align_ut.cpp
+ system/atexit_ut.cpp
+ system/backtrace_ut.cpp
+ system/byteorder_ut.cpp
+ system/compat_ut.cpp
+ system/compiler_ut.cpp
+ system/context_ut.cpp
+ system/condvar_ut.cpp
+ system/cpu_id_ut.cpp
+ system/datetime_ut.cpp
+ system/daemon_ut.cpp
+ system/direct_io_ut.cpp
+ system/env_ut.cpp
+ system/error_ut.cpp
+ system/event_ut.cpp
+ system/execpath_ut.cpp
+ system/file_ut.cpp
+ system/filemap_ut.cpp
+ system/flock_ut.cpp
+ system/fs_ut.cpp
+ system/fstat_ut.cpp
+ system/getpid_ut.cpp
+ system/guard_ut.cpp
+ system/hi_lo_ut.cpp
+ system/hostname_ut.cpp
+ system/info_ut.cpp
+ system/interrupt_signals_ut.cpp
+ system/mem_info_ut.cpp
+ system/mincore_ut.cpp
+ system/mutex_ut.cpp
+ system/nice_ut.cpp
+ system/pipe_ut.cpp
+ system/platform_ut.cpp
+ system/progname_ut.cpp
+ system/rusage_ut.cpp
+ system/rwlock_ut.cpp
+ system/sanitizers_ut.cpp
+ system/shellcommand_ut.cpp
+ system/spinlock_ut.cpp
+ system/src_root_ut.cpp
+ system/src_location_ut.cpp
+ system/shmat_ut.cpp
+ system/tempfile_ut.cpp
+ system/thread_ut.cpp
+ system/tls_ut.cpp
+ system/types_ut.cpp
+ system/type_name_ut.cpp
+ system/user_ut.cpp
+ system/unaligned_mem_ut.cpp
+ system/yassert_ut.cpp
+)
+
+IF (OS_WINDOWS)
+ SRCS(
+ system/fs_win_ut.cpp
+ )
+ DEPENDS(
+ util/system/ut/stdin_osfhandle
+ )
+ENDIF()
+
+REQUIREMENTS(ram:12)
+
+END()
diff --git a/util/system/ut_cython/ya.make b/util/system/ut_cython/ya.make
new file mode 100644
index 0000000000..62128e231d
--- /dev/null
+++ b/util/system/ut_cython/ya.make
@@ -0,0 +1,16 @@
+PY23_TEST()
+
+SUBSCRIBER(g:util-subscribers)
+
+SRCDIR(util/system)
+
+PY_SRCS(
+ NAMESPACE util.system
+ types_ut.pyx
+)
+
+TEST_SRCS(
+ test_system.py
+)
+
+END()
diff --git a/util/system/ya.make b/util/system/ya.make
new file mode 100644
index 0000000000..c995d26bde
--- /dev/null
+++ b/util/system/ya.make
@@ -0,0 +1,11 @@
+SUBSCRIBER(g:util-subscribers)
+
+RECURSE_FOR_TESTS(
+ ut
+)
+
+IF (NOT OS_IOS AND NOT OS_ANDROID AND NOT USE_SYSTEM_PYTHON)
+ RECURSE(
+ ut_cython
+ )
+ENDIF()
diff --git a/util/thread/ut/ya.make b/util/thread/ut/ya.make
new file mode 100644
index 0000000000..ade94fb405
--- /dev/null
+++ b/util/thread/ut/ya.make
@@ -0,0 +1,17 @@
+UNITTEST_FOR(util)
+
+SUBSCRIBER(g:util-subscribers)
+
+SRCS(
+ thread/factory_ut.cpp
+ thread/lfqueue_ut.cpp
+ thread/lfstack_ut.cpp
+ thread/pool_ut.cpp
+ thread/singleton_ut.cpp
+)
+
+PEERDIR(
+ library/cpp/threading/future
+)
+
+END()
diff --git a/util/thread/ya.make b/util/thread/ya.make
new file mode 100644
index 0000000000..08f8a28a88
--- /dev/null
+++ b/util/thread/ya.make
@@ -0,0 +1,5 @@
+SUBSCRIBER(g:util-subscribers)
+
+RECURSE_FOR_TESTS(
+ ut
+)
diff --git a/util/ut/ya.make b/util/ut/ya.make
new file mode 100644
index 0000000000..dc07708117
--- /dev/null
+++ b/util/ut/ya.make
@@ -0,0 +1,9 @@
+UNITTEST_FOR(util)
+
+SUBSCRIBER(g:util-subscribers)
+
+SRCS(
+ ysaveload_ut.cpp
+)
+
+END()
diff --git a/util/ya.make b/util/ya.make
new file mode 100644
index 0000000000..d289041eb3
--- /dev/null
+++ b/util/ya.make
@@ -0,0 +1,406 @@
+LIBRARY(yutil)
+
+SUBSCRIBER(g:util-subscribers)
+
+NEED_CHECK()
+
+NO_UTIL()
+
+# stream
+# string
+PEERDIR(
+ util/charset
+ contrib/libs/zlib
+ contrib/libs/double-conversion
+)
+
+PEERDIR(
+ contrib/libs/libc_compat
+)
+
+# datetime
+JOIN_SRCS(
+ all_datetime.cpp
+ datetime/base.cpp
+ datetime/constants.cpp
+ datetime/cputimer.cpp
+ datetime/systime.cpp
+ datetime/uptime.cpp
+)
+
+SRCS(
+ datetime/parser.rl6
+ digest/city.cpp
+ random/random.cpp
+ string/cast.cpp
+)
+
+IF (OS_WINDOWS)
+ SRCS(
+ datetime/strptime.cpp
+ )
+ENDIF()
+
+# digest
+JOIN_SRCS(
+ all_digest.cpp
+ digest/fnv.cpp
+ digest/multi.cpp
+ digest/murmur.cpp
+ digest/numeric.cpp
+ digest/sequence.cpp
+)
+
+JOIN_SRCS(
+ all_util.cpp
+ ysafeptr.cpp
+ ysaveload.cpp
+ str_stl.cpp
+)
+
+# folder
+JOIN_SRCS(
+ all_folder.cpp
+ folder/dirut.cpp
+ folder/filelist.cpp
+ folder/fts.cpp
+ folder/fwd.cpp
+ folder/iterator.cpp
+ folder/path.cpp
+ folder/pathsplit.cpp
+ folder/tempdir.cpp
+)
+
+IF (OS_WINDOWS)
+ SRCS(
+ folder/lstat_win.c
+ folder/dirent_win.c
+ )
+ENDIF()
+
+# generic
+JOIN_SRCS(
+ all_generic.cpp
+ generic/adaptor.cpp
+ generic/algorithm.cpp
+ generic/array_ref.cpp
+ generic/array_size.cpp
+ generic/bitmap.cpp
+ generic/bitops.cpp
+ generic/bt_exception.cpp
+ generic/buffer.cpp
+ generic/cast.cpp
+ generic/deque.cpp
+ generic/explicit_type.cpp
+ generic/fastqueue.cpp
+ generic/flags.cpp
+ generic/function.cpp
+ generic/function_ref.cpp
+ generic/fwd.cpp
+ generic/guid.cpp
+ generic/hash.cpp
+ generic/hash_multi_map.cpp
+ generic/hash_table.cpp
+ generic/hash_primes.cpp
+ generic/hash_set.cpp
+ generic/hide_ptr.cpp
+ generic/intrlist.cpp
+ generic/is_in.cpp
+ generic/iterator.cpp
+ generic/iterator_range.cpp
+ generic/lazy_value.cpp
+ generic/list.cpp
+ generic/map.cpp
+ generic/mapfindptr.cpp
+ generic/maybe.cpp
+ generic/mem_copy.cpp
+ generic/noncopyable.cpp
+ generic/object_counter.cpp
+ generic/overloaded.cpp
+ generic/ptr.cpp
+ generic/queue.cpp
+ generic/refcount.cpp
+ generic/scope.cpp
+ generic/serialized_enum.cpp
+ generic/set.cpp
+ generic/singleton.cpp
+ generic/size_literals.cpp
+ generic/stack.cpp
+ generic/store_policy.cpp
+ generic/strbuf.cpp
+ generic/strfcpy.cpp
+ generic/string.cpp
+ generic/typelist.cpp
+ generic/typetraits.cpp
+ generic/utility.cpp
+ generic/va_args.cpp
+ generic/variant.cpp
+ generic/vector.cpp
+ generic/xrange.cpp
+ generic/yexception.cpp
+ generic/ylimits.cpp
+ generic/ymath.cpp
+)
+
+# memory
+JOIN_SRCS(
+ all_memory.cpp
+ memory/addstorage.cpp
+ memory/alloc.cpp
+ memory/blob.cpp
+ memory/mmapalloc.cpp
+ memory/pool.cpp
+ memory/segmented_string_pool.cpp
+ memory/segpool_alloc.cpp
+ memory/smallobj.cpp
+ memory/tempbuf.cpp
+)
+
+# network
+JOIN_SRCS(
+ all_network.cpp
+ network/address.cpp
+ network/endpoint.cpp
+ network/hostip.cpp
+ network/init.cpp
+ network/interface.cpp
+ network/iovec.cpp
+ network/ip.cpp
+ network/nonblock.cpp
+ network/pair.cpp
+ network/poller.cpp
+ network/pollerimpl.cpp
+ network/sock.cpp
+ network/socket.cpp
+)
+
+# random
+JOIN_SRCS(
+ all_random.cpp
+ random/common_ops.cpp
+ random/easy.cpp
+ random/entropy.cpp
+ random/fast.cpp
+ random/lcg_engine.cpp
+ random/mersenne32.cpp
+ random/mersenne64.cpp
+ random/mersenne.cpp
+ random/normal.cpp
+ random/shuffle.cpp
+ random/init_atfork.cpp
+)
+
+JOIN_SRCS(
+ all_stream.cpp
+ stream/aligned.cpp
+ stream/buffer.cpp
+ stream/buffered.cpp
+ stream/debug.cpp
+ stream/direct_io.cpp
+ stream/file.cpp
+ stream/format.cpp
+ stream/fwd.cpp
+ stream/hex.cpp
+ stream/holder.cpp
+ stream/input.cpp
+ stream/labeled.cpp
+ stream/length.cpp
+ stream/mem.cpp
+ stream/multi.cpp
+ stream/null.cpp
+ stream/output.cpp
+ stream/pipe.cpp
+ stream/printf.cpp
+ stream/str.cpp
+ stream/tee.cpp
+ stream/tempbuf.cpp
+ stream/tokenizer.cpp
+ stream/trace.cpp
+ stream/walk.cpp
+ stream/zerocopy.cpp
+ stream/zerocopy_output.cpp
+ stream/zlib.cpp
+)
+
+JOIN_SRCS(
+ all_string.cpp
+ string/ascii.cpp
+ string/builder.cpp
+ string/cstriter.cpp
+ string/escape.cpp
+ string/hex.cpp
+ string/join.cpp
+ string/printf.cpp
+ string/reverse.cpp
+ string/split.cpp
+ string/strip.cpp
+ string/strspn.cpp
+ string/subst.cpp
+ string/type.cpp
+ string/util.cpp
+ string/vector.cpp
+)
+
+IF (GCC OR CLANG OR CLANG_CL)
+ CFLAGS(-Wnarrowing)
+ENDIF()
+
+IF (ARCH_ARM)
+ CFLAGS(-D_FORTIFY_SOURCE=0)
+ENDIF()
+
+IF (TSTRING_IS_STD_STRING)
+ CFLAGS(GLOBAL -DTSTRING_IS_STD_STRING)
+ENDIF()
+
+JOIN_SRCS(
+ all_system_1.cpp
+ system/atexit.cpp
+ system/backtrace.cpp
+ system/compat.cpp
+ system/condvar.cpp
+ system/context.cpp
+ system/daemon.cpp
+ system/datetime.cpp
+ system/defaults.c
+ system/direct_io.cpp
+ system/dynlib.cpp
+ system/env.cpp
+ system/error.cpp
+ system/event.cpp
+ system/execpath.cpp
+ system/fasttime.cpp
+ system/file.cpp
+ system/file_lock.cpp
+ system/filemap.cpp
+ system/flock.cpp
+ system/fs.cpp
+ system/fstat.cpp
+ system/getpid.cpp
+ system/hi_lo.cpp
+ system/hostname.cpp
+ system/hp_timer.cpp
+ system/info.cpp
+)
+
+IF (OS_WINDOWS)
+ SRCS(system/err.cpp)
+ENDIF()
+
+JOIN_SRCS(
+ all_system_2.cpp
+ system/align.cpp
+ system/byteorder.cpp
+ system/cpu_id.cpp
+ system/fhandle.cpp
+ system/guard.cpp
+ system/interrupt_signals.cpp
+ system/madvise.cpp
+ system/maxlen.cpp
+ system/mem_info.cpp
+ system/mincore.cpp
+ system/mktemp.cpp
+ system/mlock.cpp
+ system/mutex.cpp
+ system/nice.cpp
+ system/pipe.cpp
+ system/platform.cpp
+ system/progname.cpp
+ system/protect.cpp
+ system/rusage.cpp
+ system/rwlock.cpp
+ system/sanitizers.cpp
+ system/sem.cpp
+ system/shellcommand.cpp
+ system/shmat.cpp
+ system/sigset.cpp
+ system/spinlock.cpp
+ system/spin_wait.cpp
+ system/src_location.cpp
+ system/sys_alloc.cpp
+ system/sysstat.cpp
+ system/tempfile.cpp
+ system/thread.cpp
+ system/tls.cpp
+ system/types.cpp
+ system/type_name.cpp
+ system/unaligned_mem.cpp
+ system/user.cpp
+ system/utime.cpp
+ system/yassert.cpp
+ system/yield.cpp
+)
+
+SRC_C_NO_LTO(system/compiler.cpp)
+
+IF (OS_WINDOWS)
+ SRCS(
+ system/fs_win.cpp
+ system/winint.cpp
+ )
+ELSEIF (OS_CYGWIN OR OS_IOS)
+ # no asm context switching on cygwin or iOS
+ELSE()
+ IF (ARCH_X86_64 OR ARCH_I386)
+ SRCS(
+ system/context_x86.asm
+ )
+ ENDIF()
+ IF (ARCH_AARCH64 OR ARCH_ARM64)
+ SRCS(
+ system/context_aarch64.S
+ )
+ ENDIF()
+ENDIF()
+
+IF (OS_LINUX)
+ SRCS(
+ system/valgrind.cpp
+ )
+ EXTRALIBS(
+ -lrt
+ -ldl
+ )
+ENDIF()
+
+IF (MUSL)
+ PEERDIR(
+ contrib/libs/linuxvdso
+ )
+ELSE()
+ IF (OS_LINUX OR SUN OR CYGWIN OR OS_WINDOWS)
+ SRCS(
+ system/mktemp_system.cpp
+ )
+ ENDIF()
+ENDIF()
+
+# thread
+JOIN_SRCS(
+ all_thread.cpp
+ thread/factory.cpp
+ thread/fwd.cpp
+ thread/lfqueue.cpp
+ thread/lfstack.cpp
+ thread/pool.cpp
+ thread/singleton.cpp
+)
+
+END()
+
+RECURSE(
+ charset
+ datetime
+ digest
+ draft
+ folder
+ generic
+ memory
+ network
+ random
+ stream
+ string
+ system
+ thread
+ ut
+)