aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Matt Kwong <matt-kwong@users.noreply.github.com>2017-10-03 13:25:29 -0700
committerGravatar GitHub <noreply@github.com>2017-10-03 13:25:29 -0700
commit7bd592c7aa3c9efc074092c15f4a5e4ed3e99fc6 (patch)
tree755ab0a490fd8ce570c0304200257d3307f78c7f
parent5abced94866858b5d6b360eb7e05349e915169dd (diff)
parentfa90655822ed6e02502f9d05b0479e12829042b9 (diff)
Merge pull request #12690 from matt-kwong/cov
Fix coverage tests
-rw-r--r--Makefile2
-rw-r--r--binding.gyp1
-rw-r--r--build.yaml2
-rw-r--r--grpc.gyp1
-rw-r--r--templates/tools/dockerfile/test/multilang_jessie_x64/Dockerfile.template1
-rw-r--r--tools/dockerfile/test/multilang_jessie_x64/Dockerfile18
-rw-r--r--tools/internal_ci/linux/grpc_coverage.cfg24
-rwxr-xr-xtools/internal_ci/linux/grpc_coverage.sh30
-rwxr-xr-xtools/run_tests/run_tests.py4
9 files changed, 79 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 22520ac9a1..37ebe95aa0 100644
--- a/Makefile
+++ b/Makefile
@@ -187,7 +187,7 @@ CXX_gcov = g++
LD_gcov = gcc
LDXX_gcov = g++
CPPFLAGS_gcov = -O0 -fprofile-arcs -ftest-coverage -Wno-return-type
-LDFLAGS_gcov = -fprofile-arcs -ftest-coverage -rdynamic
+LDFLAGS_gcov = -fprofile-arcs -ftest-coverage -rdynamic -lstdc++
DEFINES_gcov = _DEBUG DEBUG GPR_GCOV
VALID_CONFIG_memcheck = 1
diff --git a/binding.gyp b/binding.gyp
index b4f9038210..6dbd0e71c3 100644
--- a/binding.gyp
+++ b/binding.gyp
@@ -101,6 +101,7 @@
'-fprofile-arcs',
'-ftest-coverage',
'-rdynamic',
+ '-lstdc++',
],
}],
['grpc_alpine=="true"', {
diff --git a/build.yaml b/build.yaml
index 7563d4bfc0..fb9cd4f938 100644
--- a/build.yaml
+++ b/build.yaml
@@ -4784,7 +4784,7 @@ configs:
CXX: g++
DEFINES: _DEBUG DEBUG GPR_GCOV
LD: gcc
- LDFLAGS: -fprofile-arcs -ftest-coverage -rdynamic
+ LDFLAGS: -fprofile-arcs -ftest-coverage -rdynamic -lstdc++
LDXX: g++
helgrind:
CPPFLAGS: -O0
diff --git a/grpc.gyp b/grpc.gyp
index 6331b76f47..09f9045789 100644
--- a/grpc.gyp
+++ b/grpc.gyp
@@ -98,6 +98,7 @@
'-fprofile-arcs',
'-ftest-coverage',
'-rdynamic',
+ '-lstdc++',
],
}],
['grpc_alpine=="true"', {
diff --git a/templates/tools/dockerfile/test/multilang_jessie_x64/Dockerfile.template b/templates/tools/dockerfile/test/multilang_jessie_x64/Dockerfile.template
index 6cad474a20..0d47aa91f3 100644
--- a/templates/tools/dockerfile/test/multilang_jessie_x64/Dockerfile.template
+++ b/templates/tools/dockerfile/test/multilang_jessie_x64/Dockerfile.template
@@ -19,6 +19,7 @@
<%include file="../../apt_get_basic.include"/>
<%include file="../../gcp_api_libraries.include"/>
<%include file="../../csharp_deps.include"/>
+ <%include file="../../csharp_dotnetcli_deps.include"/>
<%include file="../../cxx_deps.include"/>
<%include file="../../node_deps.include"/>
<%include file="../../php_deps.include"/>
diff --git a/tools/dockerfile/test/multilang_jessie_x64/Dockerfile b/tools/dockerfile/test/multilang_jessie_x64/Dockerfile
index 1a4b681576..8e29fcb88c 100644
--- a/tools/dockerfile/test/multilang_jessie_x64/Dockerfile
+++ b/tools/dockerfile/test/multilang_jessie_x64/Dockerfile
@@ -71,6 +71,24 @@ RUN apt-get update && apt-get -y dist-upgrade && apt-get install -y \
RUN nuget update -self
+# Install dotnet SDK based on https://www.microsoft.com/net/core#debian
+RUN apt-get update && apt-get install -y curl libunwind8 gettext
+# dotnet-dev-1.0.0-preview2-003131
+RUN curl -sSL -o dotnet100.tar.gz https://go.microsoft.com/fwlink/?LinkID=827530
+RUN mkdir -p /opt/dotnet && tar zxf dotnet100.tar.gz -C /opt/dotnet
+# dotnet-dev-1.0.1
+RUN curl -sSL -o dotnet101.tar.gz https://go.microsoft.com/fwlink/?LinkID=843453
+RUN mkdir -p /opt/dotnet && tar zxf dotnet101.tar.gz -C /opt/dotnet
+RUN ln -s /opt/dotnet/dotnet /usr/local/bin
+
+# Trigger the population of the local package cache
+ENV NUGET_XMLDOC_MODE skip
+RUN mkdir warmup \
+ && cd warmup \
+ && dotnet new \
+ && cd .. \
+ && rm -rf warmup
+
#=================
# C++ dependencies
RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev clang && apt-get clean
diff --git a/tools/internal_ci/linux/grpc_coverage.cfg b/tools/internal_ci/linux/grpc_coverage.cfg
new file mode 100644
index 0000000000..56b7745b21
--- /dev/null
+++ b/tools/internal_ci/linux/grpc_coverage.cfg
@@ -0,0 +1,24 @@
+# Copyright 2017 gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Config file for the internal CI (in protobuf text format)
+
+# Location of the continuous shell script in repository.
+build_file: "grpc/tools/internal_ci/linux/grpc_coverage.sh"
+timeout_mins: 420
+action {
+ define_artifacts {
+ regex: "github/grpc/reports/**"
+ }
+}
diff --git a/tools/internal_ci/linux/grpc_coverage.sh b/tools/internal_ci/linux/grpc_coverage.sh
new file mode 100755
index 0000000000..31623d2618
--- /dev/null
+++ b/tools/internal_ci/linux/grpc_coverage.sh
@@ -0,0 +1,30 @@
+#!/usr/bin/env bash
+# Copyright 2017 gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set -ex
+
+# Enter the gRPC repo root
+cd $(dirname $0)/../../..
+
+source tools/internal_ci/helper_scripts/prepare_build_linux_rc
+
+python tools/run_tests/run_tests.py \
+ --use_docker \
+ -t \
+ -l all \
+ -c gcov \
+ -x report.xml \
+ -j 16
+ \ No newline at end of file
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index 6e2115c279..803f2decbc 100755
--- a/tools/run_tests/run_tests.py
+++ b/tools/run_tests/run_tests.py
@@ -701,7 +701,7 @@ class PythonLanguage(object):
return [config.build for config in self.pythons]
def post_tests_steps(self):
- if self.config != 'gcov':
+ if self.config.build_config != 'gcov':
return []
else:
return [['tools/run_tests/helper_scripts/post_tests_python.sh']]
@@ -1641,7 +1641,7 @@ def _build_and_run(
suite_name=args.report_suite_name)
number_failures, _ = jobset.run(
- post_tests_steps, maxjobs=1, stop_on_failure=True,
+ post_tests_steps, maxjobs=1, stop_on_failure=False,
newline_on_success=newline_on_success, travis=args.travis)
out = []