more sanity

trying to fix some sanity

nope that didn't work

fixing test failiures

added debug code

more trail and error

more trial and error

cleaning debug code
pull/10644/head
Mahak Mukhi 8 years ago
parent c5eee16814
commit a68829023c
  1. 1
      CMakeLists.txt
  2. 6
      bazel/generate_cc.bzl
  3. 6
      build.yaml
  4. 4
      test/cpp/codegen/golden_file_test.cc
  5. 3
      tools/run_tests/generated/sources_and_headers.json
  6. 2
      tools/run_tests/generated/tests.json
  7. 2
      vsprojects/vcxproj/test/golden_file_test/golden_file_test.vcxproj

@ -10082,6 +10082,7 @@ add_executable(golden_file_test
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/compiler_test.grpc.pb.cc
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/compiler_test.pb.h
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/compiler_test.grpc.pb.h
${_gRPC_PROTO_GENS_DIR}/src/proto/grpc/testing/compiler_test_mock.grpc.pb.h
test/cpp/codegen/golden_file_test.cc
third_party/googletest/googletest/src/gtest-all.cc
)

@ -23,10 +23,10 @@ def generate_cc_impl(ctx):
arguments = []
if ctx.executable.plugin:
arguments += ["--plugin=protoc-gen-PLUGIN=" + ctx.executable.plugin.path]
arguments += ["--PLUGIN_out=" + ",".join(ctx.attr.flags)]
gen_mock = ""
if ctx.attr.generate_mock:
arguments += [",generate_mock_code=true"]
arguments += [":" + dir_out]
gen_mock = ",generate_mock_code=true"
arguments += ["--PLUGIN_out=" + gen_mock + ",".join(ctx.attr.flags) + ":" + dir_out]
additional_input = [ctx.executable.plugin]
else:
arguments += ["--cpp_out=" + ",".join(ctx.attr.flags) + ":" + dir_out]

@ -948,8 +948,8 @@ filegroups:
- name: grpc++_test
language: c++
public_headers:
- include/grpc++/test/server_context_test_spouse.h
- include/grpc++/test/mock_stream.h
- include/grpc++/test/server_context_test_spouse.h
deps:
- grpc++
- name: thrift_util
@ -3630,7 +3630,7 @@ targets:
- grpc
- gpr
args:
- --generated_file_path=gens/src/proto/grpc/testing
- --generated_file_path=gens/src/proto/grpc/testing/
- name: grpc_cli
build: test
run: false
@ -3891,6 +3891,8 @@ targets:
gtest: true
build: test
language: c++
headers:
- include/grpc++/test/mock_stream.h
src:
- test/cpp/end2end/mock_test.cc
deps:

@ -76,7 +76,9 @@ TEST(GoldenMockFileTest, TestGeneratedMockFile) {
int main(int argc, char **argv) {
::testing::InitGoogleTest(&argc, argv);
::google::ParseCommandLineFlags(&argc, &argv, true);
if (FLAGS_generated_file_path.empty()) return 1;
if (FLAGS_generated_file_path.empty()) {
FLAGS_generated_file_path = "gens/src/proto/grpc/testing/";
}
if (FLAGS_generated_file_path.back() != '/')
FLAGS_generated_file_path.append("/");
return RUN_ALL_TESTS();

@ -3031,6 +3031,7 @@
],
"headers": [
"src/proto/grpc/testing/compiler_test.grpc.pb.h",
"src/proto/grpc/testing/compiler_test_mock.grpc.pb.h",
"src/proto/grpc/testing/compiler_test.pb.h"
],
"is_filegroup": false,
@ -8933,12 +8934,14 @@
"grpc++"
],
"headers": [
"include/grpc++/test/mock_stream.h",
"include/grpc++/test/server_context_test_spouse.h"
],
"is_filegroup": true,
"language": "c++",
"name": "grpc++_test",
"src": [
"include/grpc++/test/mock_stream.h",
"include/grpc++/test/server_context_test_spouse.h"
],
"third_party": false,

@ -3263,7 +3263,7 @@
},
{
"args": [
"--generated_file_path=gens/src/proto/grpc/testing/compiler_test.grpc.pb.h"
"--generated_file_path=gens/src/proto/grpc/testing/"
],
"ci_platforms": [
"linux",

@ -168,6 +168,8 @@
</ClCompile>
<ClInclude Include="$(SolutionDir)\..\src\proto\grpc\testing\compiler_test.grpc.pb.h">
</ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\proto\grpc\testing\compiler_test_mock.grpc.pb.h">
</ClInclude>
<ClCompile Include="$(SolutionDir)\..\test\cpp\codegen\golden_file_test.cc">
</ClCompile>
</ItemGroup>

Loading…
Cancel
Save