From 732cf09a938b52f1803b49f8168906cd68345a5e Mon Sep 17 00:00:00 2001 From: Nathaniel Manista Date: Fri, 27 Feb 2015 00:47:38 +0000 Subject: [PATCH 01/34] Drop fixed port from python_plugin_test There may be some aspect of mortal sin in the way that context management is now done in this test. --- test/compiler/python_plugin_test.py | 136 +++++++++++++--------------- tools/run_tests/run_python.sh | 2 +- 2 files changed, 66 insertions(+), 72 deletions(-) diff --git a/test/compiler/python_plugin_test.py b/test/compiler/python_plugin_test.py index 3919de14509..1981f49fbb8 100644 --- a/test/compiler/python_plugin_test.py +++ b/test/compiler/python_plugin_test.py @@ -57,7 +57,6 @@ LONG_DELAY = 1 # Assigned in __main__. _build_mode = None -_port = None class _ServicerMethods(object): @@ -87,14 +86,14 @@ class _ServicerMethods(object): while self._paused: time.sleep(0) - def UnaryCall(self, request, context): + def UnaryCall(self, request, unused_context): response = self.test_pb2.SimpleResponse() response.payload.payload_type = self.test_pb2.COMPRESSABLE response.payload.payload_compressable = 'a' * request.response_size self._control() return response - def StreamingOutputCall(self, request, context): + def StreamingOutputCall(self, request, unused_context): for parameter in request.response_parameters: response = self.test_pb2.StreamingOutputCallResponse() response.payload.payload_type = self.test_pb2.COMPRESSABLE @@ -102,7 +101,7 @@ class _ServicerMethods(object): self._control() yield response - def StreamingInputCall(self, request_iter, context): + def StreamingInputCall(self, request_iter, unused_context): response = self.test_pb2.StreamingInputCallResponse() aggregated_payload_size = 0 for request in request_iter: @@ -111,7 +110,7 @@ class _ServicerMethods(object): self._control() return response - def FullDuplexCall(self, request_iter, context): + def FullDuplexCall(self, request_iter, unused_context): for request in request_iter: for parameter in request.response_parameters: response = self.test_pb2.StreamingOutputCallResponse() @@ -120,7 +119,7 @@ class _ServicerMethods(object): self._control() yield response - def HalfDuplexCall(self, request_iter, context): + def HalfDuplexCall(self, request_iter, unused_context): responses = [] for request in request_iter: for parameter in request.response_parameters: @@ -133,6 +132,7 @@ class _ServicerMethods(object): yield response +@contextlib.contextmanager def _CreateService(test_pb2, delay): """Provides a servicer backend and a stub. @@ -148,9 +148,11 @@ def _CreateService(test_pb2, delay): test_pb2: the test_pb2 module generated by this test delay: delay in seconds per response from the servicer timeout: how long the stub will wait for the servicer by default. - Returns: - A two-tuple (servicer, stub), where the servicer is the back-end of the - service bound to the stub. + + Yields: + A three-tuple (servicer_methods, servicer, stub), where the servicer is + the back-end of the service bound to the stub and the server and stub + are both activated and ready for use. """ servicer_methods = _ServicerMethods(test_pb2, delay) @@ -172,10 +174,13 @@ def _CreateService(test_pb2, delay): return servicer_methods.HalfDuplexCall(request_iter, context) servicer = Servicer() - server = getattr(test_pb2, SERVER_FACTORY_IDENTIFIER)(servicer, _port, - None, None) - stub = getattr(test_pb2, STUB_FACTORY_IDENTIFIER)('localhost', _port) - return servicer_methods, stub, server + server = getattr( + test_pb2, SERVER_FACTORY_IDENTIFIER)(servicer, 0, None, None) + with server: + port = server.port() + stub = getattr(test_pb2, STUB_FACTORY_IDENTIFIER)('localhost', port) + with stub: + yield servicer_methods, stub, server def StreamingInputRequest(test_pb2): @@ -255,25 +260,23 @@ class PythonPluginTest(unittest.TestCase): def testUpDown(self): import test_pb2 - servicer, stub, server = _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) - request = test_pb2.SimpleRequest(response_size=13) - with server, stub: - pass + with _CreateService( + test_pb2, DOES_NOT_MATTER_DELAY) as (servicer, stub, unused_server): + request = test_pb2.SimpleRequest(response_size=13) def testUnaryCall(self): import test_pb2 # pylint: disable=g-import-not-at-top - servicer, stub, server = _CreateService(test_pb2, NO_DELAY) - request = test_pb2.SimpleRequest(response_size=13) - with server, stub: + with _CreateService(test_pb2, NO_DELAY) as (servicer, stub, unused_server): + request = test_pb2.SimpleRequest(response_size=13) response = stub.UnaryCall(request, NORMAL_TIMEOUT) expected_response = servicer.UnaryCall(request, None) self.assertEqual(expected_response, response) def testUnaryCallAsync(self): import test_pb2 # pylint: disable=g-import-not-at-top - servicer, stub, server = _CreateService(test_pb2, LONG_DELAY) request = test_pb2.SimpleRequest(response_size=13) - with server, stub: + with _CreateService(test_pb2, LONG_DELAY) as ( + servicer, stub, unused_server): start_time = time.clock() response_future = stub.UnaryCall.async(request, LONG_TIMEOUT) # Check that we didn't block on the asynchronous call. @@ -285,10 +288,9 @@ class PythonPluginTest(unittest.TestCase): def testUnaryCallAsyncExpired(self): import test_pb2 # pylint: disable=g-import-not-at-top # set the timeout super low... - servicer, stub, server = _CreateService(test_pb2, - delay=DOES_NOT_MATTER_DELAY) - request = test_pb2.SimpleRequest(response_size=13) - with server, stub: + with _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) as ( + servicer, stub, unused_server): + request = test_pb2.SimpleRequest(response_size=13) with servicer.pause(): response_future = stub.UnaryCall.async(request, SHORT_TIMEOUT) with self.assertRaises(exceptions.ExpirationError): @@ -296,9 +298,9 @@ class PythonPluginTest(unittest.TestCase): def testUnaryCallAsyncCancelled(self): import test_pb2 # pylint: disable=g-import-not-at-top - servicer, stub, server = _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) request = test_pb2.SimpleRequest(response_size=13) - with server, stub: + with _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) as ( + servicer, stub, unused_server): with servicer.pause(): response_future = stub.UnaryCall.async(request, 1) response_future.cancel() @@ -306,18 +308,17 @@ class PythonPluginTest(unittest.TestCase): def testUnaryCallAsyncFailed(self): import test_pb2 # pylint: disable=g-import-not-at-top - servicer, stub, server = _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) request = test_pb2.SimpleRequest(response_size=13) - with server, stub: + with _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) as ( + servicer, stub, unused_server): with servicer.fail(): response_future = stub.UnaryCall.async(request, NORMAL_TIMEOUT) self.assertIsNotNone(response_future.exception()) def testStreamingOutputCall(self): import test_pb2 # pylint: disable=g-import-not-at-top - servicer, stub, server = _CreateService(test_pb2, NO_DELAY) request = StreamingOutputRequest(test_pb2) - with server, stub: + with _CreateService(test_pb2, NO_DELAY) as (servicer, stub, unused_server): responses = stub.StreamingOutputCall(request, NORMAL_TIMEOUT) expected_responses = servicer.StreamingOutputCall(request, None) for check in itertools.izip_longest(expected_responses, responses): @@ -326,9 +327,9 @@ class PythonPluginTest(unittest.TestCase): def testStreamingOutputCallExpired(self): import test_pb2 # pylint: disable=g-import-not-at-top - servicer, stub, server = _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) request = StreamingOutputRequest(test_pb2) - with server, stub: + with _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) as ( + servicer, stub, unused_server): with servicer.pause(): responses = stub.StreamingOutputCall(request, SHORT_TIMEOUT) with self.assertRaises(exceptions.ExpirationError): @@ -336,10 +337,9 @@ class PythonPluginTest(unittest.TestCase): def testStreamingOutputCallCancelled(self): import test_pb2 # pylint: disable=g-import-not-at-top - unused_servicer, stub, server = _CreateService(test_pb2, - DOES_NOT_MATTER_DELAY) request = StreamingOutputRequest(test_pb2) - with server, stub: + with _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) as ( + unused_servicer, stub, unused_server): responses = stub.StreamingOutputCall(request, SHORT_TIMEOUT) next(responses) responses.cancel() @@ -350,9 +350,9 @@ class PythonPluginTest(unittest.TestCase): 'instead of raising the proper error.') def testStreamingOutputCallFailed(self): import test_pb2 # pylint: disable=g-import-not-at-top - servicer, stub, server = _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) request = StreamingOutputRequest(test_pb2) - with server, stub: + with _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) as ( + servicer, stub, unused_server): with servicer.fail(): responses = stub.StreamingOutputCall(request, 1) self.assertIsNotNone(responses) @@ -361,8 +361,7 @@ class PythonPluginTest(unittest.TestCase): def testStreamingInputCall(self): import test_pb2 # pylint: disable=g-import-not-at-top - servicer, stub, server = _CreateService(test_pb2, NO_DELAY) - with server, stub: + with _CreateService(test_pb2, NO_DELAY) as (servicer, stub, unused_server): response = stub.StreamingInputCall(StreamingInputRequest(test_pb2), NORMAL_TIMEOUT) expected_response = servicer.StreamingInputCall( @@ -371,9 +370,8 @@ class PythonPluginTest(unittest.TestCase): def testStreamingInputCallAsync(self): import test_pb2 # pylint: disable=g-import-not-at-top - servicer, stub, server = _CreateService( - test_pb2, LONG_DELAY) - with server, stub: + with _CreateService(test_pb2, LONG_DELAY) as ( + servicer, stub, unused_server): start_time = time.clock() response_future = stub.StreamingInputCall.async( StreamingInputRequest(test_pb2), LONG_TIMEOUT) @@ -386,8 +384,8 @@ class PythonPluginTest(unittest.TestCase): def testStreamingInputCallAsyncExpired(self): import test_pb2 # pylint: disable=g-import-not-at-top # set the timeout super low... - servicer, stub, server = _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) - with server, stub: + with _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) as ( + servicer, stub, unused_server): with servicer.pause(): response_future = stub.StreamingInputCall.async( StreamingInputRequest(test_pb2), SHORT_TIMEOUT) @@ -398,8 +396,8 @@ class PythonPluginTest(unittest.TestCase): def testStreamingInputCallAsyncCancelled(self): import test_pb2 # pylint: disable=g-import-not-at-top - servicer, stub, server = _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) - with server, stub: + with _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) as ( + servicer, stub, unused_server): with servicer.pause(): response_future = stub.StreamingInputCall.async( StreamingInputRequest(test_pb2), NORMAL_TIMEOUT) @@ -410,8 +408,8 @@ class PythonPluginTest(unittest.TestCase): def testStreamingInputCallAsyncFailed(self): import test_pb2 # pylint: disable=g-import-not-at-top - servicer, stub, server = _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) - with server, stub: + with _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) as ( + servicer, stub, unused_server): with servicer.fail(): response_future = stub.StreamingInputCall.async( StreamingInputRequest(test_pb2), SHORT_TIMEOUT) @@ -419,8 +417,7 @@ class PythonPluginTest(unittest.TestCase): def testFullDuplexCall(self): import test_pb2 # pylint: disable=g-import-not-at-top - servicer, stub, server = _CreateService(test_pb2, NO_DELAY) - with server, stub: + with _CreateService(test_pb2, NO_DELAY) as (servicer, stub, unused_server): responses = stub.FullDuplexCall(FullDuplexRequest(test_pb2), NORMAL_TIMEOUT) expected_responses = servicer.FullDuplexCall(FullDuplexRequest(test_pb2), @@ -431,9 +428,9 @@ class PythonPluginTest(unittest.TestCase): def testFullDuplexCallExpired(self): import test_pb2 # pylint: disable=g-import-not-at-top - servicer, stub, server = _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) request = FullDuplexRequest(test_pb2) - with server, stub: + with _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) as ( + servicer, stub, unused_server): with servicer.pause(): responses = stub.FullDuplexCall(request, SHORT_TIMEOUT) with self.assertRaises(exceptions.ExpirationError): @@ -441,8 +438,7 @@ class PythonPluginTest(unittest.TestCase): def testFullDuplexCallCancelled(self): import test_pb2 # pylint: disable=g-import-not-at-top - unused_servicer, stub, server = _CreateService(test_pb2, NO_DELAY) - with server, stub: + with _CreateService(test_pb2, NO_DELAY) as (servicer, stub, unused_server): request = FullDuplexRequest(test_pb2) responses = stub.FullDuplexCall(request, NORMAL_TIMEOUT) next(responses) @@ -454,9 +450,9 @@ class PythonPluginTest(unittest.TestCase): 'and fix.') def testFullDuplexCallFailed(self): import test_pb2 # pylint: disable=g-import-not-at-top - servicer, stub, server = _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) request = FullDuplexRequest(test_pb2) - with server, stub: + with _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) as ( + servicer, stub, unused_server): with servicer.fail(): responses = stub.FullDuplexCall(request, NORMAL_TIMEOUT) self.assertIsNotNone(responses) @@ -465,16 +461,16 @@ class PythonPluginTest(unittest.TestCase): def testHalfDuplexCall(self): import test_pb2 # pylint: disable=g-import-not-at-top - servicer, stub, server = _CreateService(test_pb2, NO_DELAY) - def HalfDuplexRequest(): - request = test_pb2.StreamingOutputCallRequest() - request.response_parameters.add(size=1, interval_us=0) - yield request - request = test_pb2.StreamingOutputCallRequest() - request.response_parameters.add(size=2, interval_us=0) - request.response_parameters.add(size=3, interval_us=0) - yield request - with server, stub: + with _CreateService(test_pb2, DOES_NOT_MATTER_DELAY) as ( + servicer, stub, unused_server): + def HalfDuplexRequest(): + request = test_pb2.StreamingOutputCallRequest() + request.response_parameters.add(size=1, interval_us=0) + yield request + request = test_pb2.StreamingOutputCallRequest() + request.response_parameters.add(size=2, interval_us=0) + request.response_parameters.add(size=3, interval_us=0) + yield request responses = stub.HalfDuplexCall(HalfDuplexRequest(), NORMAL_TIMEOUT) expected_responses = servicer.HalfDuplexCall(HalfDuplexRequest(), None) for check in itertools.izip_longest(expected_responses, responses): @@ -483,7 +479,6 @@ class PythonPluginTest(unittest.TestCase): def testHalfDuplexCallWedged(self): import test_pb2 # pylint: disable=g-import-not-at-top - _, stub, server = _CreateService(test_pb2, NO_DELAY) wait_flag = [False] @contextlib.contextmanager def wait(): # pylint: disable=invalid-name @@ -497,7 +492,7 @@ class PythonPluginTest(unittest.TestCase): yield request while wait_flag[0]: time.sleep(0.1) - with server, stub: + with _CreateService(test_pb2, NO_DELAY) as (servicer, stub, unused_server): with wait(): responses = stub.HalfDuplexCall(HalfDuplexRequest(), NORMAL_TIMEOUT) # half-duplex waits for the client to send all info @@ -516,6 +511,5 @@ if __name__ == '__main__': parser.add_argument('--port', dest='port', type=int, default=0) args, remainder = parser.parse_known_args() _build_mode = args.build_mode - _port = args.port sys.argv[1:] = remainder unittest.main() diff --git a/tools/run_tests/run_python.sh b/tools/run_tests/run_python.sh index 19f1458fabb..06ddb8e41ac 100755 --- a/tools/run_tests/run_python.sh +++ b/tools/run_tests/run_python.sh @@ -38,7 +38,7 @@ export LD_LIBRARY_PATH=$root/libs/opt source python2.7_virtual_environment/bin/activate # TODO(issue 215): Properly itemize these in run_tests.py so that they can be parallelized. # TODO(atash): Enable dynamic unused port discovery for this test. -python2.7 -B test/compiler/python_plugin_test.py --build_mode=opt --port=40987 +python2.7 -B test/compiler/python_plugin_test.py --build_mode=opt python2.7 -B -m grpc._adapter._blocking_invocation_inline_service_test python2.7 -B -m grpc._adapter._c_test python2.7 -B -m grpc._adapter._event_invocation_synchronous_event_service_test From c8330f86601239906f7983ae49f34c62c6c87b51 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 26 Feb 2015 18:21:48 -0800 Subject: [PATCH 02/34] Added useful information and links to Node's package.json --- src/node/package.json | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/node/package.json b/src/node/package.json index 8e0a7bdb25c..0ef1c990b1e 100644 --- a/src/node/package.json +++ b/src/node/package.json @@ -1,14 +1,24 @@ { "name": "grpc", - "version": "0.5.0", + "version": "0.5.1", "author": "Google Inc.", "description": "gRPC Library for Node", + "homepage": "http://www.grpc.io/", + "repository": { + "type": "git", + "url": "https://github.com/grpc/grpc.git" + }, + "bugs": "https://github.com/grpc/grpc/issues", "contributors": [ { "name": "Michael Lumish", "email": "mlumish@google.com" } ], + "directories": { + "lib": "src", + "example": "examples" + }, "scripts": { "lint": "node ./node_modules/jshint/bin/jshint src test examples interop index.js", "test": "node ./node_modules/mocha/bin/mocha && npm run-script lint" From 503bbac2175c4dced3f82be428b74eafe4141251 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 26 Feb 2015 18:19:47 -0800 Subject: [PATCH 03/34] added C# interop server --- src/csharp/Grpc.Core/Grpc.Core.csproj | 2 +- src/csharp/Grpc.Core/Server.cs | 11 ++ .../Grpc.IntegrationTesting.Client/.gitignore | 3 + .../Grpc.IntegrationTesting.Client.csproj | 49 ++++++ .../Grpc.IntegrationTesting.Client/Program.cs | 46 ++++++ .../Properties/AssemblyInfo.cs | 22 +++ .../Grpc.IntegrationTesting.Server/.gitignore | 3 + .../Grpc.IntegrationTesting.Server.csproj | 49 ++++++ .../Grpc.IntegrationTesting.Server/Program.cs | 45 ++++++ .../Properties/AssemblyInfo.cs | 22 +++ .../Grpc.IntegrationTesting.csproj | 6 +- .../{Client.cs => InteropClient.cs} | 8 +- .../InteropClientServerTest.cs | 12 +- .../Grpc.IntegrationTesting/InteropServer.cs | 140 ++++++++++++++++++ src/csharp/Grpc.sln | 12 ++ 15 files changed, 416 insertions(+), 14 deletions(-) create mode 100644 src/csharp/Grpc.IntegrationTesting.Client/.gitignore create mode 100644 src/csharp/Grpc.IntegrationTesting.Client/Grpc.IntegrationTesting.Client.csproj create mode 100644 src/csharp/Grpc.IntegrationTesting.Client/Program.cs create mode 100644 src/csharp/Grpc.IntegrationTesting.Client/Properties/AssemblyInfo.cs create mode 100644 src/csharp/Grpc.IntegrationTesting.Server/.gitignore create mode 100644 src/csharp/Grpc.IntegrationTesting.Server/Grpc.IntegrationTesting.Server.csproj create mode 100644 src/csharp/Grpc.IntegrationTesting.Server/Program.cs create mode 100644 src/csharp/Grpc.IntegrationTesting.Server/Properties/AssemblyInfo.cs rename src/csharp/Grpc.IntegrationTesting/{Client.cs => InteropClient.cs} (98%) create mode 100644 src/csharp/Grpc.IntegrationTesting/InteropServer.cs diff --git a/src/csharp/Grpc.Core/Grpc.Core.csproj b/src/csharp/Grpc.Core/Grpc.Core.csproj index 183c4423583..de742f99add 100644 --- a/src/csharp/Grpc.Core/Grpc.Core.csproj +++ b/src/csharp/Grpc.Core/Grpc.Core.csproj @@ -76,7 +76,7 @@ - + \ No newline at end of file diff --git a/src/csharp/Grpc.Core/Server.cs b/src/csharp/Grpc.Core/Server.cs index 002592a3d88..152cc2176c0 100644 --- a/src/csharp/Grpc.Core/Server.cs +++ b/src/csharp/Grpc.Core/Server.cs @@ -124,6 +124,17 @@ namespace Grpc.Core handle.Dispose(); } + /// + /// To allow awaiting termination of the server. + /// + public Task ShutdownTask + { + get + { + return shutdownTcs.Task; + } + } + public void Kill() { handle.Dispose(); } diff --git a/src/csharp/Grpc.IntegrationTesting.Client/.gitignore b/src/csharp/Grpc.IntegrationTesting.Client/.gitignore new file mode 100644 index 00000000000..a382af2294f --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting.Client/.gitignore @@ -0,0 +1,3 @@ +bin +obj + diff --git a/src/csharp/Grpc.IntegrationTesting.Client/Grpc.IntegrationTesting.Client.csproj b/src/csharp/Grpc.IntegrationTesting.Client/Grpc.IntegrationTesting.Client.csproj new file mode 100644 index 00000000000..b1a4a81916a --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting.Client/Grpc.IntegrationTesting.Client.csproj @@ -0,0 +1,49 @@ + + + + Debug + x86 + 10.0.0 + 2.0 + {3D166931-BA2D-416E-95A3-D36E8F6E90B9} + Exe + Grpc.IntegrationTesting.Client + Grpc.IntegrationTesting.Client + Grpc.IntegrationTesting.Client.Program + v4.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + true + x86 + + + full + true + bin\Release + prompt + 4 + true + x86 + + + + + + + + + + + + {C61154BA-DD4A-4838-8420-0162A28925E0} + Grpc.IntegrationTesting + + + \ No newline at end of file diff --git a/src/csharp/Grpc.IntegrationTesting.Client/Program.cs b/src/csharp/Grpc.IntegrationTesting.Client/Program.cs new file mode 100644 index 00000000000..2e1c9aaac25 --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting.Client/Program.cs @@ -0,0 +1,46 @@ +#region Copyright notice and license + +// Copyright 2015, 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. + +#endregion + +using System; +using Grpc.IntegrationTesting; + +namespace Grpc.IntegrationTesting.Client +{ + class Program + { + public static void Main(string[] args) + { + InteropClient.Run(args); + } + } +} diff --git a/src/csharp/Grpc.IntegrationTesting.Client/Properties/AssemblyInfo.cs b/src/csharp/Grpc.IntegrationTesting.Client/Properties/AssemblyInfo.cs new file mode 100644 index 00000000000..d1f9e8560dc --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting.Client/Properties/AssemblyInfo.cs @@ -0,0 +1,22 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// Information about this assembly is defined by the following attributes. +// Change them to the values specific to your project. +[assembly: AssemblyTitle("Grpc.IntegrationTesting.Client")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("Google Inc. All rights reserved.")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". +// The form "{Major}.{Minor}.*" will automatically update the build and revision, +// and "{Major}.{Minor}.{Build}.*" will update just the revision. +[assembly: AssemblyVersion("0.1.*")] +// The following attributes are used to specify the signing key for the assembly, +// if desired. See the Mono documentation for more information about signing. +//[assembly: AssemblyDelaySign(false)] +//[assembly: AssemblyKeyFile("")] + diff --git a/src/csharp/Grpc.IntegrationTesting.Server/.gitignore b/src/csharp/Grpc.IntegrationTesting.Server/.gitignore new file mode 100644 index 00000000000..a382af2294f --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting.Server/.gitignore @@ -0,0 +1,3 @@ +bin +obj + diff --git a/src/csharp/Grpc.IntegrationTesting.Server/Grpc.IntegrationTesting.Server.csproj b/src/csharp/Grpc.IntegrationTesting.Server/Grpc.IntegrationTesting.Server.csproj new file mode 100644 index 00000000000..73c9f2d2077 --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting.Server/Grpc.IntegrationTesting.Server.csproj @@ -0,0 +1,49 @@ + + + + Debug + x86 + 10.0.0 + 2.0 + {A654F3B8-E859-4E6A-B30D-227527DBEF0D} + Exe + Grpc.IntegrationTesting.Server + Grpc.IntegrationTesting.Server + Grpc.IntegrationTesting.Server.Program + v4.5 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + true + x86 + + + full + true + bin\Release + prompt + 4 + true + x86 + + + + + + + + + + + + {C61154BA-DD4A-4838-8420-0162A28925E0} + Grpc.IntegrationTesting + + + \ No newline at end of file diff --git a/src/csharp/Grpc.IntegrationTesting.Server/Program.cs b/src/csharp/Grpc.IntegrationTesting.Server/Program.cs new file mode 100644 index 00000000000..01bcc6e3081 --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting.Server/Program.cs @@ -0,0 +1,45 @@ +#region Copyright notice and license + +// Copyright 2015, 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. + +#endregion + +using System; + +namespace Grpc.IntegrationTesting.Server +{ + class Program + { + public static void Main(string[] args) + { + InteropServer.Run(args); + } + } +} diff --git a/src/csharp/Grpc.IntegrationTesting.Server/Properties/AssemblyInfo.cs b/src/csharp/Grpc.IntegrationTesting.Server/Properties/AssemblyInfo.cs new file mode 100644 index 00000000000..4ef93f328d2 --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting.Server/Properties/AssemblyInfo.cs @@ -0,0 +1,22 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// Information about this assembly is defined by the following attributes. +// Change them to the values specific to your project. +[assembly: AssemblyTitle("Grpc.IntegrationTesting.Server")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("Google Inc. All rights reserved.")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". +// The form "{Major}.{Minor}.*" will automatically update the build and revision, +// and "{Major}.{Minor}.{Build}.*" will update just the revision. +[assembly: AssemblyVersion("0.1.*")] +// The following attributes are used to specify the signing key for the assembly, +// if desired. See the Mono documentation for more information about signing. +//[assembly: AssemblyDelaySign(false)] +//[assembly: AssemblyKeyFile("")] + diff --git a/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.csproj b/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.csproj index e66f708a945..6d6aaf57473 100644 --- a/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.csproj +++ b/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.csproj @@ -6,10 +6,9 @@ 10.0.0 2.0 {C61154BA-DD4A-4838-8420-0162A28925E0} - Exe + Library Grpc.IntegrationTesting Grpc.IntegrationTesting - Grpc.IntegrationTesting.Client v4.5 @@ -43,12 +42,13 @@ - + + diff --git a/src/csharp/Grpc.IntegrationTesting/Client.cs b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs similarity index 98% rename from src/csharp/Grpc.IntegrationTesting/Client.cs rename to src/csharp/Grpc.IntegrationTesting/InteropClient.cs index fa1c7cd051b..a7a3c63e032 100644 --- a/src/csharp/Grpc.IntegrationTesting/Client.cs +++ b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs @@ -44,7 +44,7 @@ using grpc.testing; namespace Grpc.IntegrationTesting { - class Client + public class InteropClient { private class ClientOptions { @@ -59,12 +59,12 @@ namespace Grpc.IntegrationTesting ClientOptions options; - private Client(ClientOptions options) + private InteropClient(ClientOptions options) { this.options = options; } - public static void Main(string[] args) + public static void Run(string[] args) { Console.WriteLine("gRPC C# interop testing client"); ClientOptions options = ParseArguments(args); @@ -89,7 +89,7 @@ namespace Grpc.IntegrationTesting Environment.Exit(1); } - var interopClient = new Client(options); + var interopClient = new InteropClient(options); interopClient.Run(); } diff --git a/src/csharp/Grpc.IntegrationTesting/InteropClientServerTest.cs b/src/csharp/Grpc.IntegrationTesting/InteropClientServerTest.cs index 87d25b0a98c..4bb0b9ee51f 100644 --- a/src/csharp/Grpc.IntegrationTesting/InteropClientServerTest.cs +++ b/src/csharp/Grpc.IntegrationTesting/InteropClientServerTest.cs @@ -77,37 +77,37 @@ namespace Grpc.IntegrationTesting [Test] public void EmptyUnary() { - Client.RunEmptyUnary(client); + InteropClient.RunEmptyUnary(client); } [Test] public void LargeUnary() { - Client.RunEmptyUnary(client); + InteropClient.RunEmptyUnary(client); } [Test] public void ClientStreaming() { - Client.RunClientStreaming(client); + InteropClient.RunClientStreaming(client); } [Test] public void ServerStreaming() { - Client.RunServerStreaming(client); + InteropClient.RunServerStreaming(client); } [Test] public void PingPong() { - Client.RunPingPong(client); + InteropClient.RunPingPong(client); } [Test] public void EmptyStream() { - Client.RunEmptyStream(client); + InteropClient.RunEmptyStream(client); } // TODO: add cancel_after_begin diff --git a/src/csharp/Grpc.IntegrationTesting/InteropServer.cs b/src/csharp/Grpc.IntegrationTesting/InteropServer.cs new file mode 100644 index 00000000000..a25d3b3530f --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting/InteropServer.cs @@ -0,0 +1,140 @@ +#region Copyright notice and license + +// Copyright 2015, 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. + +#endregion + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Text.RegularExpressions; +using System.Threading.Tasks; +using Google.ProtocolBuffers; +using Grpc.Core; +using Grpc.Core.Utils; +using NUnit.Framework; +using grpc.testing; + +namespace Grpc.IntegrationTesting +{ + public class InteropServer + { + private class ServerOptions + { + public bool help; + public int? port; + public bool useTls; + } + + ServerOptions options; + + private InteropServer(ServerOptions options) + { + this.options = options; + } + + public static void Run(string[] args) + { + Console.WriteLine("gRPC C# interop testing server"); + ServerOptions options = ParseArguments(args); + + if (!options.port.HasValue) + { + Console.WriteLine("Missing required argument."); + Console.WriteLine(); + options.help = true; + } + + if (options.help) + { + Console.WriteLine("Usage:"); + Console.WriteLine(" --port=PORT"); + Console.WriteLine(" --use_tls=BOOLEAN"); + Console.WriteLine(); + Environment.Exit(1); + } + + var interopServer = new InteropServer(options); + interopServer.Run(); + } + + private void Run() + { + GrpcEnvironment.Initialize(); + + var server = new Server(); + server.AddServiceDefinition(TestServiceGrpc.BindService(new TestServiceImpl())); + + string addr = "0.0.0.0:" + options.port; + server.AddPort(addr); + Console.WriteLine("Running server on " + addr); + server.Start(); + + server.ShutdownTask.Wait(); + + GrpcEnvironment.Shutdown(); + } + + private static ServerOptions ParseArguments(string[] args) + { + var options = new ServerOptions(); + foreach(string arg in args) + { + ParseArgument(arg, options); + if (options.help) + { + break; + } + } + return options; + } + + private static void ParseArgument(string arg, ServerOptions options) + { + Match match; + match = Regex.Match(arg, "--port=(.*)"); + if (match.Success) + { + options.port = int.Parse(match.Groups[1].Value.Trim()); + return; + } + + match = Regex.Match(arg, "--use_tls=(.*)"); + if (match.Success) + { + options.useTls = bool.Parse(match.Groups[1].Value.Trim()); + return; + } + + Console.WriteLine(string.Format("Unrecognized argument \"{0}\"", arg)); + options.help = true; + } + } +} diff --git a/src/csharp/Grpc.sln b/src/csharp/Grpc.sln index a544eb1c338..2e6d2886993 100644 --- a/src/csharp/Grpc.sln +++ b/src/csharp/Grpc.sln @@ -13,6 +13,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Grpc.Examples.MathClient", EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Grpc.IntegrationTesting", "Grpc.IntegrationTesting\Grpc.IntegrationTesting.csproj", "{C61154BA-DD4A-4838-8420-0162A28925E0}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Grpc.IntegrationTesting.Client", "Grpc.IntegrationTesting.Client\Grpc.IntegrationTesting.Client.csproj", "{3D166931-BA2D-416E-95A3-D36E8F6E90B9}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Grpc.IntegrationTesting.Server", "Grpc.IntegrationTesting.Server\Grpc.IntegrationTesting.Server.csproj", "{A654F3B8-E859-4E6A-B30D-227527DBEF0D}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x86 = Debug|x86 @@ -23,6 +27,10 @@ Global {143B1C29-C442-4BE0-BF3F-A8F92288AC9F}.Debug|x86.Build.0 = Debug|Any CPU {143B1C29-C442-4BE0-BF3F-A8F92288AC9F}.Release|x86.ActiveCfg = Release|Any CPU {143B1C29-C442-4BE0-BF3F-A8F92288AC9F}.Release|x86.Build.0 = Release|Any CPU + {3D166931-BA2D-416E-95A3-D36E8F6E90B9}.Debug|x86.ActiveCfg = Debug|x86 + {3D166931-BA2D-416E-95A3-D36E8F6E90B9}.Debug|x86.Build.0 = Debug|x86 + {3D166931-BA2D-416E-95A3-D36E8F6E90B9}.Release|x86.ActiveCfg = Release|x86 + {3D166931-BA2D-416E-95A3-D36E8F6E90B9}.Release|x86.Build.0 = Release|x86 {61ECB8EE-0C96-4F8E-B187-8E4D227417C0}.Debug|x86.ActiveCfg = Debug|x86 {61ECB8EE-0C96-4F8E-B187-8E4D227417C0}.Debug|x86.Build.0 = Debug|x86 {61ECB8EE-0C96-4F8E-B187-8E4D227417C0}.Release|x86.ActiveCfg = Release|x86 @@ -35,6 +43,10 @@ Global {86EC5CB4-4EA2-40A2-8057-86542A0353BB}.Debug|x86.Build.0 = Debug|Any CPU {86EC5CB4-4EA2-40A2-8057-86542A0353BB}.Release|x86.ActiveCfg = Release|Any CPU {86EC5CB4-4EA2-40A2-8057-86542A0353BB}.Release|x86.Build.0 = Release|Any CPU + {A654F3B8-E859-4E6A-B30D-227527DBEF0D}.Debug|x86.ActiveCfg = Debug|x86 + {A654F3B8-E859-4E6A-B30D-227527DBEF0D}.Debug|x86.Build.0 = Debug|x86 + {A654F3B8-E859-4E6A-B30D-227527DBEF0D}.Release|x86.ActiveCfg = Release|x86 + {A654F3B8-E859-4E6A-B30D-227527DBEF0D}.Release|x86.Build.0 = Release|x86 {C61154BA-DD4A-4838-8420-0162A28925E0}.Debug|x86.ActiveCfg = Debug|x86 {C61154BA-DD4A-4838-8420-0162A28925E0}.Debug|x86.Build.0 = Debug|x86 {C61154BA-DD4A-4838-8420-0162A28925E0}.Release|x86.ActiveCfg = Release|x86 From 46566b8c953993ca3c87fc8440ccacda2bbafd1c Mon Sep 17 00:00:00 2001 From: Aggelos Avgerinos Date: Fri, 27 Feb 2015 09:31:23 +0200 Subject: [PATCH 04/34] Fix typos 'proivde' -> 'provide' and 'e,g.' -> 'e.g.' --- src/ruby/lib/grpc/generic/service.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ruby/lib/grpc/generic/service.rb b/src/ruby/lib/grpc/generic/service.rb index 61d18716354..6ea0831a2e6 100644 --- a/src/ruby/lib/grpc/generic/service.rb +++ b/src/ruby/lib/grpc/generic/service.rb @@ -217,8 +217,8 @@ module GRPC def self.included(o) o.extend(Dsl) - # Update to the use the service name including module. Proivde a default - # that can be nil e,g. when modules are declared dynamically. + # Update to the use the service name including module. Provide a default + # that can be nil e.g. when modules are declared dynamically. return unless o.service_name.nil? if o.name.nil? o.service_name = 'GenericService' From 7b5eb7193c7b2411571a67aa6d7fbb21bdffa099 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 27 Feb 2015 07:52:09 -0800 Subject: [PATCH 05/34] Increment 'try' variable To ensure that we actually probe different ports --- test/core/util/port_posix.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/core/util/port_posix.c b/test/core/util/port_posix.c index 55150a7cedc..36f13e1b51e 100644 --- a/test/core/util/port_posix.c +++ b/test/core/util/port_posix.c @@ -117,9 +117,10 @@ int grpc_pick_unused_port(void) { for (;;) { int port; - if (try == 0) { + try++; + if (try == 1) { port = getpid() % (65536 - 30000) + 30000; - } else if (try < NUM_RANDOM_PORTS_TO_PICK) { + } else if (try <= NUM_RANDOM_PORTS_TO_PICK) { port = rand() % (65536 - 30000) + 30000; } else { port = 0; From e1d0d1c549959f55e9ae24f61209011777604526 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 27 Feb 2015 08:54:23 -0800 Subject: [PATCH 06/34] Make timeout red --- tools/run_tests/jobset.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/run_tests/jobset.py b/tools/run_tests/jobset.py index b8178ffebf1..ad65da535b4 100755 --- a/tools/run_tests/jobset.py +++ b/tools/run_tests/jobset.py @@ -99,6 +99,7 @@ _CLEAR_LINE = '\x1b[2K' _TAG_COLOR = { 'FAILED': 'red', + 'TIMEOUT': 'red', 'PASSED': 'green', 'START': 'gray', 'WAITING': 'yellow', From 867e6b6b3c116c0a6cea1b9906cfbbbce4cff0eb Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 27 Feb 2015 09:08:53 -0800 Subject: [PATCH 07/34] Update README.md --- src/csharp/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/csharp/README.md b/src/csharp/README.md index 55739a1f83c..21aab521180 100755 --- a/src/csharp/README.md +++ b/src/csharp/README.md @@ -9,7 +9,7 @@ Status **This gRPC C# implementation is work-in-progress and is not expected to work yet.** - The implementation is a wrapper around gRPC C core library -- Code only runs under mono currently, building gGRPC C core library under Windows +- Code only runs under mono currently, building gRPC C core library under Windows is in progress. - It is very possible that some parts of the code will be heavily refactored or completely rewritten. From f6901be8cdba766d0bfe966305312b507ec0d1ce Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 27 Feb 2015 09:12:58 -0800 Subject: [PATCH 08/34] Allow machine and build type tuning of slowdown --- Makefile | 10 +++++----- templates/Makefile.template | 10 +++++----- test/core/util/test_config.h | 13 ++++++++++--- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 2baf0d6ba2a..4aacb99826b 100644 --- a/Makefile +++ b/Makefile @@ -77,7 +77,7 @@ LDXX_valgrind = g++ CPPFLAGS_valgrind = -O0 OPENSSL_CFLAGS_valgrind = -DPURIFY LDFLAGS_valgrind = -DEFINES_valgrind = _DEBUG DEBUG GRPC_TEST_SLOWDOWN_FACTOR=20 +DEFINES_valgrind = _DEBUG DEBUG GRPC_TEST_SLOWDOWN_BUILD_FACTOR=20 VALID_CONFIG_tsan = 1 REQUIRE_CUSTOM_LIBRARIES_tsan = 1 @@ -87,7 +87,7 @@ LD_tsan = clang LDXX_tsan = clang++ CPPFLAGS_tsan = -O1 -fsanitize=thread -fno-omit-frame-pointer LDFLAGS_tsan = -fsanitize=thread -DEFINES_tsan = NDEBUG GRPC_TEST_SLOWDOWN_FACTOR=10 +DEFINES_tsan = NDEBUG GRPC_TEST_SLOWDOWN_BUILD_FACTOR=10 VALID_CONFIG_asan = 1 REQUIRE_CUSTOM_LIBRARIES_asan = 1 @@ -97,7 +97,7 @@ LD_asan = clang LDXX_asan = clang++ CPPFLAGS_asan = -O1 -fsanitize=address -fno-omit-frame-pointer LDFLAGS_asan = -fsanitize=address -DEFINES_asan = NDEBUG GRPC_TEST_SLOWDOWN_FACTOR=5 +DEFINES_asan = NDEBUG GRPC_TEST_SLOWDOWN_BUILD_FACTOR=5 VALID_CONFIG_msan = 1 REQUIRE_CUSTOM_LIBRARIES_msan = 1 @@ -108,7 +108,7 @@ LDXX_msan = clang++-libc++ CPPFLAGS_msan = -O1 -fsanitize=memory -fsanitize-memory-track-origins -fno-omit-frame-pointer -DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=1 OPENSSL_CFLAGS_msan = -DPURIFY LDFLAGS_msan = -fsanitize=memory -DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=1 -DEFINES_msan = NDEBUG GRPC_TEST_SLOWDOWN_FACTOR=20 +DEFINES_msan = NDEBUG GRPC_TEST_SLOWDOWN_BUILD_FACTOR=20 VALID_CONFIG_ubsan = 1 REQUIRE_CUSTOM_LIBRARIES_ubsan = 1 @@ -119,7 +119,7 @@ LDXX_ubsan = clang++ CPPFLAGS_ubsan = -O1 -fsanitize=undefined -fno-omit-frame-pointer OPENSSL_CFLAGS_ubsan = -DPURIFY LDFLAGS_ubsan = -fsanitize=undefined -DEFINES_ubsan = NDEBUG GRPC_TEST_SLOWDOWN_FACTOR=10 +DEFINES_ubsan = NDEBUG GRPC_TEST_SLOWDOWN_BUILD_FACTOR=10 VALID_CONFIG_gcov = 1 CC_gcov = gcc diff --git a/templates/Makefile.template b/templates/Makefile.template index 491f142142e..caac5037965 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -94,7 +94,7 @@ LDXX_valgrind = g++ CPPFLAGS_valgrind = -O0 OPENSSL_CFLAGS_valgrind = -DPURIFY LDFLAGS_valgrind = -DEFINES_valgrind = _DEBUG DEBUG GRPC_TEST_SLOWDOWN_FACTOR=20 +DEFINES_valgrind = _DEBUG DEBUG GRPC_TEST_SLOWDOWN_BUILD_FACTOR=20 VALID_CONFIG_tsan = 1 REQUIRE_CUSTOM_LIBRARIES_tsan = 1 @@ -104,7 +104,7 @@ LD_tsan = clang LDXX_tsan = clang++ CPPFLAGS_tsan = -O1 -fsanitize=thread -fno-omit-frame-pointer LDFLAGS_tsan = -fsanitize=thread -DEFINES_tsan = NDEBUG GRPC_TEST_SLOWDOWN_FACTOR=10 +DEFINES_tsan = NDEBUG GRPC_TEST_SLOWDOWN_BUILD_FACTOR=10 VALID_CONFIG_asan = 1 REQUIRE_CUSTOM_LIBRARIES_asan = 1 @@ -114,7 +114,7 @@ LD_asan = clang LDXX_asan = clang++ CPPFLAGS_asan = -O1 -fsanitize=address -fno-omit-frame-pointer LDFLAGS_asan = -fsanitize=address -DEFINES_asan = NDEBUG GRPC_TEST_SLOWDOWN_FACTOR=5 +DEFINES_asan = NDEBUG GRPC_TEST_SLOWDOWN_BUILD_FACTOR=5 VALID_CONFIG_msan = 1 REQUIRE_CUSTOM_LIBRARIES_msan = 1 @@ -125,7 +125,7 @@ LDXX_msan = clang++-libc++ CPPFLAGS_msan = -O1 -fsanitize=memory -fsanitize-memory-track-origins -fno-omit-frame-pointer -DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=1 OPENSSL_CFLAGS_msan = -DPURIFY LDFLAGS_msan = -fsanitize=memory -DGTEST_HAS_TR1_TUPLE=0 -DGTEST_USE_OWN_TR1_TUPLE=1 -DEFINES_msan = NDEBUG GRPC_TEST_SLOWDOWN_FACTOR=20 +DEFINES_msan = NDEBUG GRPC_TEST_SLOWDOWN_BUILD_FACTOR=20 VALID_CONFIG_ubsan = 1 REQUIRE_CUSTOM_LIBRARIES_ubsan = 1 @@ -136,7 +136,7 @@ LDXX_ubsan = clang++ CPPFLAGS_ubsan = -O1 -fsanitize=undefined -fno-omit-frame-pointer OPENSSL_CFLAGS_ubsan = -DPURIFY LDFLAGS_ubsan = -fsanitize=undefined -DEFINES_ubsan = NDEBUG GRPC_TEST_SLOWDOWN_FACTOR=10 +DEFINES_ubsan = NDEBUG GRPC_TEST_SLOWDOWN_BUILD_FACTOR=10 VALID_CONFIG_gcov = 1 CC_gcov = gcc diff --git a/test/core/util/test_config.h b/test/core/util/test_config.h index 74c2a3cf1b1..5292c7b525e 100644 --- a/test/core/util/test_config.h +++ b/test/core/util/test_config.h @@ -40,16 +40,23 @@ extern "C" { #endif /* __cplusplus */ -#ifndef GRPC_TEST_SLOWDOWN_FACTOR -#define GRPC_TEST_SLOWDOWN_FACTOR 1.0 +#ifndef GRPC_TEST_SLOWDOWN_BUILD_FACTOR +#define GRPC_TEST_SLOWDOWN_BUILD_FACTOR 1.0 #endif +#ifndef GRPC_TEST_SLOWDOWN_MACHINE_FACTOR +#define GRPC_TEST_SLOWDOWN_MACHINE_FACTOR 1.0 +#endif + +#define GRPC_TEST_SLOWDOWN_FACTOR \ + (GRPC_TEST_SLOWDOWN_BUILD_FACTOR * GRPC_TEST_SLOWDOWN_MACHINE_FACTOR) + #define GRPC_TIMEOUT_SECONDS_TO_DEADLINE(x) \ gpr_time_add(gpr_now(), \ gpr_time_from_micros(GRPC_TEST_SLOWDOWN_FACTOR * 1e6 * (x))) #define GRPC_TIMEOUT_MILLIS_TO_DEADLINE(x) \ - gpr_time_add(gpr_now(), \ + gpr_time_add(gpr_now(), \ gpr_time_from_micros(GRPC_TEST_SLOWDOWN_FACTOR * 1e3 * (x))) void grpc_test_init(int argc, char **argv); From a04a64d368cd72114e0ce9894aec56cf8fc9c958 Mon Sep 17 00:00:00 2001 From: Eric Anderson Date: Fri, 27 Feb 2015 09:10:04 -0800 Subject: [PATCH 09/34] Update Java Dockerfile to proto3-alpha-2 and add nanoproto --- tools/dockerfile/grpc_java_base/Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/dockerfile/grpc_java_base/Dockerfile b/tools/dockerfile/grpc_java_base/Dockerfile index feac5e745e3..3eebc2bb93f 100644 --- a/tools/dockerfile/grpc_java_base/Dockerfile +++ b/tools/dockerfile/grpc_java_base/Dockerfile @@ -51,13 +51,14 @@ ENV PATH $PATH:$JAVA_HOME/bin:$M2_HOME/bin ENV LD_LIBRARY_PATH /usr/local/lib # Get the protobuf source from GitHub and install it -RUN wget -O - https://github.com/google/protobuf/archive/master.tar.gz | \ +RUN wget -O - https://github.com/google/protobuf/archive/v3.0.0-alpha-2.tar.gz | \ tar xz && \ - cd protobuf-master && \ + cd protobuf-3.0.0-alpha-2 && \ ./autogen.sh && \ ./configure --prefix=/usr && \ make -j12 && make check && make install && \ cd java && mvn install && cd .. && \ + cd javanano && mvn install && cd .. && \ rm -r "$(pwd)" # Install a GitHub SSH service credential that gives access to the GitHub repo while it's private From 8451e87cedfda3538e004ff292abc7749fcd9cd2 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 27 Feb 2015 09:25:51 -0800 Subject: [PATCH 10/34] Extend timeouts for Travis 2x --- .travis.yml | 8 ++++---- test/core/util/test_config.c | 4 ++++ tools/run_tests/run_tests.py | 2 ++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index d8c9e385bbc..d770e7261f5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,11 +4,11 @@ before_install: - sudo apt-get update -qq - sudo apt-get install -qq libgtest-dev libgflags-dev python-virtualenv script: - - ./tools/run_tests/run_tests.py -l c -t -j 16 -c dbg - - ./tools/run_tests/run_tests.py -l c++ -t -j 16 -c dbg + - ./tools/run_tests/run_tests.py -l c -t -j 16 -c dbg -s 2.0 + - ./tools/run_tests/run_tests.py -l c++ -t -j 16 -c dbg -s 2.0 - make clean - - ./tools/run_tests/run_tests.py -l c -t -j 16 -c opt - - ./tools/run_tests/run_tests.py -l c++ -t -j 16 -c opt + - ./tools/run_tests/run_tests.py -l c -t -j 16 -c opt -s 2.0 + - ./tools/run_tests/run_tests.py -l c++ -t -j 16 -c opt -s 2.0 - ./tools/run_tests/run_tests.py -l node -t -j 16 -c opt notifications: email: false diff --git a/test/core/util/test_config.c b/test/core/util/test_config.c index 1c464073114..1f0f0175b1c 100644 --- a/test/core/util/test_config.c +++ b/test/core/util/test_config.c @@ -34,6 +34,7 @@ #include "test/core/util/test_config.h" #include +#include #include #include @@ -52,6 +53,9 @@ void grpc_test_init(int argc, char **argv) { /* disable SIGPIPE */ signal(SIGPIPE, SIG_IGN); #endif + gpr_log(GPR_DEBUG, "test slowdown: machine=%f build=%f total=%f", + GRPC_TEST_SLOWDOWN_MACHINE_FACTOR, GRPC_TEST_SLOWDOWN_BUILD_FACTOR, + GRPC_TEST_SLOWDOWN_FACTOR); /* seed rng with pid, so we don't end up with the same random numbers as a concurrently running test binary */ srand(seed()); diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 22f12b019a6..fddd8eb58b7 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -171,6 +171,7 @@ argp.add_argument('-c', '--config', argp.add_argument('-n', '--runs_per_test', default=1, type=int) argp.add_argument('-r', '--regex', default='.*', type=str) argp.add_argument('-j', '--jobs', default=1000, type=int) +argp.add_argument('-s', '--slowdown', default=1.0, type=float) argp.add_argument('-f', '--forever', default=False, action='store_const', @@ -200,6 +201,7 @@ make_targets = [] languages = set(_LANGUAGES[l] for l in args.language) build_steps = [jobset.JobSpec(['make', '-j', '%d' % (multiprocessing.cpu_count() + 1), + 'DEFINES=GRPC_TEST_SLOWDOWN_MACHINE_FACTOR=%f' % args.slowdown, 'CONFIG=%s' % cfg] + list(set( itertools.chain.from_iterable( l.make_targets() for l in languages)))) From 3486f326866057e98f4a1d6600485bb660fbf814 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 27 Feb 2015 09:47:59 -0800 Subject: [PATCH 11/34] Fix comment --- test/build/c++11.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/build/c++11.cc b/test/build/c++11.cc index 519395f20a4..4822a20e7f2 100644 --- a/test/build/c++11.cc +++ b/test/build/c++11.cc @@ -31,7 +31,7 @@ * */ -/* This is just a compilation test, to see if we have zlib installed. */ +/* This is just a compilation test, to see if we have C++11. */ #include #include From 20e081a63201e53a193a2178afc522624a5ec69a Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 27 Feb 2015 09:50:23 -0800 Subject: [PATCH 12/34] Probe compiler settings --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index d770e7261f5..23b1dda4262 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ before_install: - sudo apt-get update -qq - sudo apt-get install -qq libgtest-dev libgflags-dev python-virtualenv script: + - make CONFIG=dbg buildtests_cxx Q= - ./tools/run_tests/run_tests.py -l c -t -j 16 -c dbg -s 2.0 - ./tools/run_tests/run_tests.py -l c++ -t -j 16 -c dbg -s 2.0 - make clean From 86fa1c5541debf82cfd0bd7e548c59ac9db83b25 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 27 Feb 2015 09:57:58 -0800 Subject: [PATCH 13/34] Save makefile var clobbering --- Makefile | 4 ++++ templates/Makefile.template | 4 ++++ tools/run_tests/run_tests.py | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4aacb99826b..f5d45f5fa97 100644 --- a/Makefile +++ b/Makefile @@ -178,6 +178,10 @@ CPPFLAGS += $(CPPFLAGS_$(CONFIG)) DEFINES += $(DEFINES_$(CONFIG)) INSTALL_PREFIX=\"$(prefix)\" LDFLAGS += $(LDFLAGS_$(CONFIG)) +ifdef EXTRA_DEFINES +DEFINES += EXTRA_DEFINES +endif + CFLAGS += -std=c89 -pedantic ifeq ($(HAS_CXX11),true) CXXFLAGS += -std=c++11 diff --git a/templates/Makefile.template b/templates/Makefile.template index caac5037965..0413f19e44e 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -195,6 +195,10 @@ CPPFLAGS += $(CPPFLAGS_$(CONFIG)) DEFINES += $(DEFINES_$(CONFIG)) INSTALL_PREFIX=\"$(prefix)\" LDFLAGS += $(LDFLAGS_$(CONFIG)) +ifdef EXTRA_DEFINES +DEFINES += EXTRA_DEFINES +endif + CFLAGS += -std=c89 -pedantic ifeq ($(HAS_CXX11),true) CXXFLAGS += -std=c++11 diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index fddd8eb58b7..4e0ff85c59d 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -201,7 +201,7 @@ make_targets = [] languages = set(_LANGUAGES[l] for l in args.language) build_steps = [jobset.JobSpec(['make', '-j', '%d' % (multiprocessing.cpu_count() + 1), - 'DEFINES=GRPC_TEST_SLOWDOWN_MACHINE_FACTOR=%f' % args.slowdown, + 'EXTRA_DEFINES=GRPC_TEST_SLOWDOWN_MACHINE_FACTOR=%f' % args.slowdown, 'CONFIG=%s' % cfg] + list(set( itertools.chain.from_iterable( l.make_targets() for l in languages)))) From 6ff95991368ad044564865f7be0b71fdd912b645 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 27 Feb 2015 10:01:32 -0800 Subject: [PATCH 14/34] Save makefile var clobbering --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 23b1dda4262..d770e7261f5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,6 @@ before_install: - sudo apt-get update -qq - sudo apt-get install -qq libgtest-dev libgflags-dev python-virtualenv script: - - make CONFIG=dbg buildtests_cxx Q= - ./tools/run_tests/run_tests.py -l c -t -j 16 -c dbg -s 2.0 - ./tools/run_tests/run_tests.py -l c++ -t -j 16 -c dbg -s 2.0 - make clean From c6e387bd5ce3308dbdaba005df5fe5d4167631a0 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 27 Feb 2015 10:15:10 -0800 Subject: [PATCH 15/34] Fix typo --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f5d45f5fa97..c850ec77533 100644 --- a/Makefile +++ b/Makefile @@ -179,7 +179,7 @@ DEFINES += $(DEFINES_$(CONFIG)) INSTALL_PREFIX=\"$(prefix)\" LDFLAGS += $(LDFLAGS_$(CONFIG)) ifdef EXTRA_DEFINES -DEFINES += EXTRA_DEFINES +DEFINES += $(EXTRA_DEFINES) endif CFLAGS += -std=c89 -pedantic From 2cc2b84a13c9f9de6efcf3dd229c644be5693968 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 27 Feb 2015 11:38:31 -0800 Subject: [PATCH 16/34] Allow starting from non-root directory --- tools/run_tests/run_tests.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 4e0ff85c59d..372321c5e3a 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -44,6 +44,10 @@ import jobset import watch_dirs +ROOT = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), '../..')) +os.chdir(ROOT) + + # SimpleConfig: just compile with CONFIG=config, and run the binary to test class SimpleConfig(object): From 6a4c4fabf359a8253c94eaeeb7e044973bcc5837 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 27 Feb 2015 12:08:57 -0800 Subject: [PATCH 17/34] Added ruby tests to run_tests.py --- src/ruby/ext/grpc/extconf.rb | 16 ++++++++++++ tools/run_tests/build_ruby.sh | 47 +++++++++++++++++++++++++++++++++++ tools/run_tests/run_ruby.sh | 36 +++++++++++++++++++++++++++ tools/run_tests/run_tests.py | 12 +++++++++ 4 files changed, 111 insertions(+) create mode 100755 tools/run_tests/build_ruby.sh create mode 100755 tools/run_tests/run_ruby.sh diff --git a/src/ruby/ext/grpc/extconf.rb b/src/ruby/ext/grpc/extconf.rb index 96c92e2be5d..483a31f60cc 100644 --- a/src/ruby/ext/grpc/extconf.rb +++ b/src/ruby/ext/grpc/extconf.rb @@ -32,6 +32,17 @@ require 'mkmf' LIBDIR = RbConfig::CONFIG['libdir'] INCLUDEDIR = RbConfig::CONFIG['includedir'] +if ENV.key? 'GRPC_ROOT' + GRPC_ROOT = ENV['GRPC_ROOT'] + if ENV.key? 'GRPC_LIB_DIR' + GRPC_LIB_DIR = ENV['GRPC_LIB_DIR'] + else + GRPC_LIB_DIR = 'libs/opt' + end +else + GRPC_ROOT = nil +end + HEADER_DIRS = [ # Search /opt/local (Mac source install) '/opt/local/include', @@ -54,6 +65,11 @@ LIB_DIRS = [ LIBDIR ] +unless GRPC_ROOT.nil? + HEADER_DIRS.unshift File.join(GRPC_ROOT, 'include') + LIB_DIRS.unshift File.join(GRPC_ROOT, GRPC_LIB_DIR) +end + def crash(msg) print(" extconf failure: #{msg}\n") exit 1 diff --git a/tools/run_tests/build_ruby.sh b/tools/run_tests/build_ruby.sh new file mode 100755 index 00000000000..53a69cf0798 --- /dev/null +++ b/tools/run_tests/build_ruby.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +# Copyright 2015, 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. + +set -ex + +CONFIG=${CONFIG:-opt} + +# change to grpc repo root +cd $(dirname $0)/../.. + +# tells npm install to look for files in that directory +export GRPC_ROOT=`pwd` +# tells npm install the subdirectory with library files +export GRPC_LIB_SUBDIR=libs/$CONFIG + +cd src/ruby + +bundle install +rake compile:grpc diff --git a/tools/run_tests/run_ruby.sh b/tools/run_tests/run_ruby.sh new file mode 100755 index 00000000000..b82ce52af38 --- /dev/null +++ b/tools/run_tests/run_ruby.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# Copyright 2015, 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. + +set -ex + +# change to grpc repo root +cd $(dirname $0)/../../src/ruby + +rake diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 4e0ff85c59d..7b87c621ddd 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -136,6 +136,17 @@ class PythonLanguage(object): def build_steps(self): return [['tools/run_tests/build_python.sh']] +class RubyLanguage(object): + + def test_specs(self, config, travis): + return [config.job_spec('tools/run_tests/run_ruby.sh', None)] + + def make_targets(self): + return ['static_c'] + + def build_steps(self): + return [['tools/run_tests/build_ruby.sh']] + # different configurations we can run under _CONFIGS = { @@ -160,6 +171,7 @@ _LANGUAGES = { 'node': NodeLanguage(), 'php': PhpLanguage(), 'python': PythonLanguage(), + 'ruby': RubyLanguage() } # parse command line From 93fa09812464d5100b23a75dd52906c0ca61efec Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Fri, 27 Feb 2015 21:50:58 +0100 Subject: [PATCH 18/34] Removing private protobuf header inclusion. --- src/compiler/cpp_generator_helpers.h | 40 ++------------ src/compiler/cpp_plugin.cc | 2 +- src/compiler/generator_helpers.h | 79 ++++++++++++++++++++++++++++ src/compiler/python_generator.cc | 17 ++---- 4 files changed, 88 insertions(+), 50 deletions(-) create mode 100644 src/compiler/generator_helpers.h diff --git a/src/compiler/cpp_generator_helpers.h b/src/compiler/cpp_generator_helpers.h index e3c76e02912..632ff3c8cfe 100644 --- a/src/compiler/cpp_generator_helpers.h +++ b/src/compiler/cpp_generator_helpers.h @@ -38,50 +38,16 @@ #include #include #include +#include "src/compiler/generator_helpers.h" namespace grpc_cpp_generator { -inline bool StripSuffix(std::string *filename, const std::string &suffix) { - if (filename->length() >= suffix.length()) { - size_t suffix_pos = filename->length() - suffix.length(); - if (filename->compare(suffix_pos, std::string::npos, suffix) == 0) { - filename->resize(filename->size() - suffix.size()); - return true; - } - } - - return false; -} - -inline std::string StripProto(std::string filename) { - if (!StripSuffix(&filename, ".protodevel")) { - StripSuffix(&filename, ".proto"); - } - return filename; -} - -inline std::string StringReplace(std::string str, const std::string &from, - const std::string &to) { - size_t pos = 0; - - for (;;) { - pos = str.find(from, pos); - if (pos == std::string::npos) { - break; - } - str.replace(pos, from.length(), to); - pos += to.length(); - } - - return str; -} - inline std::string DotsToColons(const std::string &name) { - return StringReplace(name, ".", "::"); + return grpc_generator::StringReplace(name, ".", "::"); } inline std::string DotsToUnderscores(const std::string &name) { - return StringReplace(name, ".", "_"); + return grpc_generator::StringReplace(name, ".", "_"); } inline std::string ClassName(const google::protobuf::Descriptor *descriptor, diff --git a/src/compiler/cpp_plugin.cc b/src/compiler/cpp_plugin.cc index a421e51b78d..feb158f89e6 100644 --- a/src/compiler/cpp_plugin.cc +++ b/src/compiler/cpp_plugin.cc @@ -63,7 +63,7 @@ class CppGrpcGenerator : public google::protobuf::compiler::CodeGenerator { return false; } - std::string file_name = grpc_cpp_generator::StripProto(file->name()); + std::string file_name = grpc_generator::StripProto(file->name()); // Generate .pb.h Insert(context, file_name + ".pb.h", "includes", diff --git a/src/compiler/generator_helpers.h b/src/compiler/generator_helpers.h new file mode 100644 index 00000000000..0c14bb8bcf4 --- /dev/null +++ b/src/compiler/generator_helpers.h @@ -0,0 +1,79 @@ +/* + * + * Copyright 2015, 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. + * + */ + +#ifndef NET_GRPC_COMPILER_GENERATOR_HELPERS_H__ +#define NET_GRPC_COMPILER_GENERATOR_HELPERS_H__ + +#include +#include + +namespace grpc_generator { + +inline bool StripSuffix(std::string *filename, const std::string &suffix) { + if (filename->length() >= suffix.length()) { + size_t suffix_pos = filename->length() - suffix.length(); + if (filename->compare(suffix_pos, std::string::npos, suffix) == 0) { + filename->resize(filename->size() - suffix.size()); + return true; + } + } + + return false; +} + +inline std::string StripProto(std::string filename) { + if (!StripSuffix(&filename, ".protodevel")) { + StripSuffix(&filename, ".proto"); + } + return filename; +} + +inline std::string StringReplace(std::string str, const std::string &from, + const std::string &to) { + size_t pos = 0; + + for (;;) { + pos = str.find(from, pos); + if (pos == std::string::npos) { + break; + } + str.replace(pos, from.length(), to); + pos += to.length(); + } + + return str; +} + +} // namespace grpc_generator + +#endif // NET_GRPC_COMPILER_GENERATOR_HELPERS_H__ diff --git a/src/compiler/python_generator.cc b/src/compiler/python_generator.cc index ae4d65df4c2..b8d4aa509b4 100644 --- a/src/compiler/python_generator.cc +++ b/src/compiler/python_generator.cc @@ -40,20 +40,19 @@ #include #include +#include "src/compiler/generator_helpers.h" #include "src/compiler/python_generator.h" #include #include #include #include -#include +using grpc_generator::StringReplace; +using grpc_generator::StripProto; using google::protobuf::Descriptor; using google::protobuf::FileDescriptor; -using google::protobuf::HasSuffixString; using google::protobuf::MethodDescriptor; using google::protobuf::ServiceDescriptor; -using google::protobuf::StripString; -using google::protobuf::StripSuffixString; using google::protobuf::io::Printer; using google::protobuf::io::StringOutputStream; using std::initializer_list; @@ -197,18 +196,12 @@ bool PrintStub(const ServiceDescriptor* service, return true; } -// TODO(protobuf team): See TODO for `ModuleName`. -string StripProto(const string& filename) { - const char* suffix = HasSuffixString(filename, ".protodevel") - ? ".protodevel" : ".proto"; - return StripSuffixString(filename, suffix); -} // TODO(protobuf team): Export `ModuleName` from protobuf's // `src/google/protobuf/compiler/python/python_generator.cc` file. string ModuleName(const string& filename) { string basename = StripProto(filename); - StripString(&basename, "-", '_'); - StripString(&basename, "/", '.'); + basename = StringReplace(basename, "-", "_"); + basename = StringReplace(basename, "/", "."); return basename + "_pb2"; } From cc2ef26288b860e43ea494b16ee4d9a35a15fb3f Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 27 Feb 2015 12:51:14 -0800 Subject: [PATCH 19/34] Added ruby tests to travis file --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index d770e7261f5..ad5fa22e39c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,5 +10,6 @@ script: - ./tools/run_tests/run_tests.py -l c -t -j 16 -c opt -s 2.0 - ./tools/run_tests/run_tests.py -l c++ -t -j 16 -c opt -s 2.0 - ./tools/run_tests/run_tests.py -l node -t -j 16 -c opt + - ./tools/run_tests/run_tests.py -l ruby -t -j 16 -c opt notifications: email: false From 7f86e953660b0a100eadc31ed538e66e037d475e Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 27 Feb 2015 13:20:43 -0800 Subject: [PATCH 20/34] Added ruby version file for travis --- .ruby-version | 1 + 1 file changed, 1 insertion(+) create mode 100644 .ruby-version diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 00000000000..8f9174b4dd1 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +2.1.2 \ No newline at end of file From c921865c3956425732ab3bb27041729b95155153 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 27 Feb 2015 14:08:46 -0800 Subject: [PATCH 21/34] Changed how ruby version is selected --- .ruby-version | 1 - tools/run_tests/build_ruby.sh | 2 ++ tools/run_tests/run_ruby.sh | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) delete mode 100644 .ruby-version diff --git a/.ruby-version b/.ruby-version deleted file mode 100644 index 8f9174b4dd1..00000000000 --- a/.ruby-version +++ /dev/null @@ -1 +0,0 @@ -2.1.2 \ No newline at end of file diff --git a/tools/run_tests/build_ruby.sh b/tools/run_tests/build_ruby.sh index 53a69cf0798..808570d8004 100755 --- a/tools/run_tests/build_ruby.sh +++ b/tools/run_tests/build_ruby.sh @@ -31,6 +31,8 @@ set -ex +rvm use 2.1.2 + CONFIG=${CONFIG:-opt} # change to grpc repo root diff --git a/tools/run_tests/run_ruby.sh b/tools/run_tests/run_ruby.sh index b82ce52af38..ef28c74398e 100755 --- a/tools/run_tests/run_ruby.sh +++ b/tools/run_tests/run_ruby.sh @@ -30,6 +30,8 @@ set -ex +rvm use 2.1.2 + # change to grpc repo root cd $(dirname $0)/../../src/ruby From ea14cfb4932335d4ccb7b7a612338157451d2f08 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 27 Feb 2015 14:21:45 -0800 Subject: [PATCH 22/34] Further changed ruby version handling --- tools/run_tests/build_ruby.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/run_tests/build_ruby.sh b/tools/run_tests/build_ruby.sh index 808570d8004..e5eae05cb28 100755 --- a/tools/run_tests/build_ruby.sh +++ b/tools/run_tests/build_ruby.sh @@ -31,6 +31,7 @@ set -ex +rvm install 2.1.2 rvm use 2.1.2 CONFIG=${CONFIG:-opt} From bd3df5f5f11714d0d9e5221dd51d4aae6151fa00 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 27 Feb 2015 14:37:57 -0800 Subject: [PATCH 23/34] fix conditional inclusion of grpc_csharp_ext.dll --- src/csharp/Grpc.Core/Grpc.Core.csproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/csharp/Grpc.Core/Grpc.Core.csproj b/src/csharp/Grpc.Core/Grpc.Core.csproj index de742f99add..05d40d45a6e 100644 --- a/src/csharp/Grpc.Core/Grpc.Core.csproj +++ b/src/csharp/Grpc.Core/Grpc.Core.csproj @@ -67,9 +67,9 @@ - - + + PreserveNewest From 530c0b9b1fc6690423a457166c2ff7a71c35c050 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 27 Feb 2015 14:38:34 -0800 Subject: [PATCH 24/34] Changed how ruby versions are selected again --- .travis.yml | 2 ++ tools/run_tests/build_ruby.sh | 3 --- tools/run_tests/run_ruby.sh | 2 -- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index ad5fa22e39c..ba21f8cb912 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,8 @@ before_install: - sudo apt-get update -qq - sudo apt-get install -qq libgtest-dev libgflags-dev python-virtualenv script: + - rvm install 2.1.2 + - rvm use 2.1.2 - ./tools/run_tests/run_tests.py -l c -t -j 16 -c dbg -s 2.0 - ./tools/run_tests/run_tests.py -l c++ -t -j 16 -c dbg -s 2.0 - make clean diff --git a/tools/run_tests/build_ruby.sh b/tools/run_tests/build_ruby.sh index e5eae05cb28..53a69cf0798 100755 --- a/tools/run_tests/build_ruby.sh +++ b/tools/run_tests/build_ruby.sh @@ -31,9 +31,6 @@ set -ex -rvm install 2.1.2 -rvm use 2.1.2 - CONFIG=${CONFIG:-opt} # change to grpc repo root diff --git a/tools/run_tests/run_ruby.sh b/tools/run_tests/run_ruby.sh index ef28c74398e..b82ce52af38 100755 --- a/tools/run_tests/run_ruby.sh +++ b/tools/run_tests/run_ruby.sh @@ -30,8 +30,6 @@ set -ex -rvm use 2.1.2 - # change to grpc repo root cd $(dirname $0)/../../src/ruby From 726b486b80b70cc5c49c163891d75f3c44b9468a Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 27 Feb 2015 14:54:24 -0800 Subject: [PATCH 25/34] Updated bundler in travis.yml --- .travis.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index ba21f8cb912..efb27d09c2d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,14 +4,14 @@ before_install: - sudo apt-get update -qq - sudo apt-get install -qq libgtest-dev libgflags-dev python-virtualenv script: - - rvm install 2.1.2 - rvm use 2.1.2 - - ./tools/run_tests/run_tests.py -l c -t -j 16 -c dbg -s 2.0 - - ./tools/run_tests/run_tests.py -l c++ -t -j 16 -c dbg -s 2.0 + - gem install bundler + - #./tools/run_tests/run_tests.py -l c -t -j 16 -c dbg -s 2.0 + - #./tools/run_tests/run_tests.py -l c++ -t -j 16 -c dbg -s 2.0 - make clean - - ./tools/run_tests/run_tests.py -l c -t -j 16 -c opt -s 2.0 - - ./tools/run_tests/run_tests.py -l c++ -t -j 16 -c opt -s 2.0 - - ./tools/run_tests/run_tests.py -l node -t -j 16 -c opt + - #./tools/run_tests/run_tests.py -l c -t -j 16 -c opt -s 2.0 + - #./tools/run_tests/run_tests.py -l c++ -t -j 16 -c opt -s 2.0 + - #./tools/run_tests/run_tests.py -l node -t -j 16 -c opt - ./tools/run_tests/run_tests.py -l ruby -t -j 16 -c opt notifications: email: false From 640e93f10be36f9d641918db148b5e57896588cf Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 27 Feb 2015 14:59:37 -0800 Subject: [PATCH 26/34] Uncommented tests, switched to less specific version of ruby --- .travis.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index efb27d09c2d..769d552f57e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,14 +4,14 @@ before_install: - sudo apt-get update -qq - sudo apt-get install -qq libgtest-dev libgflags-dev python-virtualenv script: - - rvm use 2.1.2 + - rvm use 2.1 - gem install bundler - - #./tools/run_tests/run_tests.py -l c -t -j 16 -c dbg -s 2.0 - - #./tools/run_tests/run_tests.py -l c++ -t -j 16 -c dbg -s 2.0 + - ./tools/run_tests/run_tests.py -l c -t -j 16 -c dbg -s 2.0 + - ./tools/run_tests/run_tests.py -l c++ -t -j 16 -c dbg -s 2.0 - make clean - - #./tools/run_tests/run_tests.py -l c -t -j 16 -c opt -s 2.0 - - #./tools/run_tests/run_tests.py -l c++ -t -j 16 -c opt -s 2.0 - - #./tools/run_tests/run_tests.py -l node -t -j 16 -c opt + - ./tools/run_tests/run_tests.py -l c -t -j 16 -c opt -s 2.0 + - ./tools/run_tests/run_tests.py -l c++ -t -j 16 -c opt -s 2.0 + - ./tools/run_tests/run_tests.py -l node -t -j 16 -c opt - ./tools/run_tests/run_tests.py -l ruby -t -j 16 -c opt notifications: email: false From 7e14dd817a17547a33c8730382fb3a28e831b008 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 27 Feb 2015 15:06:03 -0800 Subject: [PATCH 27/34] Moved ruby version to environment varible --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 769d552f57e..c3b5efb4e4a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,10 @@ before_install: - sudo add-apt-repository ppa:yjwong/gflags -y - sudo apt-get update -qq - sudo apt-get install -qq libgtest-dev libgflags-dev python-virtualenv +env: + - RUBY_VERSION=2.1 script: - - rvm use 2.1 + - rvm use $RUBY_VERSION - gem install bundler - ./tools/run_tests/run_tests.py -l c -t -j 16 -c dbg -s 2.0 - ./tools/run_tests/run_tests.py -l c++ -t -j 16 -c dbg -s 2.0 From e1163283fb72c7bfc6f9697d94cacbbe617f0c3d Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 27 Feb 2015 23:08:28 +0000 Subject: [PATCH 28/34] Update suppressions file --- tools/tsan_suppressions.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/tsan_suppressions.txt b/tools/tsan_suppressions.txt index 23d57f9fd1f..3503c50ae8a 100644 --- a/tools/tsan_suppressions.txt +++ b/tools/tsan_suppressions.txt @@ -1,2 +1,3 @@ # OPENSSL_cleanse does racy access to a global race:OPENSSL_cleanse +race:cleanse_ctr From 5be9e3b4212e259e6ca93d860f3c9f86c49c7c7f Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 27 Feb 2015 23:14:35 +0000 Subject: [PATCH 29/34] Another update --- tools/tsan_suppressions.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/tsan_suppressions.txt b/tools/tsan_suppressions.txt index 3503c50ae8a..d3b04932f23 100644 --- a/tools/tsan_suppressions.txt +++ b/tools/tsan_suppressions.txt @@ -1,3 +1,5 @@ # OPENSSL_cleanse does racy access to a global race:OPENSSL_cleanse race:cleanse_ctr +race:ssleay_rand_status + From b47b89cedb40fd690529af59fc136998af7e430e Mon Sep 17 00:00:00 2001 From: Donna Dionne Date: Fri, 27 Feb 2015 15:21:14 -0800 Subject: [PATCH 30/34] Adding test command to test node auth compute engine credentials. --- tools/gce_setup/grpc_docker.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tools/gce_setup/grpc_docker.sh b/tools/gce_setup/grpc_docker.sh index df8605b58f5..02039261a35 100755 --- a/tools/gce_setup/grpc_docker.sh +++ b/tools/gce_setup/grpc_docker.sh @@ -1094,6 +1094,21 @@ grpc_cloud_prod_auth_service_account_creds_gen_node_cmd() { echo $the_cmd } +# constructs the full dockerized node gce auth interop test cmd. +# +# call-seq: +# flags= .... # generic flags to include the command +# cmd=$($grpc_gen_test_cmd $flags) +grpc_cloud_prod_auth_compute_engine_creds_gen_node_cmd() { + local env_flag="-e SSL_CERT_FILE=/cacerts/roots.pem " + local cmd_prefix="sudo docker run $env_flag grpc/node"; + local test_script="/usr/bin/nodejs /var/local/git/grpc/src/node/interop/interop_client.js --use_tls=true"; + local gfe_flags=$(_grpc_prod_gfe_flags) + local added_gfe_flags=$(_grpc_gce_test_flags) + local the_cmd="$cmd_prefix $test_script $gfe_flags $added_gfe_flags $@"; + echo $the_cmd +} + # constructs the full dockerized cpp interop test cmd. # # call-seq: From 239916079600f40eb035cac272c2a7211c75b77a Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 27 Feb 2015 15:39:03 -0800 Subject: [PATCH 31/34] Switched to test matrix --- .travis.yml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index c3b5efb4e4a..17957584b76 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,16 +4,18 @@ before_install: - sudo apt-get update -qq - sudo apt-get install -qq libgtest-dev libgflags-dev python-virtualenv env: - - RUBY_VERSION=2.1 + global: + - RUBY_VERSION=2.1 + matrix: + - CONFIG=dbg TEST=c + - CONFIG=dbg TEST=c++ + - CONFIG=opt TEST=c + - CONFIG=opt TEST=c++ + - CONFIG=opt TEST=node + - CONFIG=opt TEST=ruby script: - rvm use $RUBY_VERSION - gem install bundler - - ./tools/run_tests/run_tests.py -l c -t -j 16 -c dbg -s 2.0 - - ./tools/run_tests/run_tests.py -l c++ -t -j 16 -c dbg -s 2.0 - - make clean - - ./tools/run_tests/run_tests.py -l c -t -j 16 -c opt -s 2.0 - - ./tools/run_tests/run_tests.py -l c++ -t -j 16 -c opt -s 2.0 - - ./tools/run_tests/run_tests.py -l node -t -j 16 -c opt - - ./tools/run_tests/run_tests.py -l ruby -t -j 16 -c opt + - ./tools/run_tests/run_tests.py -l $TEST -t -j 16 -c $CONFIG -s 2.0 notifications: - email: false + email: false \ No newline at end of file From ffc442c96126abde3355a7ac4c50fe326399d474 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 27 Feb 2015 15:46:13 -0800 Subject: [PATCH 32/34] Added multiple ruby version tests --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 17957584b76..71e60a751b3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,7 @@ env: - CONFIG=opt TEST=c - CONFIG=opt TEST=c++ - CONFIG=opt TEST=node + - CONFIG=opt TEST=ruby RUBY_VERSION=2.1.0 - CONFIG=opt TEST=ruby script: - rvm use $RUBY_VERSION From af08efe29f443da768f291248dde716977685006 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 27 Feb 2015 23:53:45 +0000 Subject: [PATCH 33/34] This looks more serious --- tools/tsan_suppressions.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/tsan_suppressions.txt b/tools/tsan_suppressions.txt index d3b04932f23..fb7b85cbea5 100644 --- a/tools/tsan_suppressions.txt +++ b/tools/tsan_suppressions.txt @@ -1,5 +1,4 @@ # OPENSSL_cleanse does racy access to a global race:OPENSSL_cleanse race:cleanse_ctr -race:ssleay_rand_status From 0ee5fb8754afc44ee341ff3b737bcfe544ba390c Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 27 Feb 2015 15:54:33 -0800 Subject: [PATCH 34/34] Removed test with non-included version of ruby --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 71e60a751b3..17957584b76 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,6 @@ env: - CONFIG=opt TEST=c - CONFIG=opt TEST=c++ - CONFIG=opt TEST=node - - CONFIG=opt TEST=ruby RUBY_VERSION=2.1.0 - CONFIG=opt TEST=ruby script: - rvm use $RUBY_VERSION