From 97fb3f6481cc79ed9409320fcb274b9ea7442aaf Mon Sep 17 00:00:00 2001 From: jtattermusch Date: Mon, 8 Dec 2014 15:13:41 -0800 Subject: Add mako templates to generate MS Visual Studio projects. Current state for Windows platform: -- gpr and grpc_test_util can be compiled -- gpr_log_test and gpr_cmdline_test pass Change on 2014/12/08 by jtattermusch ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=81615574 --- Makefile | 14 +- build.json | 12 +- include/grpc/support/port_platform.h | 3 + templates/vsprojects/vs2013/gpr.vcxproj.template | 2 + .../vs2013/gpr_cancellable_test.vcxproj.template | 2 + .../vs2013/gpr_cmdline_test.vcxproj.template | 2 + .../vs2013/gpr_log_test.vcxproj.template | 2 + templates/vsprojects/vs2013/grpc.sln.template | 58 ++++ templates/vsprojects/vs2013/grpc.vcxproj.template | 2 + .../vs2013/grpc_test_util.vcxproj.template | 2 + templates/vsprojects/vs2013/vcxproj_defs.include | 138 +++++++++ test/core/end2end/cq_verifier.c | 7 + test/core/end2end/end2end_tests.c | 8 +- test/core/endpoint/endpoint_tests.c | 35 ++- test/core/endpoint/endpoint_tests.h | 2 +- test/core/endpoint/secure_endpoint_test.c | 11 +- test/core/endpoint/tcp_test.c | 2 +- test/core/transport/transport_end2end_tests.c | 7 +- test/core/util/port.c | 145 ---------- test/core/util/port_posix.c | 150 ++++++++++ vsprojects/README | 1 + vsprojects/vs2013/gpr.vcxproj | 161 +++++++++++ vsprojects/vs2013/gpr_cancellable_test.vcxproj | 91 ++++++ vsprojects/vs2013/gpr_cmdline_test.vcxproj | 91 ++++++ vsprojects/vs2013/gpr_log_test.vcxproj | 91 ++++++ vsprojects/vs2013/grpc.sln | 64 ++++ vsprojects/vs2013/grpc.vcxproj | 322 +++++++++++++++++++++ vsprojects/vs2013/grpc_test_util.vcxproj | 100 +++++++ 28 files changed, 1338 insertions(+), 187 deletions(-) create mode 100644 templates/vsprojects/vs2013/gpr.vcxproj.template create mode 100644 templates/vsprojects/vs2013/gpr_cancellable_test.vcxproj.template create mode 100644 templates/vsprojects/vs2013/gpr_cmdline_test.vcxproj.template create mode 100644 templates/vsprojects/vs2013/gpr_log_test.vcxproj.template create mode 100644 templates/vsprojects/vs2013/grpc.sln.template create mode 100644 templates/vsprojects/vs2013/grpc.vcxproj.template create mode 100644 templates/vsprojects/vs2013/grpc_test_util.vcxproj.template create mode 100644 templates/vsprojects/vs2013/vcxproj_defs.include delete mode 100644 test/core/util/port.c create mode 100644 test/core/util/port_posix.c create mode 100644 vsprojects/README create mode 100644 vsprojects/vs2013/gpr.vcxproj create mode 100644 vsprojects/vs2013/gpr_cancellable_test.vcxproj create mode 100644 vsprojects/vs2013/gpr_cmdline_test.vcxproj create mode 100644 vsprojects/vs2013/gpr_log_test.vcxproj create mode 100644 vsprojects/vs2013/grpc.sln create mode 100644 vsprojects/vs2013/grpc.vcxproj create mode 100644 vsprojects/vs2013/grpc_test_util.vcxproj diff --git a/Makefile b/Makefile index 84ddb5449b..28993e04d1 100644 --- a/Makefile +++ b/Makefile @@ -712,7 +712,7 @@ clean_libgrpc: LIBGRPC_TEST_UTIL_SRC = \ test/core/util/grpc_profiler.c \ test/core/util/parse_hexstring.c \ - test/core/util/port.c \ + test/core/util/port_posix.c \ test/core/util/slice_splitter.c \ test/core/util/test_config.c \ test/core/end2end/end2end_tests.c \ @@ -1645,9 +1645,9 @@ GPR_CANCELLABLE_TEST_SRC = \ GPR_CANCELLABLE_TEST_OBJS = $(addprefix objs/, $(addsuffix .o, $(basename $(GPR_CANCELLABLE_TEST_SRC)))) GPR_CANCELLABLE_TEST_DEPS = $(addprefix deps/, $(addsuffix .dep, $(basename $(GPR_CANCELLABLE_TEST_SRC)))) -bins/gpr_cancellable_test: $(GPR_CANCELLABLE_TEST_OBJS) libs/libgrpc_test_util.a libs/libgrpc.a libs/libgpr.a +bins/gpr_cancellable_test: $(GPR_CANCELLABLE_TEST_OBJS) libs/libgrpc_test_util.a libs/libgpr.a $(E) "[LD] Linking $@" - $(Q) $(LD) $(LDFLAGS) $(GPR_CANCELLABLE_TEST_OBJS) -Llibs -lgrpc_test_util -lgrpc -lgpr $(LDLIBS) $(LDLIBS_SECURE) -o bins/gpr_cancellable_test + $(Q) $(LD) $(LDFLAGS) $(GPR_CANCELLABLE_TEST_OBJS) -Llibs -lgrpc_test_util -lgpr $(LDLIBS) $(LDLIBS_SECURE) -o bins/gpr_cancellable_test deps_gpr_cancellable_test: $(GPR_CANCELLABLE_TEST_DEPS) @@ -1668,9 +1668,9 @@ GPR_LOG_TEST_SRC = \ GPR_LOG_TEST_OBJS = $(addprefix objs/, $(addsuffix .o, $(basename $(GPR_LOG_TEST_SRC)))) GPR_LOG_TEST_DEPS = $(addprefix deps/, $(addsuffix .dep, $(basename $(GPR_LOG_TEST_SRC)))) -bins/gpr_log_test: $(GPR_LOG_TEST_OBJS) libs/libgrpc_test_util.a libs/libgrpc.a libs/libgpr.a +bins/gpr_log_test: $(GPR_LOG_TEST_OBJS) libs/libgrpc_test_util.a libs/libgpr.a $(E) "[LD] Linking $@" - $(Q) $(LD) $(LDFLAGS) $(GPR_LOG_TEST_OBJS) -Llibs -lgrpc_test_util -lgrpc -lgpr $(LDLIBS) $(LDLIBS_SECURE) -o bins/gpr_log_test + $(Q) $(LD) $(LDFLAGS) $(GPR_LOG_TEST_OBJS) -Llibs -lgrpc_test_util -lgpr $(LDLIBS) $(LDLIBS_SECURE) -o bins/gpr_log_test deps_gpr_log_test: $(GPR_LOG_TEST_DEPS) @@ -1691,9 +1691,9 @@ GPR_CMDLINE_TEST_SRC = \ GPR_CMDLINE_TEST_OBJS = $(addprefix objs/, $(addsuffix .o, $(basename $(GPR_CMDLINE_TEST_SRC)))) GPR_CMDLINE_TEST_DEPS = $(addprefix deps/, $(addsuffix .dep, $(basename $(GPR_CMDLINE_TEST_SRC)))) -bins/gpr_cmdline_test: $(GPR_CMDLINE_TEST_OBJS) libs/libgrpc_test_util.a libs/libgrpc.a libs/libgpr.a +bins/gpr_cmdline_test: $(GPR_CMDLINE_TEST_OBJS) libs/libgrpc_test_util.a libs/libgpr.a $(E) "[LD] Linking $@" - $(Q) $(LD) $(LDFLAGS) $(GPR_CMDLINE_TEST_OBJS) -Llibs -lgrpc_test_util -lgrpc -lgpr $(LDLIBS) $(LDLIBS_SECURE) -o bins/gpr_cmdline_test + $(Q) $(LD) $(LDFLAGS) $(GPR_CMDLINE_TEST_OBJS) -Llibs -lgrpc_test_util -lgpr $(LDLIBS) $(LDLIBS_SECURE) -o bins/gpr_cmdline_test deps_gpr_cmdline_test: $(GPR_CMDLINE_TEST_DEPS) diff --git a/build.json b/build.json index 7f896526fa..3769fe991a 100644 --- a/build.json +++ b/build.json @@ -13,6 +13,7 @@ "name": "gpr", "build": "all", "secure": false, + "vs_project_guid": "{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}", "src": [ "src/core/support/alloc.c", "src/core/support/cancellable.c", @@ -76,6 +77,7 @@ "name": "grpc", "build": "all", "secure": true, + "vs_project_guid": "{29D16885-7228-4C31-81ED-5F9187C7F2A9}", "alternates": [ { "name": "grpc_unsecure", @@ -258,10 +260,11 @@ { "name": "grpc_test_util", "build": "private", + "vs_project_guid": "{17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}", "src": [ "test/core/util/grpc_profiler.c", "test/core/util/parse_hexstring.c", - "test/core/util/port.c", + "test/core/util/port_posix.c", "test/core/util/slice_splitter.c", "test/core/util/test_config.c", "test/core/end2end/end2end_tests.c", @@ -276,6 +279,7 @@ "build": "all", "c++": true, "secure": true, + "vs_project_guid": "{C187A093-A0FE-489D-A40A-6E33DE0F9FEB}", "src": [ "src/cpp/server/server.cc", "src/cpp/server/server_rpc_handler.cc", @@ -361,36 +365,36 @@ { "name": "gpr_cancellable_test", "build": "test", + "vs_project_guid": "{19730BF6-7F8C-44EF-ACDC-2CA50C0403E7}", "src": [ "test/core/support/cancellable_test.c" ], "deps": [ "grpc_test_util", - "grpc", "gpr" ] }, { "name": "gpr_log_test", "build": "test", + "vs_project_guid": "{42B70122-188F-4535-AB74-F061C77068B4}", "src": [ "test/core/support/log_test.c" ], "deps": [ "grpc_test_util", - "grpc", "gpr" ] }, { "name": "gpr_cmdline_test", "build": "test", + "vs_project_guid": "{8F260F48-3C22-48A8-9928-A152ABB2EDF2}", "src": [ "test/core/support/cmdline_test.c" ], "deps": [ "grpc_test_util", - "grpc", "gpr" ] }, diff --git a/include/grpc/support/port_platform.h b/include/grpc/support/port_platform.h index 404543d67b..13ce4744da 100644 --- a/include/grpc/support/port_platform.h +++ b/include/grpc/support/port_platform.h @@ -54,6 +54,7 @@ #define GPR_POSIX_TIME 1 #define GPR_POSIX_SYNC 1 #define GPR_POSIX_STRING 1 +#define GPR_POSIX_SOCKET 1 #define GPR_POSIX_SOCKETUTILS 1 #define GPR_ANDROID 1 #define GPR_GCC_SYNC 1 @@ -62,6 +63,7 @@ #define GPR_POSIX_TIME 1 #define GPR_POSIX_SYNC 1 #define GPR_POSIX_STRING 1 +#define GPR_POSIX_SOCKET 1 #define GPR_LINUX 1 #define GPR_GCC_ATOMIC 1 #ifdef _LP64 @@ -74,6 +76,7 @@ #define GPR_POSIX_SYNC 1 #define GPR_POSIX_STRING 1 #define GPR_POSIX_LOG 1 +#define GPR_POSIX_SOCKET 1 #define GPR_POSIX_SOCKETUTILS 1 #define GPR_GCC_ATOMIC 1 #ifdef _LP64 diff --git a/templates/vsprojects/vs2013/gpr.vcxproj.template b/templates/vsprojects/vs2013/gpr.vcxproj.template new file mode 100644 index 0000000000..c478aadcdd --- /dev/null +++ b/templates/vsprojects/vs2013/gpr.vcxproj.template @@ -0,0 +1,2 @@ +<%namespace file="vcxproj_defs.include" import="gen_project"/>\ +${gen_project('gpr', libs, targets)} diff --git a/templates/vsprojects/vs2013/gpr_cancellable_test.vcxproj.template b/templates/vsprojects/vs2013/gpr_cancellable_test.vcxproj.template new file mode 100644 index 0000000000..e20be83a78 --- /dev/null +++ b/templates/vsprojects/vs2013/gpr_cancellable_test.vcxproj.template @@ -0,0 +1,2 @@ +<%namespace file="vcxproj_defs.include" import="gen_project"/>\ +${gen_project('gpr_cancellable_test', libs, targets)} diff --git a/templates/vsprojects/vs2013/gpr_cmdline_test.vcxproj.template b/templates/vsprojects/vs2013/gpr_cmdline_test.vcxproj.template new file mode 100644 index 0000000000..3be9fb3a9c --- /dev/null +++ b/templates/vsprojects/vs2013/gpr_cmdline_test.vcxproj.template @@ -0,0 +1,2 @@ +<%namespace file="vcxproj_defs.include" import="gen_project"/>\ +${gen_project('gpr_cmdline_test', libs, targets)} diff --git a/templates/vsprojects/vs2013/gpr_log_test.vcxproj.template b/templates/vsprojects/vs2013/gpr_log_test.vcxproj.template new file mode 100644 index 0000000000..07cfb5d338 --- /dev/null +++ b/templates/vsprojects/vs2013/gpr_log_test.vcxproj.template @@ -0,0 +1,2 @@ +<%namespace file="vcxproj_defs.include" import="gen_project"/>\ +${gen_project('gpr_log_test', libs, targets)} diff --git a/templates/vsprojects/vs2013/grpc.sln.template b/templates/vsprojects/vs2013/grpc.sln.template new file mode 100644 index 0000000000..2eba4cbe03 --- /dev/null +++ b/templates/vsprojects/vs2013/grpc.sln.template @@ -0,0 +1,58 @@ +## Template for Visual Studio solution +## based on http://msdn.microsoft.com/en-us/library/bb165951(v=vs.90).aspx + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.21005.1 +MinimumVisualStudioVersion = 10.0.40219.1 +<% +## Visual Studio uses GUIDs for project types +## http://msdn.microsoft.com/en-us/library/hb23x61k%28v=vs.80%29.aspx +cpp_proj_type = "{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}" + +for lib in libs: + lib.is_library = True +for target in targets: + target.is_library = False + +projects = [] +projects.extend(libs) +projects.extend(targets) +projects = [project for project in projects if project.get('vs_project_guid', None)] + +## Exclude C++ projects for now +projects = [project for project in projects if not project.get('c++', False)] + +for p in projects: + p.deps = p.get('deps',[]) + +project_dict = dict([(p.name, p) for p in projects]) +%>\ +% for project in projects: +Project("${cpp_proj_type}") = "${project.name}", "${project.name}.vcxproj", "${project.vs_project_guid}" + % if project.deps: + ProjectSection(ProjectDependencies) = postProject + % for dep in project.deps: + ${project_dict[dep].vs_project_guid} = ${project_dict[dep].vs_project_guid} + % endfor + EndProjectSection + % endif +EndProject +% endfor +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution +% for project in projects: + ${project.vs_project_guid}.Debug|Win32.ActiveCfg = Debug|Win32 + ${project.vs_project_guid}.Debug|Win32.Build.0 = Debug|Win32 + ${project.vs_project_guid}.Release|Win32.ActiveCfg = Release|Win32 + ${project.vs_project_guid}.Release|Win32.Build.0 = Release|Win32 +% endfor + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/templates/vsprojects/vs2013/grpc.vcxproj.template b/templates/vsprojects/vs2013/grpc.vcxproj.template new file mode 100644 index 0000000000..3de6453f52 --- /dev/null +++ b/templates/vsprojects/vs2013/grpc.vcxproj.template @@ -0,0 +1,2 @@ +<%namespace file="vcxproj_defs.include" import="gen_project"/>\ +${gen_project('grpc', libs, targets)} \ No newline at end of file diff --git a/templates/vsprojects/vs2013/grpc_test_util.vcxproj.template b/templates/vsprojects/vs2013/grpc_test_util.vcxproj.template new file mode 100644 index 0000000000..72e625d9b9 --- /dev/null +++ b/templates/vsprojects/vs2013/grpc_test_util.vcxproj.template @@ -0,0 +1,2 @@ +<%namespace file="vcxproj_defs.include" import="gen_project"/>\ +${gen_project('grpc_test_util', libs, targets)} \ No newline at end of file diff --git a/templates/vsprojects/vs2013/vcxproj_defs.include b/templates/vsprojects/vs2013/vcxproj_defs.include new file mode 100644 index 0000000000..37fe97d4ea --- /dev/null +++ b/templates/vsprojects/vs2013/vcxproj_defs.include @@ -0,0 +1,138 @@ +<%def name="to_windows_path(path)">${path.replace('/','\\')}\ +<%def name="get_configuration_type(is_library)">${'StaticLibrary' if is_library else 'Application'}\ +<%def name="get_subsystem(is_library)">${'Windows' if is_library else 'Console'}\ +<%def name="gen_project(name, libs, targets)">\ +<% +## TODO(jtattermusch): this code is c&p from the solution template +for lib in libs: + lib.is_library = True +for target in targets: + target.is_library = False + +projects = [] +projects.extend(libs) +projects.extend(targets) +projects = [project for project in projects if project.get('vs_project_guid', None)] + +## Exclude C++ projects for now +projects = [project for project in projects if not project.get('c++', False)] + +for p in projects: + p.deps = p.get('deps',[]) + +project_dict = dict([(p.name, p) for p in projects]) +%>\ +% for project in projects: + % if project.name == name: + + + + + Debug + Win32 + + + Release + Win32 + + + + ${project.vs_project_guid} + Win32Proj + + + + + ${get_configuration_type(project.is_library)} + true + v120 + Unicode + + + ${get_configuration_type(project.is_library)} + false + v120 + true + Unicode + + + + + + + + + + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + $(SolutionDir)\..\..;$(SolutionDir)\..\..\include;%(AdditionalIncludeDirectories) + + + ${get_subsystem(project.is_library)} + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + $(SolutionDir)\..\..;$(SolutionDir)\..\..\include;%(AdditionalIncludeDirectories) + + + ${get_subsystem(project.is_library)} + true + true + true + + + % if project.get('public_headers',[]): + + % for public_header in project.public_headers: + + % endfor + + % endif + % if project.get('headers',[]): + + % for header in project.headers: + + % endfor + + % endif + % if project.get('src',[]): + + % for src_name in project.src: + + + % endfor + + % endif + % if project.get('deps',[]): + + % for dep in project.deps: + + ${project_dict[dep].vs_project_guid} + + % endfor + + % endif + + + + + % endif +% endfor +\ \ No newline at end of file diff --git a/test/core/end2end/cq_verifier.c b/test/core/end2end/cq_verifier.c index aebb8b4c41..d0427da47e 100644 --- a/test/core/end2end/cq_verifier.c +++ b/test/core/end2end/cq_verifier.c @@ -31,6 +31,13 @@ * */ +/* Disable sprintf warnings on Windows (it's fine to do that for test code). + Also, cases where sprintf is called are crash sites anyway. + TODO(jtattermusch): b/18636890 */ +#ifdef _MSC_VER +#define _CRT_SECURE_NO_WARNINGS +#endif + #include "test/core/end2end/cq_verifier.h" #include diff --git a/test/core/end2end/end2end_tests.c b/test/core/end2end/end2end_tests.c index 7174d09866..45d55e94bc 100644 --- a/test/core/end2end/end2end_tests.c +++ b/test/core/end2end/end2end_tests.c @@ -35,12 +35,12 @@ #include #include -#include #include #include #include #include +#include #include #include "test/core/end2end/cq_verifier.h" @@ -206,15 +206,15 @@ static void simple_request_body2(grpc_end2end_test_fixture f) { static void test_invoke_simple_request( grpc_end2end_test_config config, const char *name, void (*body)(grpc_end2end_test_fixture f)) { - char fullname[64]; + char *fullname; grpc_end2end_test_fixture f; - sprintf(fullname, "%s/%s", __FUNCTION__, name); - + gpr_asprintf(&fullname, "%s/%s", __FUNCTION__, name); f = begin_test(config, fullname, NULL, NULL); body(f); end_test(&f); config.tear_down_data(&f); + gpr_free(fullname); } static void test_invoke_10_simple_requests(grpc_end2end_test_config config) { diff --git a/test/core/endpoint/endpoint_tests.c b/test/core/endpoint/endpoint_tests.c index 9cc0eaa959..50919fc45e 100644 --- a/test/core/endpoint/endpoint_tests.c +++ b/test/core/endpoint/endpoint_tests.c @@ -56,9 +56,9 @@ */ -ssize_t count_and_unref_slices(gpr_slice *slices, size_t nslices, - int *current_data) { - ssize_t num_bytes = 0; +size_t count_and_unref_slices(gpr_slice *slices, size_t nslices, + int *current_data) { + size_t num_bytes = 0; int i; int j; unsigned char *buf; @@ -76,18 +76,18 @@ ssize_t count_and_unref_slices(gpr_slice *slices, size_t nslices, static grpc_endpoint_test_fixture begin_test(grpc_endpoint_test_config config, const char *test_name, - ssize_t slice_size) { + size_t slice_size) { gpr_log(GPR_INFO, "%s/%s", test_name, config.name); return config.create_fixture(slice_size); } static void end_test(grpc_endpoint_test_config config) { config.clean_up(); } -static gpr_slice *allocate_blocks(ssize_t num_bytes, ssize_t slice_size, +static gpr_slice *allocate_blocks(size_t num_bytes, size_t slice_size, size_t *num_blocks, int *current_data) { - ssize_t nslices = num_bytes / slice_size + (num_bytes % slice_size ? 1 : 0); + size_t nslices = num_bytes / slice_size + (num_bytes % slice_size ? 1 : 0); gpr_slice *slices = malloc(sizeof(gpr_slice) * nslices); - ssize_t num_bytes_left = num_bytes; + size_t num_bytes_left = num_bytes; int i; int j; unsigned char *buf; @@ -112,10 +112,10 @@ struct read_and_write_test_state { grpc_endpoint *write_ep; gpr_mu mu; gpr_cv cv; - ssize_t target_bytes; - ssize_t bytes_read; - ssize_t current_write_size; - ssize_t bytes_written; + size_t target_bytes; + size_t bytes_read; + size_t current_write_size; + size_t bytes_written; int current_read_data; int current_write_data; int read_done; @@ -205,8 +205,8 @@ static void read_and_write_test_write_handler(void *data, This also includes a test of the shutdown behavior. */ static void read_and_write_test(grpc_endpoint_test_config config, - ssize_t num_bytes, ssize_t write_size, - ssize_t slice_size, int shutdown) { + size_t num_bytes, size_t write_size, + size_t slice_size, int shutdown) { struct read_and_write_test_state state; gpr_timespec rel_deadline = {20, 0}; gpr_timespec deadline = gpr_time_add(gpr_now(), rel_deadline); @@ -234,6 +234,9 @@ static void read_and_write_test(grpc_endpoint_test_config config, state.current_write_data = 0; /* Get started by pretending an initial write completed */ + /* NOTE: Sets up initial conditions so we can have the same write handler + for the first iteration as for later iterations. It does the right thing + even when bytes_written is unsigned. */ state.bytes_written -= state.current_write_size; read_and_write_test_write_handler(&state, GRPC_ENDPOINT_CB_OK); @@ -271,7 +274,7 @@ static void read_timeout_test_read_handler(void *data, gpr_slice *slices, } static void read_timeout_test(grpc_endpoint_test_config config, - ssize_t slice_size) { + size_t slice_size) { gpr_timespec timeout = gpr_time_from_micros(10000); gpr_timespec read_deadline = gpr_time_add(gpr_now(), timeout); gpr_timespec test_deadline = @@ -297,7 +300,7 @@ static void write_timeout_test_write_handler(void *data, } static void write_timeout_test(grpc_endpoint_test_config config, - ssize_t slice_size) { + size_t slice_size) { gpr_timespec timeout = gpr_time_from_micros(10000); gpr_timespec write_deadline = gpr_time_add(gpr_now(), timeout); gpr_timespec test_deadline = @@ -370,7 +373,7 @@ static void shutdown_during_write_test_write_handler( } static void shutdown_during_write_test(grpc_endpoint_test_config config, - ssize_t slice_size) { + size_t slice_size) { /* test that shutdown with a pending write creates no leaks */ gpr_timespec deadline; size_t size; diff --git a/test/core/endpoint/endpoint_tests.h b/test/core/endpoint/endpoint_tests.h index 79ee759b45..d5f34374da 100644 --- a/test/core/endpoint/endpoint_tests.h +++ b/test/core/endpoint/endpoint_tests.h @@ -48,7 +48,7 @@ struct grpc_endpoint_test_fixture { struct grpc_endpoint_test_config { const char *name; - grpc_endpoint_test_fixture (*create_fixture)(ssize_t slice_size); + grpc_endpoint_test_fixture (*create_fixture)(size_t slice_size); void (*clean_up)(); }; diff --git a/test/core/endpoint/secure_endpoint_test.c b/test/core/endpoint/secure_endpoint_test.c index 9fc2511763..4fd5dee677 100644 --- a/test/core/endpoint/secure_endpoint_test.c +++ b/test/core/endpoint/secure_endpoint_test.c @@ -58,7 +58,7 @@ static void create_sockets(int sv[2]) { } static grpc_endpoint_test_fixture secure_endpoint_create_fixture_tcp_socketpair( - ssize_t slice_size, gpr_slice *leftover_slices, size_t leftover_nslices) { + size_t slice_size, gpr_slice *leftover_slices, size_t leftover_nslices) { int sv[2]; tsi_frame_protector *fake_read_protector = tsi_create_fake_protector(NULL); tsi_frame_protector *fake_write_protector = tsi_create_fake_protector(NULL); @@ -127,12 +127,12 @@ static grpc_endpoint_test_fixture secure_endpoint_create_fixture_tcp_socketpair( } static grpc_endpoint_test_fixture -secure_endpoint_create_fixture_tcp_socketpair_noleftover(ssize_t slice_size) { +secure_endpoint_create_fixture_tcp_socketpair_noleftover(size_t slice_size) { return secure_endpoint_create_fixture_tcp_socketpair(slice_size, NULL, 0); } static grpc_endpoint_test_fixture -secure_endpoint_create_fixture_tcp_socketpair_leftover(ssize_t slice_size) { +secure_endpoint_create_fixture_tcp_socketpair_leftover(size_t slice_size) { gpr_slice s = gpr_slice_from_copied_string("hello world 12345678900987654321"); grpc_endpoint_test_fixture f; @@ -164,8 +164,7 @@ static void verify_leftover(void *user_data, gpr_slice *slices, size_t nslices, *(int *)user_data = 1; } -static void test_leftover(grpc_endpoint_test_config config, - ssize_t slice_size) { +static void test_leftover(grpc_endpoint_test_config config, size_t slice_size) { grpc_endpoint_test_fixture f = config.create_fixture(slice_size); int verified = 0; gpr_log(GPR_INFO, "Start test left over"); @@ -200,7 +199,7 @@ static void destroy_early(void *user_data, gpr_slice *slices, size_t nslices, /* test which destroys the ep before finishing reading */ static void test_destroy_ep_early(grpc_endpoint_test_config config, - ssize_t slice_size) { + size_t slice_size) { grpc_endpoint_test_fixture f = config.create_fixture(slice_size); gpr_log(GPR_INFO, "Start test destroy early"); diff --git a/test/core/endpoint/tcp_test.c b/test/core/endpoint/tcp_test.c index 7dbc2783e9..c703f92f68 100644 --- a/test/core/endpoint/tcp_test.c +++ b/test/core/endpoint/tcp_test.c @@ -490,7 +490,7 @@ void run_tests() { static void clean_up() { grpc_em_destroy(&g_em); } static grpc_endpoint_test_fixture create_fixture_tcp_socketpair( - ssize_t slice_size) { + size_t slice_size) { int sv[2]; grpc_endpoint_test_fixture f; diff --git a/test/core/transport/transport_end2end_tests.c b/test/core/transport/transport_end2end_tests.c index 49ce645a64..e35df3acb4 100644 --- a/test/core/transport/transport_end2end_tests.c +++ b/test/core/transport/transport_end2end_tests.c @@ -652,12 +652,13 @@ static int count_expectations(test_fixture *f) { /* Callback for enumerate_expectations that adds an expectation to the log */ static void dump_expectation(void *p, const char *fmt, ...) { - char buffer[256]; + char *str; va_list args; va_start(args, fmt); - vsprintf(buffer, fmt, args); - gpr_log(GPR_INFO, "EXPECTED: %s", buffer); + gpr_asprintf(&str, fmt, args); + gpr_log(GPR_INFO, "EXPECTED: %s", str); + gpr_free(str); va_end(args); } diff --git a/test/core/util/port.c b/test/core/util/port.c deleted file mode 100644 index 133b53fd2b..0000000000 --- a/test/core/util/port.c +++ /dev/null @@ -1,145 +0,0 @@ -/* - * - * Copyright 2014, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include "test/core/util/port.h" - -#include -#include -#include -#include -#include -#include - -#include - -#define NUM_RANDOM_PORTS_TO_PICK 100 - -static int is_port_available(int *port, int is_tcp) { - const int proto = is_tcp ? IPPROTO_TCP : 0; - const int fd = socket(AF_INET, is_tcp ? SOCK_STREAM : SOCK_DGRAM, proto); - int one = 1; - struct sockaddr_in addr; - socklen_t alen = sizeof(addr); - int actual_port; - - GPR_ASSERT(*port >= 0); - GPR_ASSERT(*port <= 65535); - if (fd < 0) { - gpr_log(GPR_ERROR, "socket() failed: %s", strerror(errno)); - return 0; - } - - /* Reuseaddr lets us start up a server immediately after it exits */ - if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)) < 0) { - gpr_log(GPR_ERROR, "setsockopt() failed: %s", strerror(errno)); - close(fd); - return 0; - } - - /* Try binding to port */ - addr.sin_family = AF_INET; - addr.sin_addr.s_addr = INADDR_ANY; - addr.sin_port = htons(*port); - if (bind(fd, (struct sockaddr *)&addr, sizeof(addr)) < 0) { - gpr_log(GPR_DEBUG, "bind(port=%d) failed: %s", *port, strerror(errno)); - close(fd); - return 0; - } - - /* Get the bound port number */ - if (getsockname(fd, (struct sockaddr *)&addr, &alen) < 0) { - gpr_log(GPR_ERROR, "getsockname() failed: %s", strerror(errno)); - close(fd); - return 0; - } - GPR_ASSERT(alen <= sizeof(addr)); - actual_port = ntohs(addr.sin_port); - GPR_ASSERT(actual_port > 0); - if (*port == 0) { - *port = actual_port; - } else { - GPR_ASSERT(*port == actual_port); - } - - close(fd); - return 1; -} - -int grpc_pick_unused_port() { - /* We repeatedly pick a port and then see whether or not it is - available for use both as a TCP socket and a UDP socket. First, we - pick a random large port number. For subsequent - iterations, we bind to an anonymous port and let the OS pick the - port number. The random port picking reduces the probability of - races with other processes on kernels that want to reuse the same - port numbers over and over. */ - - /* In alternating iterations we try UDP ports before TCP ports UDP - ports -- it could be the case that this machine has been using up - UDP ports and they are scarcer. */ - - /* Type of port to first pick in next iteration */ - int is_tcp = 1; - int try - = 0; - - for (;;) { - int port = try - < NUM_RANDOM_PORTS_TO_PICK ? rand() % (65536 - 30000) + 30000 : 0; - if (!is_port_available(&port, is_tcp)) { - continue; - } - GPR_ASSERT(port > 0); - /* Check that the port # is free for the other type of socket also */ - if (!is_port_available(&port, !is_tcp)) { - /* In the next iteration try to bind to the other type first - because perhaps it is more rare. */ - is_tcp = !is_tcp; - continue; - } - - /* TODO(ctiller): consider caching this port in some structure, to avoid - handing it out again */ - - return port; - } - - /* The port iterator reached the end without finding a suitable port. */ - return 0; -} - -int grpc_pick_unused_port_or_die() { - int port = grpc_pick_unused_port(); - GPR_ASSERT(port > 0); - return port; -} diff --git a/test/core/util/port_posix.c b/test/core/util/port_posix.c new file mode 100644 index 0000000000..ab0dcf7d11 --- /dev/null +++ b/test/core/util/port_posix.c @@ -0,0 +1,150 @@ +/* + * + * Copyright 2014, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#ifdef GPR_POSIX_SOCKET + +#include "test/core/util/port.h" + +#include +#include +#include +#include +#include +#include + +#include + +#define NUM_RANDOM_PORTS_TO_PICK 100 + +static int is_port_available(int *port, int is_tcp) { + const int proto = is_tcp ? IPPROTO_TCP : 0; + const int fd = socket(AF_INET, is_tcp ? SOCK_STREAM : SOCK_DGRAM, proto); + int one = 1; + struct sockaddr_in addr; + socklen_t alen = sizeof(addr); + int actual_port; + + GPR_ASSERT(*port >= 0); + GPR_ASSERT(*port <= 65535); + if (fd < 0) { + gpr_log(GPR_ERROR, "socket() failed: %s", strerror(errno)); + return 0; + } + + /* Reuseaddr lets us start up a server immediately after it exits */ + if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)) < 0) { + gpr_log(GPR_ERROR, "setsockopt() failed: %s", strerror(errno)); + close(fd); + return 0; + } + + /* Try binding to port */ + addr.sin_family = AF_INET; + addr.sin_addr.s_addr = INADDR_ANY; + addr.sin_port = htons(*port); + if (bind(fd, (struct sockaddr *)&addr, sizeof(addr)) < 0) { + gpr_log(GPR_DEBUG, "bind(port=%d) failed: %s", *port, strerror(errno)); + close(fd); + return 0; + } + + /* Get the bound port number */ + if (getsockname(fd, (struct sockaddr *)&addr, &alen) < 0) { + gpr_log(GPR_ERROR, "getsockname() failed: %s", strerror(errno)); + close(fd); + return 0; + } + GPR_ASSERT(alen <= sizeof(addr)); + actual_port = ntohs(addr.sin_port); + GPR_ASSERT(actual_port > 0); + if (*port == 0) { + *port = actual_port; + } else { + GPR_ASSERT(*port == actual_port); + } + + close(fd); + return 1; +} + +int grpc_pick_unused_port() { + /* We repeatedly pick a port and then see whether or not it is + available for use both as a TCP socket and a UDP socket. First, we + pick a random large port number. For subsequent + iterations, we bind to an anonymous port and let the OS pick the + port number. The random port picking reduces the probability of + races with other processes on kernels that want to reuse the same + port numbers over and over. */ + + /* In alternating iterations we try UDP ports before TCP ports UDP + ports -- it could be the case that this machine has been using up + UDP ports and they are scarcer. */ + + /* Type of port to first pick in next iteration */ + int is_tcp = 1; + int try + = 0; + + for (;;) { + int port = try + < NUM_RANDOM_PORTS_TO_PICK ? rand() % (65536 - 30000) + 30000 : 0; + if (!is_port_available(&port, is_tcp)) { + continue; + } + GPR_ASSERT(port > 0); + /* Check that the port # is free for the other type of socket also */ + if (!is_port_available(&port, !is_tcp)) { + /* In the next iteration try to bind to the other type first + because perhaps it is more rare. */ + is_tcp = !is_tcp; + continue; + } + + /* TODO(ctiller): consider caching this port in some structure, to avoid + handing it out again */ + + return port; + } + + /* The port iterator reached the end without finding a suitable port. */ + return 0; +} + +int grpc_pick_unused_port_or_die() { + int port = grpc_pick_unused_port(); + GPR_ASSERT(port > 0); + return port; +} + +#endif /* GPR_POSIX_SOCKET */ diff --git a/vsprojects/README b/vsprojects/README new file mode 100644 index 0000000000..369f2a4f3a --- /dev/null +++ b/vsprojects/README @@ -0,0 +1 @@ +This directory contains MS Visual Studio project & solution files. diff --git a/vsprojects/vs2013/gpr.vcxproj b/vsprojects/vs2013/gpr.vcxproj new file mode 100644 index 0000000000..f4b30534a6 --- /dev/null +++ b/vsprojects/vs2013/gpr.vcxproj @@ -0,0 +1,161 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + Win32Proj + + + + + StaticLibrary + true + v120 + Unicode + + + StaticLibrary + false + v120 + true + Unicode + + + + + + + + + + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + $(SolutionDir)\..\..;$(SolutionDir)\..\..\include;%(AdditionalIncludeDirectories) + + + Windows + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + $(SolutionDir)\..\..;$(SolutionDir)\..\..\include;%(AdditionalIncludeDirectories) + + + Windows + true + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vsprojects/vs2013/gpr_cancellable_test.vcxproj b/vsprojects/vs2013/gpr_cancellable_test.vcxproj new file mode 100644 index 0000000000..447d3b7802 --- /dev/null +++ b/vsprojects/vs2013/gpr_cancellable_test.vcxproj @@ -0,0 +1,91 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {19730BF6-7F8C-44EF-ACDC-2CA50C0403E7} + Win32Proj + + + + + Application + true + v120 + Unicode + + + Application + false + v120 + true + Unicode + + + + + + + + + + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + $(SolutionDir)\..\..;$(SolutionDir)\..\..\include;%(AdditionalIncludeDirectories) + + + Console + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + $(SolutionDir)\..\..;$(SolutionDir)\..\..\include;%(AdditionalIncludeDirectories) + + + Console + true + true + true + + + + + + + + + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + diff --git a/vsprojects/vs2013/gpr_cmdline_test.vcxproj b/vsprojects/vs2013/gpr_cmdline_test.vcxproj new file mode 100644 index 0000000000..0ff731c293 --- /dev/null +++ b/vsprojects/vs2013/gpr_cmdline_test.vcxproj @@ -0,0 +1,91 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {8F260F48-3C22-48A8-9928-A152ABB2EDF2} + Win32Proj + + + + + Application + true + v120 + Unicode + + + Application + false + v120 + true + Unicode + + + + + + + + + + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + $(SolutionDir)\..\..;$(SolutionDir)\..\..\include;%(AdditionalIncludeDirectories) + + + Console + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + $(SolutionDir)\..\..;$(SolutionDir)\..\..\include;%(AdditionalIncludeDirectories) + + + Console + true + true + true + + + + + + + + + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + diff --git a/vsprojects/vs2013/gpr_log_test.vcxproj b/vsprojects/vs2013/gpr_log_test.vcxproj new file mode 100644 index 0000000000..9354773be4 --- /dev/null +++ b/vsprojects/vs2013/gpr_log_test.vcxproj @@ -0,0 +1,91 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {42B70122-188F-4535-AB74-F061C77068B4} + Win32Proj + + + + + Application + true + v120 + Unicode + + + Application + false + v120 + true + Unicode + + + + + + + + + + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + $(SolutionDir)\..\..;$(SolutionDir)\..\..\include;%(AdditionalIncludeDirectories) + + + Console + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + $(SolutionDir)\..\..;$(SolutionDir)\..\..\include;%(AdditionalIncludeDirectories) + + + Console + true + true + true + + + + + + + + + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + diff --git a/vsprojects/vs2013/grpc.sln b/vsprojects/vs2013/grpc.sln new file mode 100644 index 0000000000..2b39c07c6c --- /dev/null +++ b/vsprojects/vs2013/grpc.sln @@ -0,0 +1,64 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.21005.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gpr", "gpr.vcxproj", "{B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc", "grpc.vcxproj", "{29D16885-7228-4C31-81ED-5F9187C7F2A9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_test_util", "grpc_test_util.vcxproj", "{17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gpr_cancellable_test", "gpr_cancellable_test.vcxproj", "{19730BF6-7F8C-44EF-ACDC-2CA50C0403E7}" + ProjectSection(ProjectDependencies) = postProject + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gpr_log_test", "gpr_log_test.vcxproj", "{42B70122-188F-4535-AB74-F061C77068B4}" + ProjectSection(ProjectDependencies) = postProject + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gpr_cmdline_test", "gpr_cmdline_test.vcxproj", "{8F260F48-3C22-48A8-9928-A152ABB2EDF2}" + ProjectSection(ProjectDependencies) = postProject + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Debug|Win32.ActiveCfg = Debug|Win32 + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Debug|Win32.Build.0 = Debug|Win32 + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Release|Win32.ActiveCfg = Release|Win32 + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792}.Release|Win32.Build.0 = Release|Win32 + {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Debug|Win32.ActiveCfg = Debug|Win32 + {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Debug|Win32.Build.0 = Debug|Win32 + {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release|Win32.ActiveCfg = Release|Win32 + {29D16885-7228-4C31-81ED-5F9187C7F2A9}.Release|Win32.Build.0 = Release|Win32 + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Debug|Win32.ActiveCfg = Debug|Win32 + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Debug|Win32.Build.0 = Debug|Win32 + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Release|Win32.ActiveCfg = Release|Win32 + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}.Release|Win32.Build.0 = Release|Win32 + {19730BF6-7F8C-44EF-ACDC-2CA50C0403E7}.Debug|Win32.ActiveCfg = Debug|Win32 + {19730BF6-7F8C-44EF-ACDC-2CA50C0403E7}.Debug|Win32.Build.0 = Debug|Win32 + {19730BF6-7F8C-44EF-ACDC-2CA50C0403E7}.Release|Win32.ActiveCfg = Release|Win32 + {19730BF6-7F8C-44EF-ACDC-2CA50C0403E7}.Release|Win32.Build.0 = Release|Win32 + {42B70122-188F-4535-AB74-F061C77068B4}.Debug|Win32.ActiveCfg = Debug|Win32 + {42B70122-188F-4535-AB74-F061C77068B4}.Debug|Win32.Build.0 = Debug|Win32 + {42B70122-188F-4535-AB74-F061C77068B4}.Release|Win32.ActiveCfg = Release|Win32 + {42B70122-188F-4535-AB74-F061C77068B4}.Release|Win32.Build.0 = Release|Win32 + {8F260F48-3C22-48A8-9928-A152ABB2EDF2}.Debug|Win32.ActiveCfg = Debug|Win32 + {8F260F48-3C22-48A8-9928-A152ABB2EDF2}.Debug|Win32.Build.0 = Debug|Win32 + {8F260F48-3C22-48A8-9928-A152ABB2EDF2}.Release|Win32.ActiveCfg = Release|Win32 + {8F260F48-3C22-48A8-9928-A152ABB2EDF2}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/vsprojects/vs2013/grpc.vcxproj b/vsprojects/vs2013/grpc.vcxproj new file mode 100644 index 0000000000..85c36be9ca --- /dev/null +++ b/vsprojects/vs2013/grpc.vcxproj @@ -0,0 +1,322 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {29D16885-7228-4C31-81ED-5F9187C7F2A9} + Win32Proj + + + + + StaticLibrary + true + v120 + Unicode + + + StaticLibrary + false + v120 + true + Unicode + + + + + + + + + + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + $(SolutionDir)\..\..;$(SolutionDir)\..\..\include;%(AdditionalIncludeDirectories) + + + Windows + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + $(SolutionDir)\..\..;$(SolutionDir)\..\..\include;%(AdditionalIncludeDirectories) + + + Windows + true + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vsprojects/vs2013/grpc_test_util.vcxproj b/vsprojects/vs2013/grpc_test_util.vcxproj new file mode 100644 index 0000000000..8fee039bb7 --- /dev/null +++ b/vsprojects/vs2013/grpc_test_util.vcxproj @@ -0,0 +1,100 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + Win32Proj + + + + + StaticLibrary + true + v120 + Unicode + + + StaticLibrary + false + v120 + true + Unicode + + + + + + + + + + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + $(SolutionDir)\..\..;$(SolutionDir)\..\..\include;%(AdditionalIncludeDirectories) + + + Windows + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + $(SolutionDir)\..\..;$(SolutionDir)\..\..\include;%(AdditionalIncludeDirectories) + + + Windows + true + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3