From 0cc1341199c73d775078e51ef77d00af8d935983 Mon Sep 17 00:00:00 2001 From: vjpai <vpai@google.com> Date: Mon, 19 Oct 2015 12:21:45 -0700 Subject: [PATCH] Move qpstest.proto to a common area (test/proto) instead of test/cpp/qps --- Makefile | 52 +++++++++++----------- build.yaml | 2 +- test/cpp/qps/client.h | 2 +- test/cpp/qps/client_async.cc | 2 +- test/cpp/qps/client_sync.cc | 2 +- test/cpp/qps/driver.h | 2 +- test/cpp/qps/histogram.h | 2 +- test/cpp/qps/perf_db.proto | 2 +- test/cpp/qps/qps_worker.cc | 2 +- test/cpp/qps/report.h | 2 +- test/cpp/qps/server.h | 2 +- test/cpp/qps/server_async.cc | 2 +- test/cpp/qps/server_sync.cc | 2 +- test/{cpp/qps => proto}/qpstest.proto | 0 tools/run_tests/sources_and_headers.json | 6 +-- vsprojects/vcxproj/qps/qps.vcxproj | 8 ++-- vsprojects/vcxproj/qps/qps.vcxproj.filters | 7 ++- 17 files changed, 50 insertions(+), 47 deletions(-) rename test/{cpp/qps => proto}/qpstest.proto (100%) diff --git a/Makefile b/Makefile index e64a587a8d..6a1049e675 100644 --- a/Makefile +++ b/Makefile @@ -3510,21 +3510,6 @@ $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc: test/cpp/qps/perf_db.proto $(PROTOBUF $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif -ifeq ($(NO_PROTOC),true) -$(GENDIR)/test/cpp/qps/qpstest.pb.cc: protoc_dep_error -$(GENDIR)/test/cpp/qps/qpstest.grpc.pb.cc: protoc_dep_error -else -$(GENDIR)/test/cpp/qps/qpstest.pb.cc: test/cpp/qps/qpstest.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) - $(E) "[PROTOC] Generating protobuf CC file from $<" - $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< - -$(GENDIR)/test/cpp/qps/qpstest.grpc.pb.cc: test/cpp/qps/qpstest.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) - $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" - $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< -endif - ifeq ($(NO_PROTOC),true) $(GENDIR)/test/cpp/util/echo.pb.cc: protoc_dep_error $(GENDIR)/test/cpp/util/echo.grpc.pb.cc: protoc_dep_error @@ -3600,6 +3585,21 @@ $(GENDIR)/test/proto/messages.grpc.pb.cc: test/proto/messages.proto $(PROTOBUF_D $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif +ifeq ($(NO_PROTOC),true) +$(GENDIR)/test/proto/qpstest.pb.cc: protoc_dep_error +$(GENDIR)/test/proto/qpstest.grpc.pb.cc: protoc_dep_error +else +$(GENDIR)/test/proto/qpstest.pb.cc: test/proto/qpstest.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) + $(E) "[PROTOC] Generating protobuf CC file from $<" + $(Q) mkdir -p `dirname $@` + $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< + +$(GENDIR)/test/proto/qpstest.grpc.pb.cc: test/proto/qpstest.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) + $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" + $(Q) mkdir -p `dirname $@` + $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< +endif + ifeq ($(NO_PROTOC),true) $(GENDIR)/test/proto/test.pb.cc: protoc_dep_error $(GENDIR)/test/proto/test.grpc.pb.cc: protoc_dep_error @@ -5187,7 +5187,7 @@ $(OBJDIR)/$(CONFIG)/test/cpp/interop/server.o: $(GENDIR)/test/proto/empty.pb.cc LIBQPS_SRC = \ - $(GENDIR)/test/cpp/qps/qpstest.pb.cc $(GENDIR)/test/cpp/qps/qpstest.grpc.pb.cc \ + $(GENDIR)/test/proto/qpstest.pb.cc $(GENDIR)/test/proto/qpstest.grpc.pb.cc \ $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc \ test/cpp/qps/client_async.cc \ test/cpp/qps/client_sync.cc \ @@ -5242,16 +5242,16 @@ ifneq ($(NO_DEPS),true) -include $(LIBQPS_OBJS:.o=.dep) endif endif -$(OBJDIR)/$(CONFIG)/test/cpp/qps/client_async.o: $(GENDIR)/test/cpp/qps/qpstest.pb.cc $(GENDIR)/test/cpp/qps/qpstest.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/client_sync.o: $(GENDIR)/test/cpp/qps/qpstest.pb.cc $(GENDIR)/test/cpp/qps/qpstest.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/driver.o: $(GENDIR)/test/cpp/qps/qpstest.pb.cc $(GENDIR)/test/cpp/qps/qpstest.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/perf_db_client.o: $(GENDIR)/test/cpp/qps/qpstest.pb.cc $(GENDIR)/test/cpp/qps/qpstest.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/qps_worker.o: $(GENDIR)/test/cpp/qps/qpstest.pb.cc $(GENDIR)/test/cpp/qps/qpstest.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/report.o: $(GENDIR)/test/cpp/qps/qpstest.pb.cc $(GENDIR)/test/cpp/qps/qpstest.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/server_async.o: $(GENDIR)/test/cpp/qps/qpstest.pb.cc $(GENDIR)/test/cpp/qps/qpstest.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/server_sync.o: $(GENDIR)/test/cpp/qps/qpstest.pb.cc $(GENDIR)/test/cpp/qps/qpstest.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/qps/timer.o: $(GENDIR)/test/cpp/qps/qpstest.pb.cc $(GENDIR)/test/cpp/qps/qpstest.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc -$(OBJDIR)/$(CONFIG)/test/cpp/util/benchmark_config.o: $(GENDIR)/test/cpp/qps/qpstest.pb.cc $(GENDIR)/test/cpp/qps/qpstest.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/client_async.o: $(GENDIR)/test/proto/qpstest.pb.cc $(GENDIR)/test/proto/qpstest.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/client_sync.o: $(GENDIR)/test/proto/qpstest.pb.cc $(GENDIR)/test/proto/qpstest.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/driver.o: $(GENDIR)/test/proto/qpstest.pb.cc $(GENDIR)/test/proto/qpstest.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/perf_db_client.o: $(GENDIR)/test/proto/qpstest.pb.cc $(GENDIR)/test/proto/qpstest.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/qps_worker.o: $(GENDIR)/test/proto/qpstest.pb.cc $(GENDIR)/test/proto/qpstest.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/report.o: $(GENDIR)/test/proto/qpstest.pb.cc $(GENDIR)/test/proto/qpstest.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/server_async.o: $(GENDIR)/test/proto/qpstest.pb.cc $(GENDIR)/test/proto/qpstest.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/server_sync.o: $(GENDIR)/test/proto/qpstest.pb.cc $(GENDIR)/test/proto/qpstest.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/timer.o: $(GENDIR)/test/proto/qpstest.pb.cc $(GENDIR)/test/proto/qpstest.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/util/benchmark_config.o: $(GENDIR)/test/proto/qpstest.pb.cc $(GENDIR)/test/proto/qpstest.grpc.pb.cc $(GENDIR)/test/cpp/qps/perf_db.pb.cc $(GENDIR)/test/cpp/qps/perf_db.grpc.pb.cc LIBGRPC_CSHARP_EXT_SRC = \ diff --git a/build.yaml b/build.yaml index ca343cf509..28311372e4 100644 --- a/build.yaml +++ b/build.yaml @@ -747,7 +747,7 @@ libs: - test/cpp/qps/timer.h - test/cpp/util/benchmark_config.h src: - - test/cpp/qps/qpstest.proto + - test/proto/qpstest.proto - test/cpp/qps/perf_db.proto - test/cpp/qps/client_async.cc - test/cpp/qps/client_sync.cc diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h index 0f95cfea38..cd8b34f65b 100644 --- a/test/cpp/qps/client.h +++ b/test/cpp/qps/client.h @@ -40,7 +40,7 @@ #include "test/cpp/qps/histogram.h" #include "test/cpp/qps/interarrival.h" #include "test/cpp/qps/timer.h" -#include "test/cpp/qps/qpstest.grpc.pb.h" +#include "test/proto/qpstest.grpc.pb.h" #include "test/cpp/util/create_test_channel.h" namespace grpc { diff --git a/test/cpp/qps/client_async.cc b/test/cpp/qps/client_async.cc index f779e4a577..9ed42b7db6 100644 --- a/test/cpp/qps/client_async.cc +++ b/test/cpp/qps/client_async.cc @@ -48,7 +48,7 @@ #include <gflags/gflags.h> #include <grpc++/client_context.h> -#include "test/cpp/qps/qpstest.grpc.pb.h" +#include "test/proto/qpstest.grpc.pb.h" #include "test/cpp/qps/timer.h" #include "test/cpp/qps/client.h" #include "test/cpp/util/create_test_channel.h" diff --git a/test/cpp/qps/client_sync.cc b/test/cpp/qps/client_sync.cc index 3c33a1c5de..ed4134c743 100644 --- a/test/cpp/qps/client_sync.cc +++ b/test/cpp/qps/client_sync.cc @@ -54,7 +54,7 @@ #include "test/cpp/util/create_test_channel.h" #include "test/cpp/qps/client.h" -#include "test/cpp/qps/qpstest.grpc.pb.h" +#include "test/proto/qpstest.grpc.pb.h" #include "test/cpp/qps/histogram.h" #include "test/cpp/qps/interarrival.h" #include "test/cpp/qps/timer.h" diff --git a/test/cpp/qps/driver.h b/test/cpp/qps/driver.h index 9a29df8d49..6116aa656a 100644 --- a/test/cpp/qps/driver.h +++ b/test/cpp/qps/driver.h @@ -37,7 +37,7 @@ #include <memory> #include "test/cpp/qps/histogram.h" -#include "test/cpp/qps/qpstest.grpc.pb.h" +#include "test/proto/qpstest.grpc.pb.h" namespace grpc { namespace testing { diff --git a/test/cpp/qps/histogram.h b/test/cpp/qps/histogram.h index 0547b7283a..1151cca87c 100644 --- a/test/cpp/qps/histogram.h +++ b/test/cpp/qps/histogram.h @@ -35,7 +35,7 @@ #define TEST_QPS_HISTOGRAM_H #include <grpc/support/histogram.h> -#include "test/cpp/qps/qpstest.grpc.pb.h" +#include "test/proto/qpstest.grpc.pb.h" namespace grpc { namespace testing { diff --git a/test/cpp/qps/perf_db.proto b/test/cpp/qps/perf_db.proto index 60e038406a..7ae5cfe86e 100644 --- a/test/cpp/qps/perf_db.proto +++ b/test/cpp/qps/perf_db.proto @@ -29,7 +29,7 @@ syntax = "proto3"; -import "test/cpp/qps/qpstest.proto"; +import "test/proto/qpstest.proto"; package grpc.testing; diff --git a/test/cpp/qps/qps_worker.cc b/test/cpp/qps/qps_worker.cc index d19499be43..4ce77f366d 100644 --- a/test/cpp/qps/qps_worker.cc +++ b/test/cpp/qps/qps_worker.cc @@ -52,7 +52,7 @@ #include <grpc++/security/server_credentials.h> #include "test/core/util/grpc_profiler.h" -#include "test/cpp/qps/qpstest.pb.h" +#include "test/proto/qpstest.pb.h" #include "test/cpp/qps/client.h" #include "test/cpp/qps/server.h" #include "test/cpp/util/create_test_channel.h" diff --git a/test/cpp/qps/report.h b/test/cpp/qps/report.h index 5914fc4e30..00d12369d5 100644 --- a/test/cpp/qps/report.h +++ b/test/cpp/qps/report.h @@ -41,7 +41,7 @@ #include <grpc++/support/config.h> #include "test/cpp/qps/driver.h" -#include "test/cpp/qps/qpstest.grpc.pb.h" +#include "test/proto/qpstest.grpc.pb.h" #include "test/cpp/qps/perf_db_client.h" namespace grpc { diff --git a/test/cpp/qps/server.h b/test/cpp/qps/server.h index 68e0115410..e48e873dc3 100644 --- a/test/cpp/qps/server.h +++ b/test/cpp/qps/server.h @@ -35,7 +35,7 @@ #define TEST_QPS_SERVER_H #include "test/cpp/qps/timer.h" -#include "test/cpp/qps/qpstest.grpc.pb.h" +#include "test/proto/qpstest.grpc.pb.h" namespace grpc { namespace testing { diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc index 76575e42da..98fa9c53e2 100644 --- a/test/cpp/qps/server_async.cc +++ b/test/cpp/qps/server_async.cc @@ -49,7 +49,7 @@ #include <grpc++/security/server_credentials.h> #include <gtest/gtest.h> -#include "test/cpp/qps/qpstest.grpc.pb.h" +#include "test/proto/qpstest.grpc.pb.h" #include "test/cpp/qps/server.h" namespace grpc { diff --git a/test/cpp/qps/server_sync.cc b/test/cpp/qps/server_sync.cc index dfaa760617..b760ef63ec 100644 --- a/test/cpp/qps/server_sync.cc +++ b/test/cpp/qps/server_sync.cc @@ -43,7 +43,7 @@ #include <grpc++/server_context.h> #include <grpc++/security/server_credentials.h> -#include "test/cpp/qps/qpstest.grpc.pb.h" +#include "test/proto/qpstest.grpc.pb.h" #include "test/cpp/qps/server.h" #include "test/cpp/qps/timer.h" diff --git a/test/cpp/qps/qpstest.proto b/test/proto/qpstest.proto similarity index 100% rename from test/cpp/qps/qpstest.proto rename to test/proto/qpstest.proto diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index b4e190d96d..5f41036f89 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -13645,13 +13645,13 @@ "test/cpp/qps/perf_db.pb.h", "test/cpp/qps/perf_db_client.h", "test/cpp/qps/qps_worker.h", - "test/cpp/qps/qpstest.grpc.pb.h", - "test/cpp/qps/qpstest.pb.h", "test/cpp/qps/report.h", "test/cpp/qps/server.h", "test/cpp/qps/stats.h", "test/cpp/qps/timer.h", - "test/cpp/util/benchmark_config.h" + "test/cpp/util/benchmark_config.h", + "test/proto/qpstest.grpc.pb.h", + "test/proto/qpstest.pb.h" ], "language": "c++", "name": "qps", diff --git a/vsprojects/vcxproj/qps/qps.vcxproj b/vsprojects/vcxproj/qps/qps.vcxproj index 89c7fb4a95..b361b1b601 100644 --- a/vsprojects/vcxproj/qps/qps.vcxproj +++ b/vsprojects/vcxproj/qps/qps.vcxproj @@ -147,13 +147,13 @@ <ClInclude Include="..\..\..\test\cpp\util\benchmark_config.h" /> </ItemGroup> <ItemGroup> - <ClCompile Include="..\..\..\test\cpp\qps\qpstest.pb.cc"> + <ClCompile Include="..\..\..\test\proto\qpstest.pb.cc"> </ClCompile> - <ClInclude Include="..\..\..\test\cpp\qps\qpstest.pb.h"> + <ClInclude Include="..\..\..\test\proto\qpstest.pb.h"> </ClInclude> - <ClCompile Include="..\..\..\test\cpp\qps\qpstest.grpc.pb.cc"> + <ClCompile Include="..\..\..\test\proto\qpstest.grpc.pb.cc"> </ClCompile> - <ClInclude Include="..\..\..\test\cpp\qps\qpstest.grpc.pb.h"> + <ClInclude Include="..\..\..\test\proto\qpstest.grpc.pb.h"> </ClInclude> <ClCompile Include="..\..\..\test\cpp\qps\perf_db.pb.cc"> </ClCompile> diff --git a/vsprojects/vcxproj/qps/qps.vcxproj.filters b/vsprojects/vcxproj/qps/qps.vcxproj.filters index 386ffa65f9..cffb5ff118 100644 --- a/vsprojects/vcxproj/qps/qps.vcxproj.filters +++ b/vsprojects/vcxproj/qps/qps.vcxproj.filters @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup> - <ClCompile Include="..\..\..\test\cpp\qps\qpstest.proto"> - <Filter>test\cpp\qps</Filter> + <ClCompile Include="..\..\..\test\proto\qpstest.proto"> + <Filter>test\proto</Filter> </ClCompile> <ClCompile Include="..\..\..\test\cpp\qps\perf_db.proto"> <Filter>test\cpp\qps</Filter> @@ -87,6 +87,9 @@ <Filter Include="test\cpp\util"> <UniqueIdentifier>{9042d134-6d5a-a907-799e-01768a475055}</UniqueIdentifier> </Filter> + <Filter Include="test\proto"> + <UniqueIdentifier>{44e63a33-67f4-0575-e87a-711a7c9111e2}</UniqueIdentifier> + </Filter> </ItemGroup> </Project> -- GitLab