BUILD 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. # Copyright 2021 gRPC authors.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_package")
  15. load("//test/core/util:grpc_fuzzer.bzl", "grpc_proto_fuzzer")
  16. licenses(["notice"])
  17. grpc_package(name = "test/core/resource_quota")
  18. grpc_cc_library(
  19. name = "call_checker",
  20. testonly = True,
  21. hdrs = ["call_checker.h"],
  22. language = "c++",
  23. deps = ["//:gpr"],
  24. )
  25. grpc_cc_test(
  26. name = "memory_quota_test",
  27. srcs = ["memory_quota_test.cc"],
  28. external_deps = [
  29. "gtest",
  30. ],
  31. language = "c++",
  32. uses_polling = False,
  33. deps = [
  34. "call_checker",
  35. "//:memory_quota",
  36. "//test/core/util:grpc_suppressions",
  37. ],
  38. )
  39. grpc_cc_test(
  40. name = "thread_quota_test",
  41. srcs = ["thread_quota_test.cc"],
  42. external_deps = [
  43. "gtest",
  44. ],
  45. language = "c++",
  46. uses_polling = False,
  47. deps = [
  48. "//:thread_quota",
  49. "//test/core/util:grpc_suppressions",
  50. ],
  51. )
  52. grpc_cc_test(
  53. name = "resource_quota_test",
  54. srcs = ["resource_quota_test.cc"],
  55. external_deps = [
  56. "gtest",
  57. ],
  58. language = "c++",
  59. uses_polling = False,
  60. deps = [
  61. "//:resource_quota",
  62. "//test/core/util:grpc_suppressions",
  63. ],
  64. )
  65. grpc_cc_test(
  66. name = "memory_quota_stress_test",
  67. srcs = ["memory_quota_stress_test.cc"],
  68. language = "c++",
  69. # We only run this test under Linux, and really only care about the
  70. # TSAN results.
  71. tags = [
  72. "no_mac",
  73. "no_windows",
  74. ],
  75. uses_polling = False,
  76. deps = [
  77. "//:memory_quota",
  78. "//test/core/util:grpc_suppressions",
  79. ],
  80. )
  81. grpc_proto_fuzzer(
  82. name = "memory_quota_fuzzer",
  83. srcs = ["memory_quota_fuzzer.cc"],
  84. corpus = "memory_quota_fuzzer_corpus",
  85. language = "C++",
  86. proto = "memory_quota_fuzzer.proto",
  87. tags = ["no_windows"],
  88. uses_polling = False,
  89. deps = [
  90. "call_checker",
  91. "//:memory_quota",
  92. "//test/core/util:grpc_test_util",
  93. ],
  94. )