BUILD 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560
  1. # Copyright 2017 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. licenses(["notice"]) # Apache v2
  15. load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package")
  16. grpc_package(
  17. name = "test/cpp/end2end",
  18. visibility = "public",
  19. ) # Allows external users to implement end2end tests.
  20. grpc_cc_library(
  21. name = "test_service_impl",
  22. testonly = True,
  23. srcs = ["test_service_impl.cc"],
  24. hdrs = ["test_service_impl.h"],
  25. external_deps = [
  26. "gtest",
  27. ],
  28. deps = [
  29. "//src/proto/grpc/testing:echo_proto",
  30. "//test/cpp/util:test_util",
  31. ],
  32. )
  33. grpc_cc_test(
  34. name = "async_end2end_test",
  35. srcs = ["async_end2end_test.cc"],
  36. external_deps = [
  37. "gtest",
  38. ],
  39. deps = [
  40. "//:gpr",
  41. "//:grpc",
  42. "//:grpc++",
  43. "//src/proto/grpc/health/v1:health_proto",
  44. "//src/proto/grpc/testing:echo_messages_proto",
  45. "//src/proto/grpc/testing:echo_proto",
  46. "//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
  47. "//test/core/util:gpr_test_util",
  48. "//test/core/util:grpc_test_util",
  49. "//test/cpp/util:test_util",
  50. ],
  51. )
  52. grpc_cc_test(
  53. name = "client_crash_test",
  54. srcs = ["client_crash_test.cc"],
  55. data = [
  56. ":client_crash_test_server",
  57. ],
  58. external_deps = [
  59. "gtest",
  60. ],
  61. deps = [
  62. "//:gpr",
  63. "//:grpc",
  64. "//:grpc++",
  65. "//src/proto/grpc/testing:echo_messages_proto",
  66. "//src/proto/grpc/testing:echo_proto",
  67. "//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
  68. "//test/core/util:gpr_test_util",
  69. "//test/core/util:grpc_test_util",
  70. "//test/cpp/util:test_util",
  71. ],
  72. )
  73. grpc_cc_binary(
  74. name = "client_crash_test_server",
  75. testonly = True,
  76. srcs = ["client_crash_test_server.cc"],
  77. external_deps = [
  78. "gflags",
  79. "gtest",
  80. ],
  81. deps = [
  82. "//:gpr",
  83. "//:grpc",
  84. "//:grpc++",
  85. "//src/proto/grpc/testing:echo_messages_proto",
  86. "//src/proto/grpc/testing:echo_proto",
  87. "//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
  88. "//test/core/util:gpr_test_util",
  89. "//test/core/util:grpc_test_util",
  90. "//test/cpp/util:test_util",
  91. ],
  92. )
  93. grpc_cc_test(
  94. name = "client_callback_end2end_test",
  95. srcs = ["client_callback_end2end_test.cc"],
  96. external_deps = [
  97. "gtest",
  98. ],
  99. deps = [
  100. ":test_service_impl",
  101. "//:gpr",
  102. "//:grpc",
  103. "//:grpc++",
  104. "//src/proto/grpc/testing:echo_messages_proto",
  105. "//src/proto/grpc/testing:echo_proto",
  106. "//test/core/util:gpr_test_util",
  107. "//test/core/util:grpc_test_util",
  108. "//test/cpp/util:test_util",
  109. ],
  110. )
  111. grpc_cc_test(
  112. name = "client_interceptors_end2end_test",
  113. srcs = ["client_interceptors_end2end_test.cc"],
  114. external_deps = [
  115. "gtest",
  116. ],
  117. deps = [
  118. ":test_service_impl",
  119. "//:gpr",
  120. "//:grpc",
  121. "//:grpc++",
  122. "//src/proto/grpc/testing:echo_messages_proto",
  123. "//src/proto/grpc/testing:echo_proto",
  124. "//test/core/util:gpr_test_util",
  125. "//test/core/util:grpc_test_util",
  126. "//test/cpp/util:test_util",
  127. ],
  128. )
  129. grpc_cc_library(
  130. name = "end2end_test_lib",
  131. testonly = True,
  132. srcs = ["end2end_test.cc"],
  133. external_deps = [
  134. "gtest",
  135. ],
  136. deps = [
  137. ":test_service_impl",
  138. "//:gpr",
  139. "//:grpc",
  140. "//:grpc++",
  141. "//src/proto/grpc/testing:echo_messages_proto",
  142. "//src/proto/grpc/testing:echo_proto",
  143. "//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
  144. "//test/core/util:gpr_test_util",
  145. "//test/core/util:grpc_test_util",
  146. "//test/cpp/util:test_util",
  147. ],
  148. )
  149. grpc_cc_test(
  150. name = "channelz_service_test",
  151. srcs = ["channelz_service_test.cc"],
  152. external_deps = [
  153. "gtest",
  154. ],
  155. deps = [
  156. ":test_service_impl",
  157. "//:gpr",
  158. "//:grpc",
  159. "//:grpc++",
  160. "//:grpcpp_channelz",
  161. "//src/proto/grpc/channelz:channelz_proto",
  162. "//src/proto/grpc/testing:echo_messages_proto",
  163. "//src/proto/grpc/testing:echo_proto",
  164. "//test/core/util:gpr_test_util",
  165. "//test/core/util:grpc_test_util",
  166. "//test/cpp/util:test_util",
  167. ],
  168. )
  169. grpc_cc_test(
  170. name = "server_early_return_test",
  171. srcs = ["server_early_return_test.cc"],
  172. external_deps = [
  173. "gtest",
  174. ],
  175. deps = [
  176. "//:gpr",
  177. "//:grpc",
  178. "//:grpc++",
  179. "//src/proto/grpc/testing:echo_messages_proto",
  180. "//src/proto/grpc/testing:echo_proto",
  181. "//test/core/util:gpr_test_util",
  182. "//test/core/util:grpc_test_util",
  183. "//test/cpp/util:test_util",
  184. ],
  185. )
  186. grpc_cc_test(
  187. name = "end2end_test",
  188. deps = [
  189. ":end2end_test_lib",
  190. ],
  191. )
  192. grpc_cc_test(
  193. name = "exception_test",
  194. srcs = ["exception_test.cc"],
  195. external_deps = [
  196. "gtest",
  197. ],
  198. deps = [
  199. "//:gpr",
  200. "//:grpc",
  201. "//:grpc++",
  202. "//src/proto/grpc/testing:echo_messages_proto",
  203. "//src/proto/grpc/testing:echo_proto",
  204. "//test/core/util:gpr_test_util",
  205. "//test/core/util:grpc_test_util",
  206. "//test/cpp/util:test_util",
  207. ],
  208. )
  209. grpc_cc_test(
  210. name = "filter_end2end_test",
  211. srcs = ["filter_end2end_test.cc"],
  212. external_deps = [
  213. "gtest",
  214. ],
  215. deps = [
  216. "//:gpr",
  217. "//:grpc",
  218. "//:grpc++",
  219. "//src/proto/grpc/testing:echo_messages_proto",
  220. "//src/proto/grpc/testing:echo_proto",
  221. "//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
  222. "//test/core/util:gpr_test_util",
  223. "//test/core/util:grpc_test_util",
  224. "//test/cpp/util:test_util",
  225. ],
  226. )
  227. grpc_cc_test(
  228. name = "generic_end2end_test",
  229. srcs = ["generic_end2end_test.cc"],
  230. external_deps = [
  231. "gtest",
  232. ],
  233. deps = [
  234. "//:gpr",
  235. "//:grpc",
  236. "//:grpc++",
  237. "//src/proto/grpc/testing:echo_messages_proto",
  238. "//src/proto/grpc/testing:echo_proto",
  239. "//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
  240. "//test/core/util:gpr_test_util",
  241. "//test/core/util:grpc_test_util",
  242. "//test/cpp/util:test_util",
  243. ],
  244. )
  245. grpc_cc_test(
  246. name = "health_service_end2end_test",
  247. srcs = ["health_service_end2end_test.cc"],
  248. external_deps = [
  249. "gtest",
  250. ],
  251. deps = [
  252. ":test_service_impl",
  253. "//:gpr",
  254. "//:grpc",
  255. "//:grpc++",
  256. "//src/proto/grpc/health/v1:health_proto",
  257. "//src/proto/grpc/testing:echo_messages_proto",
  258. "//src/proto/grpc/testing:echo_proto",
  259. "//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
  260. "//test/core/util:gpr_test_util",
  261. "//test/core/util:grpc_test_util",
  262. "//test/cpp/util:test_util",
  263. ],
  264. )
  265. grpc_cc_test(
  266. name = "hybrid_end2end_test",
  267. srcs = ["hybrid_end2end_test.cc"],
  268. external_deps = [
  269. "gtest",
  270. ],
  271. deps = [
  272. ":test_service_impl",
  273. "//:gpr",
  274. "//:grpc",
  275. "//:grpc++",
  276. "//src/proto/grpc/testing:echo_messages_proto",
  277. "//src/proto/grpc/testing:echo_proto",
  278. "//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
  279. "//test/core/util:gpr_test_util",
  280. "//test/core/util:grpc_test_util",
  281. "//test/cpp/util:test_util",
  282. ],
  283. )
  284. grpc_cc_test(
  285. name = "raw_end2end_test",
  286. srcs = ["raw_end2end_test.cc"],
  287. external_deps = [
  288. "gtest",
  289. ],
  290. deps = [
  291. ":test_service_impl",
  292. "//:gpr",
  293. "//:grpc",
  294. "//:grpc++",
  295. "//src/proto/grpc/testing:echo_messages_proto",
  296. "//src/proto/grpc/testing:echo_proto",
  297. "//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
  298. "//test/core/util:gpr_test_util",
  299. "//test/core/util:grpc_test_util",
  300. "//test/cpp/util:test_util",
  301. ],
  302. )
  303. grpc_cc_test(
  304. name = "mock_test",
  305. srcs = ["mock_test.cc"],
  306. external_deps = [
  307. "gmock",
  308. "gtest",
  309. ],
  310. deps = [
  311. "//:gpr",
  312. "//:grpc",
  313. "//:grpc++",
  314. "//:grpc++_test",
  315. "//src/proto/grpc/testing:echo_messages_proto",
  316. "//src/proto/grpc/testing:echo_proto",
  317. "//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
  318. "//test/core/util:gpr_test_util",
  319. "//test/core/util:grpc_test_util",
  320. "//test/cpp/util:test_util",
  321. ],
  322. )
  323. grpc_cc_test(
  324. name = "nonblocking_test",
  325. srcs = ["nonblocking_test.cc"],
  326. external_deps = [
  327. "gtest",
  328. ],
  329. deps = [
  330. "//:gpr",
  331. "//:grpc",
  332. "//:grpc++",
  333. "//src/proto/grpc/testing:echo_messages_proto",
  334. "//src/proto/grpc/testing:echo_proto",
  335. "//test/core/util:gpr_test_util",
  336. "//test/core/util:grpc_test_util",
  337. "//test/cpp/util:test_util",
  338. ],
  339. )
  340. grpc_cc_test(
  341. name = "client_lb_end2end_test",
  342. srcs = ["client_lb_end2end_test.cc"],
  343. external_deps = [
  344. "gtest",
  345. ],
  346. deps = [
  347. ":test_service_impl",
  348. "//:gpr",
  349. "//:grpc",
  350. "//:grpc++",
  351. "//src/proto/grpc/testing:echo_messages_proto",
  352. "//src/proto/grpc/testing:echo_proto",
  353. "//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
  354. "//test/core/util:gpr_test_util",
  355. "//test/core/util:grpc_test_util",
  356. "//test/cpp/util:test_util",
  357. ],
  358. )
  359. grpc_cc_test(
  360. name = "grpclb_end2end_test",
  361. srcs = ["grpclb_end2end_test.cc"],
  362. external_deps = [
  363. "gmock",
  364. "gtest",
  365. ],
  366. deps = [
  367. ":test_service_impl",
  368. "//:gpr",
  369. "//:grpc",
  370. "//:grpc++",
  371. "//:grpc_resolver_fake",
  372. "//src/proto/grpc/lb/v1:load_balancer_proto",
  373. "//src/proto/grpc/testing:echo_messages_proto",
  374. "//src/proto/grpc/testing:echo_proto",
  375. "//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
  376. "//test/core/util:gpr_test_util",
  377. "//test/core/util:grpc_test_util",
  378. "//test/cpp/util:test_util",
  379. ],
  380. )
  381. grpc_cc_test(
  382. name = "proto_server_reflection_test",
  383. srcs = ["proto_server_reflection_test.cc"],
  384. external_deps = [
  385. "gtest",
  386. "gflags",
  387. ],
  388. deps = [
  389. ":test_service_impl",
  390. "//:gpr",
  391. "//:grpc",
  392. "//:grpc++",
  393. "//:grpc++_reflection",
  394. "//src/proto/grpc/testing:echo_messages_proto",
  395. "//src/proto/grpc/testing:echo_proto",
  396. "//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
  397. "//test/core/util:gpr_test_util",
  398. "//test/core/util:grpc_test_util",
  399. "//test/cpp/util:grpc++_proto_reflection_desc_db",
  400. "//test/cpp/util:test_util",
  401. ],
  402. )
  403. grpc_cc_test(
  404. name = "server_builder_plugin_test",
  405. srcs = ["server_builder_plugin_test.cc"],
  406. external_deps = [
  407. "gtest",
  408. ],
  409. deps = [
  410. ":test_service_impl",
  411. "//:gpr",
  412. "//:grpc",
  413. "//:grpc++",
  414. "//src/proto/grpc/testing:echo_messages_proto",
  415. "//src/proto/grpc/testing:echo_proto",
  416. "//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
  417. "//test/core/util:gpr_test_util",
  418. "//test/core/util:grpc_test_util",
  419. "//test/cpp/util:test_util",
  420. ],
  421. )
  422. grpc_cc_test(
  423. name = "server_crash_test",
  424. srcs = ["server_crash_test.cc"],
  425. data = [
  426. ":server_crash_test_client",
  427. ],
  428. external_deps = [
  429. "gtest",
  430. ],
  431. deps = [
  432. "//:gpr",
  433. "//:grpc",
  434. "//:grpc++",
  435. "//src/proto/grpc/testing:echo_messages_proto",
  436. "//src/proto/grpc/testing:echo_proto",
  437. "//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
  438. "//test/core/util:gpr_test_util",
  439. "//test/core/util:grpc_test_util",
  440. "//test/cpp/util:test_util",
  441. ],
  442. )
  443. grpc_cc_binary(
  444. name = "server_crash_test_client",
  445. testonly = True,
  446. srcs = ["server_crash_test_client.cc"],
  447. external_deps = [
  448. "gflags",
  449. "gtest",
  450. ],
  451. deps = [
  452. "//:gpr",
  453. "//:grpc",
  454. "//:grpc++",
  455. "//src/proto/grpc/testing:echo_messages_proto",
  456. "//src/proto/grpc/testing:echo_proto",
  457. "//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
  458. "//test/core/util:gpr_test_util",
  459. "//test/core/util:grpc_test_util",
  460. "//test/cpp/util:test_util",
  461. ],
  462. )
  463. grpc_cc_test(
  464. name = "server_load_reporting_end2end_test",
  465. srcs = ["server_load_reporting_end2end_test.cc"],
  466. external_deps = [
  467. "gtest",
  468. "gmock",
  469. ],
  470. deps = [
  471. "//:grpcpp_server_load_reporting",
  472. "//src/proto/grpc/testing:echo_proto",
  473. "//test/cpp/util:test_util",
  474. ],
  475. )
  476. grpc_cc_test(
  477. name = "shutdown_test",
  478. srcs = ["shutdown_test.cc"],
  479. external_deps = [
  480. "gtest",
  481. ],
  482. deps = [
  483. "//:gpr",
  484. "//:grpc",
  485. "//:grpc++",
  486. "//src/proto/grpc/testing:echo_messages_proto",
  487. "//src/proto/grpc/testing:echo_proto",
  488. "//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
  489. "//test/core/util:gpr_test_util",
  490. "//test/core/util:grpc_test_util",
  491. "//test/cpp/util:test_util",
  492. ],
  493. )
  494. grpc_cc_test(
  495. name = "streaming_throughput_test",
  496. srcs = ["streaming_throughput_test.cc"],
  497. external_deps = [
  498. "gtest",
  499. ],
  500. deps = [
  501. "//:gpr",
  502. "//:grpc",
  503. "//:grpc++",
  504. "//src/proto/grpc/testing:echo_messages_proto",
  505. "//src/proto/grpc/testing:echo_proto",
  506. "//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
  507. "//test/core/util:gpr_test_util",
  508. "//test/core/util:grpc_test_util",
  509. "//test/cpp/util:test_util",
  510. ],
  511. )
  512. grpc_cc_test(
  513. name = "thread_stress_test",
  514. srcs = ["thread_stress_test.cc"],
  515. external_deps = [
  516. "gtest",
  517. ],
  518. deps = [
  519. "//:gpr",
  520. "//:grpc",
  521. "//:grpc++",
  522. "//src/proto/grpc/testing:echo_messages_proto",
  523. "//src/proto/grpc/testing:echo_proto",
  524. "//src/proto/grpc/testing/duplicate:echo_duplicate_proto",
  525. "//test/core/util:gpr_test_util",
  526. "//test/core/util:grpc_test_util",
  527. "//test/cpp/util:test_util",
  528. ],
  529. )