aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/run_tests
diff options
context:
space:
mode:
Diffstat (limited to 'tools/run_tests')
-rw-r--r--tools/run_tests/generated/sources_and_headers.json62
-rwxr-xr-xtools/run_tests/run_tests.py3
-rwxr-xr-xtools/run_tests/run_tests_matrix.py32
-rwxr-xr-xtools/run_tests/sanity/check_submodules.sh1
4 files changed, 93 insertions, 5 deletions
diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json
index 9bc82486d2..54922d1459 100644
--- a/tools/run_tests/generated/sources_and_headers.json
+++ b/tools/run_tests/generated/sources_and_headers.json
@@ -5131,6 +5131,7 @@
"grpc_lb_policy_pick_first",
"grpc_lb_policy_round_robin",
"grpc_load_reporting",
+ "grpc_resolver_dns_ares",
"grpc_resolver_dns_native",
"grpc_resolver_sockaddr",
"grpc_secure",
@@ -5231,6 +5232,7 @@
"grpc_lb_policy_pick_first",
"grpc_lb_policy_round_robin",
"grpc_load_reporting",
+ "grpc_resolver_dns_ares",
"grpc_resolver_dns_native",
"grpc_resolver_sockaddr",
"grpc_transport_chttp2_client_insecure",
@@ -6566,6 +6568,41 @@
"type": "lib"
},
{
+ "deps": [],
+ "headers": [
+ "third_party/cares/ares_build.h",
+ "third_party/cares/cares/ares.h",
+ "third_party/cares/cares/ares_data.h",
+ "third_party/cares/cares/ares_dns.h",
+ "third_party/cares/cares/ares_getenv.h",
+ "third_party/cares/cares/ares_getopt.h",
+ "third_party/cares/cares/ares_inet_net_pton.h",
+ "third_party/cares/cares/ares_iphlpapi.h",
+ "third_party/cares/cares/ares_ipv6.h",
+ "third_party/cares/cares/ares_library_init.h",
+ "third_party/cares/cares/ares_llist.h",
+ "third_party/cares/cares/ares_nowarn.h",
+ "third_party/cares/cares/ares_platform.h",
+ "third_party/cares/cares/ares_private.h",
+ "third_party/cares/cares/ares_rules.h",
+ "third_party/cares/cares/ares_setup.h",
+ "third_party/cares/cares/ares_strcasecmp.h",
+ "third_party/cares/cares/ares_strdup.h",
+ "third_party/cares/cares/ares_version.h",
+ "third_party/cares/cares/bitncmp.h",
+ "third_party/cares/cares/config-win32.h",
+ "third_party/cares/cares/setup_once.h",
+ "third_party/cares/config_darwin/ares_config.h",
+ "third_party/cares/config_linux/ares_config.h"
+ ],
+ "is_filegroup": false,
+ "language": "c",
+ "name": "ares",
+ "src": [],
+ "third_party": false,
+ "type": "lib"
+ },
+ {
"deps": [
"gpr",
"gpr_test_util",
@@ -7495,6 +7532,31 @@
"grpc_base",
"grpc_client_channel"
],
+ "headers": [
+ "src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver.h",
+ "src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.h"
+ ],
+ "is_filegroup": true,
+ "language": "c",
+ "name": "grpc_resolver_dns_ares",
+ "src": [
+ "src/core/ext/resolver/dns/c_ares/dns_resolver_ares.c",
+ "src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver.h",
+ "src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_fallback.c",
+ "src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver_posix.c",
+ "src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.c",
+ "src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.h",
+ "src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper_fallback.c"
+ ],
+ "third_party": false,
+ "type": "filegroup"
+ },
+ {
+ "deps": [
+ "gpr",
+ "grpc_base",
+ "grpc_client_channel"
+ ],
"headers": [],
"is_filegroup": true,
"language": "c",
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index 5aae3432e1..11f0280893 100755
--- a/tools/run_tests/run_tests.py
+++ b/tools/run_tests/run_tests.py
@@ -230,6 +230,9 @@ class CLanguage(object):
_ROOT + '/src/core/lib/tsi/test_creds/ca.pem',
'GRPC_POLL_STRATEGY': polling_strategy,
'GRPC_VERBOSITY': 'DEBUG'}
+ resolver = os.environ.get('GRPC_DNS_RESOLVER', None);
+ if resolver:
+ env['GRPC_DNS_RESOLVER'] = resolver
shortname_ext = '' if polling_strategy=='all' else ' GRPC_POLL_STRATEGY=%s' % polling_strategy
timeout_scaling = 1
if polling_strategy == 'poll-cv':
diff --git a/tools/run_tests/run_tests_matrix.py b/tools/run_tests/run_tests_matrix.py
index 8f70a6d2ea..02c2f03f80 100755
--- a/tools/run_tests/run_tests_matrix.py
+++ b/tools/run_tests/run_tests_matrix.py
@@ -50,7 +50,8 @@ _RUNTESTS_TIMEOUT = 4*60*60
_DEFAULT_INNER_JOBS = 2
-def _docker_jobspec(name, runtests_args=[], inner_jobs=_DEFAULT_INNER_JOBS):
+def _docker_jobspec(name, runtests_args=[], runtests_envs={},
+ inner_jobs=_DEFAULT_INNER_JOBS):
"""Run a single instance of run_tests.py in a docker container"""
test_job = jobset.JobSpec(
cmdline=['python', 'tools/run_tests/run_tests.py',
@@ -59,16 +60,19 @@ def _docker_jobspec(name, runtests_args=[], inner_jobs=_DEFAULT_INNER_JOBS):
'-j', str(inner_jobs),
'-x', 'report_%s.xml' % name,
'--report_suite_name', '%s' % name] + runtests_args,
+ environ=runtests_envs,
shortname='run_tests_%s' % name,
timeout_seconds=_RUNTESTS_TIMEOUT)
return test_job
-def _workspace_jobspec(name, runtests_args=[], workspace_name=None, inner_jobs=_DEFAULT_INNER_JOBS):
+def _workspace_jobspec(name, runtests_args=[], workspace_name=None,
+ runtests_envs={}, inner_jobs=_DEFAULT_INNER_JOBS):
"""Run a single instance of run_tests.py in a separate workspace"""
if not workspace_name:
workspace_name = 'workspace_%s' % name
env = {'WORKSPACE_NAME': workspace_name}
+ env.update(runtests_envs)
test_job = jobset.JobSpec(
cmdline=['tools/run_tests/helper_scripts/run_tests_in_workspace.sh',
'-t',
@@ -83,7 +87,7 @@ def _workspace_jobspec(name, runtests_args=[], workspace_name=None, inner_jobs=_
def _generate_jobs(languages, configs, platforms,
arch=None, compiler=None,
- labels=[], extra_args=[],
+ labels=[], extra_args=[], extra_envs={},
inner_jobs=_DEFAULT_INNER_JOBS):
result = []
for language in languages:
@@ -96,12 +100,16 @@ def _generate_jobs(languages, configs, platforms,
name += '_%s_%s' % (arch, compiler)
runtests_args += ['--arch', arch,
'--compiler', compiler]
+ for extra_env in extra_envs:
+ name += '_%s_%s' % (extra_env, extra_envs[extra_env])
runtests_args += extra_args
if platform == 'linux':
- job = _docker_jobspec(name=name, runtests_args=runtests_args, inner_jobs=inner_jobs)
+ job = _docker_jobspec(name=name, runtests_args=runtests_args,
+ runtests_envs=extra_envs, inner_jobs=inner_jobs)
else:
- job = _workspace_jobspec(name=name, runtests_args=runtests_args, inner_jobs=inner_jobs)
+ job = _workspace_jobspec(name=name, runtests_args=runtests_args,
+ runtests_envs=extra_envs, inner_jobs=inner_jobs)
job.labels = [platform, config, language] + labels
result.append(job)
@@ -214,6 +222,20 @@ def _create_portability_test_jobs(extra_args=[], inner_jobs=_DEFAULT_INNER_JOBS)
extra_args=extra_args,
inner_jobs=inner_jobs)
+ # C and C++ with the native DNS resolver on Linux
+ test_jobs += _generate_jobs(languages=['c', 'c++'],
+ configs=['dbg'], platforms=['linux'],
+ labels=['portability'],
+ extra_args=extra_args,
+ extra_envs={'GRPC_DNS_RESOLVER': 'native'})
+
+ # C with the native DNS resolver on Windonws
+ test_jobs += _generate_jobs(languages=['c'],
+ configs=['dbg'], platforms=['windows'],
+ labels=['portability'],
+ extra_args=extra_args,
+ extra_envs={'GRPC_DNS_RESOLVER': 'native'})
+
test_jobs += _generate_jobs(languages=['python'],
configs=['dbg'],
platforms=['linux'],
diff --git a/tools/run_tests/sanity/check_submodules.sh b/tools/run_tests/sanity/check_submodules.sh
index 0b68319d29..131d84f3bb 100755
--- a/tools/run_tests/sanity/check_submodules.sh
+++ b/tools/run_tests/sanity/check_submodules.sh
@@ -49,6 +49,7 @@ cat << EOF | awk '{ print $1 }' | sort > $want_submodules
a428e42072765993ff674fda72863c9f1aa2d268 third_party/protobuf (v3.1.0-alpha-1)
bcad91771b7f0bff28a1cac1981d7ef2b9bcef3c third_party/thrift (bcad917)
50893291621658f355bc5b4d450a8d06a563053d third_party/zlib (v1.2.8)
+ 7691f773af79bf75a62d1863fd0f13ebf9dc51b1 third_party/cares/cares (1.12.0)
EOF
diff -u $submodules $want_submodules