aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2017-09-19 10:12:25 -0700
committerGravatar Muxi Yan <mxyan@google.com>2017-09-19 10:12:25 -0700
commit3f583b78290fef31202f4a05fac589d88d586111 (patch)
tree7e13f1d54ec9cec5abce904151258e6cd2670db7 /templates
parent3218e2b975a71cc32aedad71d00267e07244c109 (diff)
parentaafa875cb389140cf721d8470a3a05cf930f74b2 (diff)
Merge remote-tracking branch 'upstream/master' into fix-stream-compression-transport-duplicate
Diffstat (limited to 'templates')
-rw-r--r--templates/config.m4.template2
-rw-r--r--templates/grpc.gemspec.template1
-rw-r--r--templates/package.xml.template5
-rw-r--r--templates/src/python/grpcio_testing/grpc_version.py.template19
-rw-r--r--templates/test/cpp/naming/resolver_component_tests_defs.include92
-rw-r--r--templates/test/cpp/naming/resolver_component_tests_runner.sh.template4
-rw-r--r--templates/tools/dockerfile/apt_get_basic.include1
-rw-r--r--templates/tools/dockerfile/python_deps.include2
8 files changed, 123 insertions, 3 deletions
diff --git a/templates/config.m4.template b/templates/config.m4.template
index f91893c2bd..cd93fbd0fb 100644
--- a/templates/config.m4.template
+++ b/templates/config.m4.template
@@ -14,7 +14,7 @@
LIBS="-lpthread $LIBS"
CFLAGS="-Wall -Werror -Wno-parentheses-equality -Wno-unused-value -std=c11"
- CXXFLAGS="-std=c++11"
+ CXXFLAGS="-std=c++11 -fno-exceptions -fno-rtti"
GRPC_SHARED_LIBADD="-lpthread $GRPC_SHARED_LIBADD"
PHP_REQUIRE_CXX()
PHP_ADD_LIBRARY(pthread)
diff --git a/templates/grpc.gemspec.template b/templates/grpc.gemspec.template
index e62e5b2721..215d5f9df9 100644
--- a/templates/grpc.gemspec.template
+++ b/templates/grpc.gemspec.template
@@ -31,6 +31,7 @@
s.add_dependency 'google-protobuf', '~> 3.1'
s.add_dependency 'googleauth', '~> 0.5.1'
+ s.add_dependency 'googleapis-common-protos-types', '~> 1.0.0'
s.add_development_dependency 'bundler', '~> 1.9'
s.add_development_dependency 'facter', '~> 2.4'
diff --git a/templates/package.xml.template b/templates/package.xml.template
index 15da704a47..f10f75b8c0 100644
--- a/templates/package.xml.template
+++ b/templates/package.xml.template
@@ -12,7 +12,7 @@
<email>grpc-packages@google.com</email>
<active>yes</active>
</lead>
- <date>2017-05-22</date>
+ <date>2017-08-24</date>
<time>16:06:07</time>
<version>
<release>${settings.php_version.php()}</release>
@@ -27,6 +27,9 @@
- Channel are now by default persistent #11878
- Some bug fixes from 1.4 branch #12109, #12123
- Fixed hang bug when fork() was used #11814
+ - License changed to Apache 2.0
+ - Added support for php_namespace option in codegen plugin #11886
+ - Updated gRPC C Core library version 1.6
</notes>
<contents>
<dir baseinstalldir="/" name="/">
diff --git a/templates/src/python/grpcio_testing/grpc_version.py.template b/templates/src/python/grpcio_testing/grpc_version.py.template
new file mode 100644
index 0000000000..74db811d60
--- /dev/null
+++ b/templates/src/python/grpcio_testing/grpc_version.py.template
@@ -0,0 +1,19 @@
+%YAML 1.2
+--- |
+ # 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.
+
+ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_testing/grpc_version.py.template`!!!
+
+ VERSION='${settings.python_version.pep440()}'
diff --git a/templates/test/cpp/naming/resolver_component_tests_defs.include b/templates/test/cpp/naming/resolver_component_tests_defs.include
new file mode 100644
index 0000000000..6fa91c741a
--- /dev/null
+++ b/templates/test/cpp/naming/resolver_component_tests_defs.include
@@ -0,0 +1,92 @@
+<%def name="resolver_component_tests(tests)">#!/bin/bash
+# Copyright 2015 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.
+
+# This file is auto-generated
+
+set -ex
+
+# all command args required in this set order
+FLAGS_test_bin_path=`echo "$1" | grep '\--test_bin_path=' | cut -d "=" -f 2`
+FLAGS_dns_server_bin_path=`echo "$2" | grep '\--dns_server_bin_path=' | cut -d "=" -f 2`
+FLAGS_records_config_path=`echo "$3" | grep '\--records_config_path=' | cut -d "=" -f 2`
+FLAGS_test_dns_server_port=`echo "$4" | grep '\--test_dns_server_port=' | cut -d "=" -f 2`
+
+for cmd_arg in "$FLAGS_test_bin_path" "$FLAGS_dns_server_bin_path" "$FLAGS_records_config_path" "$FLAGS_test_dns_server_port"; do
+ if [[ "$cmd_arg" == "" ]]; then
+ echo "Missing a CMD arg" && exit 1
+ fi
+done
+
+if [[ "$GRPC_DNS_RESOLVER" != "" && "$GRPC_DNS_RESOLVER" != ares ]]; then
+ echo "This test only works under GRPC_DNS_RESOLVER=ares. Have GRPC_DNS_RESOLVER=$GRPC_DNS_RESOLVER" && exit 1
+fi
+export GRPC_DNS_RESOLVER=ares
+
+"$FLAGS_dns_server_bin_path" --records_config_path="$FLAGS_records_config_path" --port="$FLAGS_test_dns_server_port" 2>&1 > /dev/null &
+DNS_SERVER_PID=$!
+echo "Local DNS server started. PID: $DNS_SERVER_PID"
+
+# Health check local DNS server TCP and UDP ports
+for ((i=0;i<30;i++));
+do
+ echo "Retry health-check DNS query to local DNS server over tcp and udp"
+ RETRY=0
+ dig A health-check-local-dns-server-is-alive.resolver-tests.grpctestingexp. @localhost -p "$FLAGS_test_dns_server_port" +tries=1 +timeout=1 | grep '123.123.123.123' || RETRY=1
+ dig A health-check-local-dns-server-is-alive.resolver-tests.grpctestingexp. @localhost -p "$FLAGS_test_dns_server_port" +tries=1 +timeout=1 +tcp | grep '123.123.123.123' || RETRY=1
+ if [[ "$RETRY" == 0 ]]; then
+ break
+ fi;
+ sleep 0.1
+done
+
+if [[ $RETRY == 1 ]]; then
+ echo "FAILED TO START LOCAL DNS SERVER"
+ kill -SIGTERM $DNS_SERVER_PID
+ wait
+ exit 1
+fi
+
+function terminate_all {
+ echo "Received signal. Terminating $! and $DNS_SERVER_PID"
+ kill -SIGTERM $! || true
+ kill -SIGTERM $DNS_SERVER_PID || true
+ wait
+ exit 1
+}
+
+trap terminate_all SIGTERM SIGINT
+
+EXIT_CODE=0
+# TODO: this test should check for GCE residency and skip tests using _grpclb._tcp.* SRV records once GCE residency checks are made
+# in the resolver.
+
+% for test in tests:
+$FLAGS_test_bin_path \\
+
+ --target_name='${test['target_name']}' \\
+
+ --expected_addrs='${test['expected_addrs']}' \\
+
+ --expected_chosen_service_config='${test['expected_chosen_service_config']}' \\
+
+ --expected_lb_policy='${test['expected_lb_policy']}' \\
+
+ --local_dns_server_address=127.0.0.1:$FLAGS_test_dns_server_port &
+wait $! || EXIT_CODE=1
+
+% endfor
+kill -SIGTERM $DNS_SERVER_PID || true
+wait
+exit $EXIT_CODE</%def>
diff --git a/templates/test/cpp/naming/resolver_component_tests_runner.sh.template b/templates/test/cpp/naming/resolver_component_tests_runner.sh.template
new file mode 100644
index 0000000000..86772dd141
--- /dev/null
+++ b/templates/test/cpp/naming/resolver_component_tests_runner.sh.template
@@ -0,0 +1,4 @@
+%YAML 1.2
+--- |
+ <%namespace file="resolver_component_tests_defs.include" import="*"/>\
+ ${resolver_component_tests(resolver_component_test_cases)}
diff --git a/templates/tools/dockerfile/apt_get_basic.include b/templates/tools/dockerfile/apt_get_basic.include
index 9237e7dace..6e19e65157 100644
--- a/templates/tools/dockerfile/apt_get_basic.include
+++ b/templates/tools/dockerfile/apt_get_basic.include
@@ -6,6 +6,7 @@ RUN apt-get update && apt-get install -y ${'\\'}
bzip2 ${'\\'}
ccache ${'\\'}
curl ${'\\'}
+ dnsutils ${'\\'}
gcc ${'\\'}
gcc-multilib ${'\\'}
git ${'\\'}
diff --git a/templates/tools/dockerfile/python_deps.include b/templates/tools/dockerfile/python_deps.include
index 2c12981418..94b854ad21 100644
--- a/templates/tools/dockerfile/python_deps.include
+++ b/templates/tools/dockerfile/python_deps.include
@@ -11,4 +11,4 @@ RUN apt-get update && apt-get install -y ${'\\'}
# Install Python packages from PyPI
RUN pip install pip --upgrade
RUN pip install virtualenv
-RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0
+RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.2.0 six==1.10.0 twisted==17.5.0