diff options
author | 2018-02-02 09:12:11 -0800 | |
---|---|---|
committer | 2018-02-02 09:12:11 -0800 | |
commit | 4c0640ebd65f2661664f882c673707c1c5807ccd (patch) | |
tree | 4a002106829115e970939568154ed0175e337572 /test/cpp/util | |
parent | 0dbb00eef0e53c87dcd6958839ec0d532cdf858c (diff) | |
parent | e5b0a504167fbc6277d034709aa29ea07fa09a00 (diff) |
Merge branch 'master' into gpr_review3
Diffstat (limited to 'test/cpp/util')
-rw-r--r-- | test/cpp/util/BUILD | 4 | ||||
-rw-r--r-- | test/cpp/util/grpc_tool_test.cc | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/test/cpp/util/BUILD b/test/cpp/util/BUILD index 8818999a50..d092ba348e 100644 --- a/test/cpp/util/BUILD +++ b/test/cpp/util/BUILD @@ -142,6 +142,10 @@ grpc_cc_test( srcs = [ "grpc_tool_test.cc", ], + data = [ + "//src/proto/grpc/testing:echo.proto", + "//src/proto/grpc/testing:echo_messages.proto" + ], deps = [ ":grpc_cli_libs", ":test_util", diff --git a/test/cpp/util/grpc_tool_test.cc b/test/cpp/util/grpc_tool_test.cc index 0b599f4eeb..135cfdc1f3 100644 --- a/test/cpp/util/grpc_tool_test.cc +++ b/test/cpp/util/grpc_tool_test.cc @@ -31,6 +31,7 @@ #include <grpc/grpc.h> #include <gtest/gtest.h> +#include "src/core/lib/gpr/env.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "src/proto/grpc/testing/echo.pb.h" #include "test/core/util/port.h" @@ -87,6 +88,7 @@ DECLARE_bool(l); DECLARE_bool(batch); DECLARE_string(metadata); DECLARE_string(protofiles); +DECLARE_string(proto_path); namespace { @@ -707,6 +709,10 @@ TEST_F(GrpcToolTest, CallCommandWithBadMetadata) { const char* argv[] = {"grpc_cli", "call", "localhost:10000", "Echo", "message: 'Hello'"}; FLAGS_protofiles = "src/proto/grpc/testing/echo.proto"; + char* test_srcdir = gpr_getenv("TEST_SRCDIR"); + if (test_srcdir != nullptr) { + FLAGS_proto_path = test_srcdir + std::string("/com_github_grpc_grpc"); + } { std::stringstream output_stream; |