aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Nicolas Noble <nicolasnoble@users.noreply.github.com>2017-09-05 11:22:56 -0700
committerGravatar GitHub <noreply@github.com>2017-09-05 11:22:56 -0700
commit96a902fb72727efcd761942238b8da65894221b1 (patch)
tree6ae7c78a353967e512e0e76922fd1727c8f065e2
parent4190f39afb5159488571b92292da892509020968 (diff)
parentfc49d6edabf6d85af514d94ab71e443a05ce6c41 (diff)
Merge pull request #12373 from nicolasnoble/gtest_is_not_gmock
Splitting gmock out of gtest.
-rw-r--r--WORKSPACE5
-rw-r--r--test/cpp/end2end/BUILD2
-rw-r--r--third_party/gtest.BUILD32
3 files changed, 35 insertions, 4 deletions
diff --git a/WORKSPACE b/WORKSPACE
index 82ea99f04b..bfb3a8c903 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -39,6 +39,11 @@ bind(
)
bind(
+ name = "gmock",
+ actual = "@submodule_gtest//:gmock",
+)
+
+bind(
name = "benchmark",
actual = "@submodule_benchmark//:benchmark",
)
diff --git a/test/cpp/end2end/BUILD b/test/cpp/end2end/BUILD
index b8505c1ae7..b29a13d4fb 100644
--- a/test/cpp/end2end/BUILD
+++ b/test/cpp/end2end/BUILD
@@ -193,6 +193,7 @@ grpc_cc_test(
"//test/cpp/util:test_util",
],
external_deps = [
+ "gmock",
"gtest",
],
)
@@ -235,6 +236,7 @@ grpc_cc_test(
"//test/cpp/util:test_util",
],
external_deps = [
+ "gmock",
"gtest",
],
)
diff --git a/third_party/gtest.BUILD b/third_party/gtest.BUILD
index b70f2c51bc..f38bfd8d45 100644
--- a/third_party/gtest.BUILD
+++ b/third_party/gtest.BUILD
@@ -2,14 +2,38 @@ cc_library(
name = "gtest",
srcs = [
"googletest/src/gtest-all.cc",
- "googlemock/src/gmock-all.cc"
],
- hdrs = glob(["googletest/include/**/*.h", "googletest/src/*.cc", "googletest/src/*.h", "googlemock/include/**/*.h", "googlemock/src/*.cc", "googlemock/src/*.h"]),
+ hdrs = glob([
+ "googletest/include/**/*.h",
+ "googletest/src/*.cc",
+ "googletest/src/*.h",
+ ]),
includes = [
"googletest",
"googletest/include",
- "googlemock",
- "googlemock/include",
+ ],
+ linkstatic = 1,
+ visibility = [
+ "//visibility:public",
+ ],
+)
+
+cc_library(
+ name = "gmock",
+ srcs = [
+ "googlemock/src/gmock-all.cc"
+ ],
+ hdrs = glob([
+ "googlemock/include/**/*.h",
+ "googlemock/src/*.cc",
+ "googlemock/src/*.h"
+ ]),
+ includes = [
+ "googlemock",
+ "googlemock/include",
+ ],
+ deps = [
+ ":gtest",
],
linkstatic = 1,
visibility = [