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 --- test/core/end2end/cq_verifier.c | 7 +++++++ test/core/end2end/end2end_tests.c | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) (limited to 'test/core/end2end') 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) { -- cgit v1.2.3