diff options
author | murgatroid99 <michael.lumish@gmail.com> | 2015-01-13 17:30:21 -0800 |
---|---|---|
committer | murgatroid99 <michael.lumish@gmail.com> | 2015-01-13 17:30:21 -0800 |
commit | 6061f2b6058cfd1135488f55e832622226cd558c (patch) | |
tree | 57784ccca3f1c6aa5fb7620eedc838df8aa79fbb | |
parent | ebf59f61a8784b2364757ab0811732655a151d97 (diff) | |
parent | 3eb079dcad14ab69d589b4e3daec62cd99d602dd (diff) |
Merge remote-tracking branch 'upstream/master'
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | .gitmodules | 4 | ||||
-rw-r--r-- | INSTALL | 5 | ||||
-rw-r--r-- | Makefile | 13 | ||||
-rw-r--r-- | templates/Makefile.template | 13 | ||||
m--------- | third_party/libevent | 0 | ||||
-rwxr-xr-x | tools/run_tests/run_lcov.sh | 18 | ||||
-rwxr-xr-x | tools/run_tests/run_tests.py | 1 |
8 files changed, 46 insertions, 12 deletions
diff --git a/.gitignore b/.gitignore index 5202b53ad2..3cae07ed12 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ bins +coverage deps +*.gcno +gens libs objs *.pyc - diff --git a/.gitmodules b/.gitmodules index 9a287d9ee2..97b7197be3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -9,10 +9,6 @@ path = third_party/protobuf url = https://github.com/google/protobuf.git branch = v3.0.0-alpha-1 -[submodule "third_party/libevent"] - path = third_party/libevent - url = https://github.com/libevent/libevent.git - branch = patches-2.0 [submodule "third_party/gflags"] path = third_party/gflags url = https://code.google.com/p/gflags @@ -12,8 +12,7 @@ Note that the Makefile makes it much easier for you to compile from sources if you were to clone recursively our git repository. -grpc core currently depends on zlib and OpenSSL 1.0.2beta3, and also requires -libevent2 for the Linux port. +grpc core currently depends on zlib and OpenSSL 1.0.2beta3. grpc++'s tests depends on protobuf 3.0.0, gtests and gflags. @@ -46,7 +45,7 @@ and let the Makefile build them itself. You may also install the dependencies yourself, from the sources, or from your distribution's package manager. -The development packages needed for grpc are libevent2 under Linux, and zlib. +The only development package needed for grpc is zlib. The development packages needed for grpc++'s tests are gtests, and gflags. To the best of our knowledge, no distribution has an OpenSSL package that @@ -49,6 +49,15 @@ CPPFLAGS_msan = -O1 -fsanitize=memory -fno-omit-frame-pointer LDFLAGS_msan = -fsanitize=memory DEFINES_msan = NDEBUG +VALID_CONFIG_gcov = 1 +CC_gcov = gcc +CXX_gcov = g++ +LD_gcov = gcc +LDXX_gcov = g++ +CPPFLAGS_gcov = -O0 -fprofile-arcs -ftest-coverage +LDFLAGS_gcov = -fprofile-arcs -ftest-coverage +DEFINES_gcov = NDEBUG + # General settings. # You may want to change these depending on your system. @@ -487,9 +496,9 @@ shared_cxx: dep_cxx libs/$(CONFIG)/libgrpc++.$(SHARED_EXT) privatelibs: privatelibs_c privatelibs_cxx -privatelibs_c: dep_c libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++_test_util.a libs/$(CONFIG)/libend2end_fixture_chttp2_fake_security.a libs/$(CONFIG)/libend2end_fixture_chttp2_fullstack.a libs/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_fullstack.a libs/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack.a libs/$(CONFIG)/libend2end_fixture_chttp2_socket_pair.a libs/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_one_byte_at_a_time.a libs/$(CONFIG)/libend2end_test_cancel_after_accept.a libs/$(CONFIG)/libend2end_test_cancel_after_accept_and_writes_closed.a libs/$(CONFIG)/libend2end_test_cancel_after_invoke.a libs/$(CONFIG)/libend2end_test_cancel_before_invoke.a libs/$(CONFIG)/libend2end_test_cancel_in_a_vacuum.a libs/$(CONFIG)/libend2end_test_census_simple_request.a libs/$(CONFIG)/libend2end_test_disappearing_server.a libs/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_inflight_calls.a libs/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_tags.a libs/$(CONFIG)/libend2end_test_invoke_large_request.a libs/$(CONFIG)/libend2end_test_max_concurrent_streams.a libs/$(CONFIG)/libend2end_test_no_op.a libs/$(CONFIG)/libend2end_test_ping_pong_streaming.a libs/$(CONFIG)/libend2end_test_request_response_with_binary_metadata_and_payload.a libs/$(CONFIG)/libend2end_test_request_response_with_metadata_and_payload.a libs/$(CONFIG)/libend2end_test_request_response_with_payload.a libs/$(CONFIG)/libend2end_test_request_response_with_trailing_metadata_and_payload.a libs/$(CONFIG)/libend2end_test_simple_delayed_request.a libs/$(CONFIG)/libend2end_test_simple_request.a libs/$(CONFIG)/libend2end_test_thread_stress.a libs/$(CONFIG)/libend2end_test_writes_done_hangs_with_pending_read.a libs/$(CONFIG)/libend2end_certs.a +privatelibs_c: dep_c libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libend2end_fixture_chttp2_fake_security.a libs/$(CONFIG)/libend2end_fixture_chttp2_fullstack.a libs/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_fullstack.a libs/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack.a libs/$(CONFIG)/libend2end_fixture_chttp2_socket_pair.a libs/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_one_byte_at_a_time.a libs/$(CONFIG)/libend2end_test_cancel_after_accept.a libs/$(CONFIG)/libend2end_test_cancel_after_accept_and_writes_closed.a libs/$(CONFIG)/libend2end_test_cancel_after_invoke.a libs/$(CONFIG)/libend2end_test_cancel_before_invoke.a libs/$(CONFIG)/libend2end_test_cancel_in_a_vacuum.a libs/$(CONFIG)/libend2end_test_census_simple_request.a libs/$(CONFIG)/libend2end_test_disappearing_server.a libs/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_inflight_calls.a libs/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_tags.a libs/$(CONFIG)/libend2end_test_invoke_large_request.a libs/$(CONFIG)/libend2end_test_max_concurrent_streams.a libs/$(CONFIG)/libend2end_test_no_op.a libs/$(CONFIG)/libend2end_test_ping_pong_streaming.a libs/$(CONFIG)/libend2end_test_request_response_with_binary_metadata_and_payload.a libs/$(CONFIG)/libend2end_test_request_response_with_metadata_and_payload.a libs/$(CONFIG)/libend2end_test_request_response_with_payload.a libs/$(CONFIG)/libend2end_test_request_response_with_trailing_metadata_and_payload.a libs/$(CONFIG)/libend2end_test_simple_delayed_request.a libs/$(CONFIG)/libend2end_test_simple_request.a libs/$(CONFIG)/libend2end_test_thread_stress.a libs/$(CONFIG)/libend2end_test_writes_done_hangs_with_pending_read.a libs/$(CONFIG)/libend2end_certs.a -privatelibs_cxx: dep_cxx libs/$(CONFIG)/libgpr_test_util.a libs/$(CONFIG)/libgrpc_test_util.a libs/$(CONFIG)/libgrpc++_test_util.a libs/$(CONFIG)/libend2end_fixture_chttp2_fake_security.a libs/$(CONFIG)/libend2end_fixture_chttp2_fullstack.a libs/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_fullstack.a libs/$(CONFIG)/libend2end_fixture_chttp2_simple_ssl_with_oauth2_fullstack.a libs/$(CONFIG)/libend2end_fixture_chttp2_socket_pair.a libs/$(CONFIG)/libend2end_fixture_chttp2_socket_pair_one_byte_at_a_time.a libs/$(CONFIG)/libend2end_test_cancel_after_accept.a libs/$(CONFIG)/libend2end_test_cancel_after_accept_and_writes_closed.a libs/$(CONFIG)/libend2end_test_cancel_after_invoke.a libs/$(CONFIG)/libend2end_test_cancel_before_invoke.a libs/$(CONFIG)/libend2end_test_cancel_in_a_vacuum.a libs/$(CONFIG)/libend2end_test_census_simple_request.a libs/$(CONFIG)/libend2end_test_disappearing_server.a libs/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_inflight_calls.a libs/$(CONFIG)/libend2end_test_early_server_shutdown_finishes_tags.a libs/$(CONFIG)/libend2end_test_invoke_large_request.a libs/$(CONFIG)/libend2end_test_max_concurrent_streams.a libs/$(CONFIG)/libend2end_test_no_op.a libs/$(CONFIG)/libend2end_test_ping_pong_streaming.a libs/$(CONFIG)/libend2end_test_request_response_with_binary_metadata_and_payload.a libs/$(CONFIG)/libend2end_test_request_response_with_metadata_and_payload.a libs/$(CONFIG)/libend2end_test_request_response_with_payload.a libs/$(CONFIG)/libend2end_test_request_response_with_trailing_metadata_and_payload.a libs/$(CONFIG)/libend2end_test_simple_delayed_request.a libs/$(CONFIG)/libend2end_test_simple_request.a libs/$(CONFIG)/libend2end_test_thread_stress.a libs/$(CONFIG)/libend2end_test_writes_done_hangs_with_pending_read.a libs/$(CONFIG)/libend2end_certs.a +privatelibs_cxx: dep_cxx libs/$(CONFIG)/libgrpc++_test_util.a buildtests: buildtests_c buildtests_cxx diff --git a/templates/Makefile.template b/templates/Makefile.template index d0ebb10240..256380c2dd 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -66,6 +66,15 @@ CPPFLAGS_msan = -O1 -fsanitize=memory -fno-omit-frame-pointer LDFLAGS_msan = -fsanitize=memory DEFINES_msan = NDEBUG +VALID_CONFIG_gcov = 1 +CC_gcov = gcc +CXX_gcov = g++ +LD_gcov = gcc +LDXX_gcov = g++ +CPPFLAGS_gcov = -O0 -fprofile-arcs -ftest-coverage +LDFLAGS_gcov = -fprofile-arcs -ftest-coverage +DEFINES_gcov = NDEBUG + # General settings. # You may want to change these depending on your system. @@ -329,7 +338,7 @@ privatelibs: privatelibs_c privatelibs_cxx privatelibs_c: dep_c\ % for lib in libs: -% if lib.build == 'private': +% if lib.build == 'private' and not lib.get('c++', False): libs/$(CONFIG)/lib${lib.name}.a\ % endif % endfor @@ -337,7 +346,7 @@ privatelibs_c: dep_c\ privatelibs_cxx: dep_cxx\ % for lib in libs: -% if lib.build == 'private': +% if lib.build == 'private' and lib.get('c++', False): libs/$(CONFIG)/lib${lib.name}.a\ % endif % endfor diff --git a/third_party/libevent b/third_party/libevent deleted file mode 160000 -Subproject f7d92c63928a1460f3d99b9bc418bd3b686a0dc diff --git a/tools/run_tests/run_lcov.sh b/tools/run_tests/run_lcov.sh new file mode 100755 index 0000000000..6f22b0e8a4 --- /dev/null +++ b/tools/run_tests/run_lcov.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +set -ex + +out=`realpath ${1:-coverage}` + +root=`realpath $(dirname $0)/../..` +tmp=`mktemp` +cd $root +tools/run_tests/run_tests.py -c gcov +lcov --capture --directory . --output-file $tmp +genhtml $tmp --output-directory $out +rm $tmp +if which xdg-open > /dev/null +then + xdg-open file://$out/index.html +fi + diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 6ab80d9045..bb25b38e57 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -36,6 +36,7 @@ _CONFIGS = { 'tsan': SimpleConfig('tsan'), 'msan': SimpleConfig('msan'), 'asan': SimpleConfig('asan'), + 'gcov': SimpleConfig('gcov'), 'valgrind': ValgrindConfig('dbg'), } |