diff options
author | alexv-smirnov <alex@ydb.tech> | 2023-03-15 19:59:12 +0300 |
---|---|---|
committer | alexv-smirnov <alex@ydb.tech> | 2023-03-15 19:59:12 +0300 |
commit | 056bb284ccf8dd6793ec3a54ffa36c4fb2b9ad11 (patch) | |
tree | 4740980126f32e3af7937ba0ca5f83e59baa4ab0 /library/cpp/testing | |
parent | 269126dcced1cc8b53eb4398b4a33e5142f10290 (diff) | |
download | ydb-056bb284ccf8dd6793ec3a54ffa36c4fb2b9ad11.tar.gz |
add library/cpp/actors, ymake build to ydb oss export
Diffstat (limited to 'library/cpp/testing')
22 files changed, 325 insertions, 0 deletions
diff --git a/library/cpp/testing/benchmark/examples/metrics/ya.make b/library/cpp/testing/benchmark/examples/metrics/ya.make new file mode 100644 index 0000000000..56eb58fc7f --- /dev/null +++ b/library/cpp/testing/benchmark/examples/metrics/ya.make @@ -0,0 +1,15 @@ +PY2TEST() + +SIZE(LARGE) + +TAG( + ya:force_sandbox + sb:intel_e5_2660v1 + ya:fat +) + +TEST_SRCS(main.py) + +DEPENDS(library/cpp/testing/benchmark/examples) + +END() diff --git a/library/cpp/testing/benchmark/examples/ya.make b/library/cpp/testing/benchmark/examples/ya.make new file mode 100644 index 0000000000..857c43519c --- /dev/null +++ b/library/cpp/testing/benchmark/examples/ya.make @@ -0,0 +1,11 @@ +Y_BENCHMARK() + +SRCS( + main.cpp +) + +END() + +RECURSE( + metrics +) diff --git a/library/cpp/testing/benchmark/main/ya.make b/library/cpp/testing/benchmark/main/ya.make new file mode 100644 index 0000000000..684435b94f --- /dev/null +++ b/library/cpp/testing/benchmark/main/ya.make @@ -0,0 +1,11 @@ +LIBRARY() + +SRCS( + GLOBAL main.cpp +) + +PEERDIR( + library/cpp/testing/benchmark +) + +END() diff --git a/library/cpp/testing/benchmark/ya.make b/library/cpp/testing/benchmark/ya.make new file mode 100644 index 0000000000..8ded7f4ec2 --- /dev/null +++ b/library/cpp/testing/benchmark/ya.make @@ -0,0 +1,22 @@ +LIBRARY() + +SRCS( + bench.cpp + dummy.cpp +) + +PEERDIR( + contrib/libs/re2 + library/cpp/colorizer + library/cpp/getopt/small + library/cpp/json + library/cpp/linear_regression + library/cpp/threading/poor_man_openmp +) + +END() + +RECURSE( + examples + main +) diff --git a/library/cpp/testing/common/ut/ya.make b/library/cpp/testing/common/ut/ya.make new file mode 100644 index 0000000000..100c42f835 --- /dev/null +++ b/library/cpp/testing/common/ut/ya.make @@ -0,0 +1,12 @@ +GTEST() +SRCS( + env_ut.cpp + network_ut.cpp + scope_ut.cpp +) + +PEERDIR( + library/cpp/testing/common +) + +END() diff --git a/library/cpp/testing/common/ya.make b/library/cpp/testing/common/ya.make new file mode 100644 index 0000000000..c0ec98af53 --- /dev/null +++ b/library/cpp/testing/common/ya.make @@ -0,0 +1,16 @@ +LIBRARY() + +SRCS( + env.cpp + network.cpp + probe.cpp + scope.cpp +) + +PEERDIR( + library/cpp/json +) + +END() + +RECURSE_FOR_TESTS(ut) diff --git a/library/cpp/testing/gbenchmark_main/ya.make b/library/cpp/testing/gbenchmark_main/ya.make new file mode 100644 index 0000000000..e5fefc54d0 --- /dev/null +++ b/library/cpp/testing/gbenchmark_main/ya.make @@ -0,0 +1,12 @@ +LIBRARY() + +SRCS( + main.cpp +) + +PEERDIR( + contrib/libs/benchmark + library/cpp/testing/hook +) + +END() diff --git a/library/cpp/testing/gmock_in_unittest/example_ut/ya.make b/library/cpp/testing/gmock_in_unittest/example_ut/ya.make new file mode 100644 index 0000000000..38d3aae811 --- /dev/null +++ b/library/cpp/testing/gmock_in_unittest/example_ut/ya.make @@ -0,0 +1,11 @@ +UNITTEST() + +PEERDIR( + library/cpp/testing/gmock_in_unittest +) + +SRCS( + example_ut.cpp +) + +END() diff --git a/library/cpp/testing/gmock_in_unittest/ya.make b/library/cpp/testing/gmock_in_unittest/ya.make new file mode 100644 index 0000000000..cd2fa65b48 --- /dev/null +++ b/library/cpp/testing/gmock_in_unittest/ya.make @@ -0,0 +1,19 @@ +LIBRARY() + +PEERDIR( + contrib/restricted/googletest/googlemock + contrib/restricted/googletest/googletest + library/cpp/testing/gtest_extensions + library/cpp/testing/unittest +) + +SRCS( + events.cpp + GLOBAL registration.cpp +) + +END() + +RECURSE_FOR_TESTS( + example_ut +) diff --git a/library/cpp/testing/gtest/ut/ya.make b/library/cpp/testing/gtest/ut/ya.make new file mode 100644 index 0000000000..d06bbefd49 --- /dev/null +++ b/library/cpp/testing/gtest/ut/ya.make @@ -0,0 +1,15 @@ +GTEST() +SRCS( + matchers_ut.cpp + ut.cpp +) + +DATA( + arcadia/library/cpp/testing/gtest/ut/golden +) + +PEERDIR( + library/cpp/testing/hook +) + +END() diff --git a/library/cpp/testing/gtest/ya.make b/library/cpp/testing/gtest/ya.make new file mode 100644 index 0000000000..74beb1a051 --- /dev/null +++ b/library/cpp/testing/gtest/ya.make @@ -0,0 +1,22 @@ +LIBRARY() + +PROVIDES(test_framework) + +SRCS( + gtest.cpp + main.cpp + matchers.cpp +) + +PEERDIR( + contrib/restricted/googletest/googlemock + contrib/restricted/googletest/googletest + library/cpp/string_utils/relaxed_escaper + library/cpp/testing/common + library/cpp/testing/gtest_extensions + library/cpp/testing/hook +) + +END() + +RECURSE_FOR_TESTS(ut) diff --git a/library/cpp/testing/gtest_extensions/ut/ya.make b/library/cpp/testing/gtest_extensions/ut/ya.make new file mode 100644 index 0000000000..61c20583b4 --- /dev/null +++ b/library/cpp/testing/gtest_extensions/ut/ya.make @@ -0,0 +1,11 @@ +GTEST() +SRCS( + gtest_extensions_ut.cpp + probe_ut.cpp +) + +PEERDIR( + library/cpp/testing/gtest_extensions +) + +END() diff --git a/library/cpp/testing/gtest_extensions/ya.make b/library/cpp/testing/gtest_extensions/ya.make new file mode 100644 index 0000000000..e954914d78 --- /dev/null +++ b/library/cpp/testing/gtest_extensions/ya.make @@ -0,0 +1,17 @@ +LIBRARY() +PEERDIR( + contrib/restricted/googletest/googlemock + contrib/restricted/googletest/googletest +) + +SRCS( + assertions.cpp + gtest_extensions.cpp + matchers.cpp + pretty_printers.cpp + probe.cpp +) + +END() + +RECURSE_FOR_TESTS(ut) diff --git a/library/cpp/testing/gtest_main/ya.make b/library/cpp/testing/gtest_main/ya.make new file mode 100644 index 0000000000..e005ab9237 --- /dev/null +++ b/library/cpp/testing/gtest_main/ya.make @@ -0,0 +1,11 @@ +LIBRARY() + +SRCS( + main.cpp +) + +PEERDIR( + library/cpp/testing/gtest +) + +END() diff --git a/library/cpp/testing/hook/ya.make b/library/cpp/testing/hook/ya.make new file mode 100644 index 0000000000..a5935ceb87 --- /dev/null +++ b/library/cpp/testing/hook/ya.make @@ -0,0 +1,6 @@ +LIBRARY() +SRCS( + hook.cpp +) + +END() diff --git a/library/cpp/testing/mock_server/ya.make b/library/cpp/testing/mock_server/ya.make new file mode 100644 index 0000000000..4b9fc8371d --- /dev/null +++ b/library/cpp/testing/mock_server/ya.make @@ -0,0 +1,14 @@ +LIBRARY() + +PEERDIR( + library/cpp/http/misc + library/cpp/http/server +) + +SRCS( + server.cpp +) + +END() + +RECURSE_FOR_TESTS(ut) diff --git a/library/cpp/testing/unittest/fat/ya.make b/library/cpp/testing/unittest/fat/ya.make new file mode 100644 index 0000000000..464f26818f --- /dev/null +++ b/library/cpp/testing/unittest/fat/ya.make @@ -0,0 +1,17 @@ +UNITTEST() + +SRCS( + test_port_manager.cpp +) + +SIZE(LARGE) + +# We need to run tests at the same time on the single machine +FORK_SUBTESTS() + +TAG( + ya:fat + ya:force_sandbox +) + +END() diff --git a/library/cpp/testing/unittest/pytests/test_subject/ya.make b/library/cpp/testing/unittest/pytests/test_subject/ya.make new file mode 100644 index 0000000000..c9990b674f --- /dev/null +++ b/library/cpp/testing/unittest/pytests/test_subject/ya.make @@ -0,0 +1,13 @@ +UNITTEST() + +TAG(ya:manual) + +SRCS( + tests.cpp +) + +PEERDIR( + library/cpp/testing/unittest +) + +END() diff --git a/library/cpp/testing/unittest/pytests/ya.make b/library/cpp/testing/unittest/pytests/ya.make new file mode 100644 index 0000000000..bbc1c9dec3 --- /dev/null +++ b/library/cpp/testing/unittest/pytests/ya.make @@ -0,0 +1,21 @@ +PY3TEST() + +SIZE(MEDIUM) + +TEST_SRCS( + test_tear_down.py +) + +PEERDIR( + library/python/testing/yatest_common +) + +DEPENDS( + library/cpp/testing/unittest/pytests/test_subject +) + +END() + +RECURSE( + test_subject +) diff --git a/library/cpp/testing/unittest/ut/ya.make b/library/cpp/testing/unittest/ut/ya.make new file mode 100644 index 0000000000..86efa0d788 --- /dev/null +++ b/library/cpp/testing/unittest/ut/ya.make @@ -0,0 +1,8 @@ +UNITTEST_FOR(library/cpp/testing/unittest) + +SRCS( + main.cpp + registar_ut.cpp +) + +END() diff --git a/library/cpp/testing/unittest/ya.make b/library/cpp/testing/unittest/ya.make new file mode 100644 index 0000000000..74bc67e83f --- /dev/null +++ b/library/cpp/testing/unittest/ya.make @@ -0,0 +1,29 @@ +LIBRARY() + +PROVIDES(test_framework) + +PEERDIR( + library/cpp/colorizer + library/cpp/dbg_output + library/cpp/diff + library/cpp/json/writer + library/cpp/testing/common + library/cpp/testing/hook +) + +SRCS( + gtest.cpp + checks.cpp + plugin.cpp + registar.cpp + tests_data.cpp + utmain.cpp +) + +END() + +RECURSE_FOR_TESTS( + fat + pytests + ut +) diff --git a/library/cpp/testing/unittest_main/ya.make b/library/cpp/testing/unittest_main/ya.make new file mode 100644 index 0000000000..8502296143 --- /dev/null +++ b/library/cpp/testing/unittest_main/ya.make @@ -0,0 +1,12 @@ +LIBRARY() + +PEERDIR( + library/cpp/testing/unittest + library/cpp/terminate_handler +) + +SRCS( + main.cpp +) + +END() |