aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/run_tests
diff options
context:
space:
mode:
Diffstat (limited to 'tools/run_tests')
-rwxr-xr-xtools/run_tests/build_package_node.sh1
-rw-r--r--tools/run_tests/package_targets.py9
-rwxr-xr-xtools/run_tests/run_interop_tests.py2
-rwxr-xr-xtools/run_tests/run_tests.py92
-rwxr-xr-xtools/run_tests/sanity/check_submodules.sh1
-rw-r--r--tools/run_tests/sources_and_headers.json64
-rw-r--r--tools/run_tests/tests.json21
7 files changed, 163 insertions, 27 deletions
diff --git a/tools/run_tests/build_package_node.sh b/tools/run_tests/build_package_node.sh
index f20daeaea0..a5636cf87a 100755
--- a/tools/run_tests/build_package_node.sh
+++ b/tools/run_tests/build_package_node.sh
@@ -50,7 +50,6 @@ cp grpc-*.tgz $artifacts/grpc.tgz
mkdir -p bin
cd $base/src/node/health_check
-npm update
npm pack
cp grpc-health-check-*.tgz $artifacts/
diff --git a/tools/run_tests/package_targets.py b/tools/run_tests/package_targets.py
index ce3f08dfbc..5e6de2e317 100644
--- a/tools/run_tests/package_targets.py
+++ b/tools/run_tests/package_targets.py
@@ -81,7 +81,14 @@ class CSharpPackage:
self.labels += ['windows']
def pre_build_jobspecs(self):
- return []
+ if 'windows' in self.labels:
+ return [create_jobspec('prebuild_%s' % self.name,
+ ['tools\\run_tests\\pre_build_csharp.bat'],
+ shell=True,
+ flake_retries=5,
+ timeout_retries=2)]
+ else:
+ return []
def build_jobspec(self):
if self.use_coreclr:
diff --git a/tools/run_tests/run_interop_tests.py b/tools/run_tests/run_interop_tests.py
index 78096b216c..0d402d67e5 100755
--- a/tools/run_tests/run_interop_tests.py
+++ b/tools/run_tests/run_interop_tests.py
@@ -662,7 +662,7 @@ argp.add_argument('--prod_servers',
'cloud_to_prod_auth tests against.'))
argp.add_argument('-s', '--server',
choices=['all'] + sorted(_SERVERS),
- action='append',
+ nargs='+',
help='Run cloud_to_cloud servers in a separate docker ' +
'image. Servers can only be started automatically if ' +
'--use_docker option is enabled.',
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index 9e6ba380f1..78ef05b635 100755
--- a/tools/run_tests/run_tests.py
+++ b/tools/run_tests/run_tests.py
@@ -139,6 +139,53 @@ def _is_use_docker_child():
return True if os.getenv('RUN_TESTS_COMMAND') else False
+_PythonConfigVars = collections.namedtuple(
+ '_ConfigVars', ['shell', 'builder', 'builder_prefix_arguments',
+ 'venv_relative_python', 'toolchain', 'runner'])
+
+
+def _python_config_generator(name, major, minor, bits, config_vars):
+ return PythonConfig(
+ name,
+ config_vars.shell + config_vars.builder + config_vars.builder_prefix_arguments + [
+ _python_pattern_function(major=major, minor=minor, bits=bits)] + [
+ name] + config_vars.venv_relative_python + config_vars.toolchain,
+ config_vars.shell + config_vars.runner + [
+ os.path.join(name, config_vars.venv_relative_python[0])])
+
+
+def _pypy_config_generator(name, major, config_vars):
+ return PythonConfig(
+ name,
+ config_vars.shell + config_vars.builder + config_vars.builder_prefix_arguments + [
+ _pypy_pattern_function(major=major)] + [
+ name] + config_vars.venv_relative_python + config_vars.toolchain,
+ config_vars.shell + config_vars.runner + [
+ os.path.join(name, config_vars.venv_relative_python[0])])
+
+
+def _python_pattern_function(major, minor, bits):
+ # Bit-ness is handled by the test machine's environment
+ if os.name == "nt":
+ if bits == "64":
+ return '/c/Python{major}{minor}/python.exe'.format(
+ major=major, minor=minor, bits=bits)
+ else:
+ return '/c/Python{major}{minor}_{bits}bits/python.exe'.format(
+ major=major, minor=minor, bits=bits)
+ else:
+ return 'python{major}.{minor}'.format(major=major, minor=minor)
+
+
+def _pypy_pattern_function(major):
+ if major == '2':
+ return 'pypy'
+ elif major == '3':
+ return 'pypy3'
+ else:
+ raise ValueError("Unknown PyPy major version")
+
+
class CLanguage(object):
def __init__(self, make_target, test_lang):
@@ -471,36 +518,40 @@ class PythonLanguage(object):
bits = '32'
else:
bits = '64'
+
if os.name == 'nt':
shell = ['bash']
builder = [os.path.abspath('tools/run_tests/build_python_msys2.sh')]
builder_prefix_arguments = ['MINGW{}'.format(bits)]
venv_relative_python = ['Scripts/python.exe']
toolchain = ['mingw32']
- python_pattern_function = lambda major, minor, bits: (
- '/c/Python{major}{minor}/python.exe'.format(major=major, minor=minor, bits=bits)
- if bits == '64' else
- '/c/Python{major}{minor}_{bits}bits/python.exe'.format(
- major=major, minor=minor, bits=bits))
else:
shell = []
builder = [os.path.abspath('tools/run_tests/build_python.sh')]
builder_prefix_arguments = []
venv_relative_python = ['bin/python']
toolchain = ['unix']
- # Bit-ness is handled by the test machine's environment
- python_pattern_function = lambda major, minor, bits: 'python{major}.{minor}'.format(major=major, minor=minor)
+
runner = [os.path.abspath('tools/run_tests/run_python.sh')]
- python_config_generator = lambda name, major, minor, bits: PythonConfig(
- name,
- shell + builder + builder_prefix_arguments
- + [python_pattern_function(major=major, minor=minor, bits=bits)]
- + [name] + venv_relative_python + toolchain,
- shell + runner + [os.path.join(name, venv_relative_python[0])])
- python27_config = python_config_generator(name='py27', major='2', minor='7', bits=bits)
- python34_config = python_config_generator(name='py34', major='3', minor='4', bits=bits)
- python35_config = python_config_generator(name='py35', major='3', minor='5', bits=bits)
- python36_config = python_config_generator(name='py36', major='3', minor='6', bits=bits)
+ config_vars = _PythonConfigVars(shell, builder, builder_prefix_arguments,
+ venv_relative_python, toolchain, runner)
+ python27_config = _python_config_generator(name='py27', major='2',
+ minor='7', bits=bits,
+ config_vars=config_vars)
+ python34_config = _python_config_generator(name='py34', major='3',
+ minor='4', bits=bits,
+ config_vars=config_vars)
+ python35_config = _python_config_generator(name='py35', major='3',
+ minor='5', bits=bits,
+ config_vars=config_vars)
+ python36_config = _python_config_generator(name='py36', major='3',
+ minor='6', bits=bits,
+ config_vars=config_vars)
+ pypy27_config = _pypy_config_generator(name='pypy', major='2',
+ config_vars=config_vars)
+ pypy32_config = _pypy_config_generator(name='pypy3', major='3',
+ config_vars=config_vars)
+
if args.compiler == 'default':
if os.name == 'nt':
return (python27_config,)
@@ -514,6 +565,10 @@ class PythonLanguage(object):
return (python35_config,)
elif args.compiler == 'python3.6':
return (python36_config,)
+ elif args.compiler == 'pypy':
+ return (pypy27_config,)
+ elif args.compiler == 'pypy3':
+ return (pypy32_config,)
else:
raise Exception('Compiler %s not supported.' % args.compiler)
@@ -895,6 +950,7 @@ def runs_per_test_type(arg_str):
msg = '\'{}\' is not a positive integer or \'inf\''.format(arg_str)
raise argparse.ArgumentTypeError(msg)
+
# parse command line
argp = argparse.ArgumentParser(description='Run grpc tests.')
argp.add_argument('-c', '--config',
@@ -948,7 +1004,7 @@ argp.add_argument('--compiler',
'gcc4.4', 'gcc4.6', 'gcc4.9', 'gcc5.3',
'clang3.4', 'clang3.5', 'clang3.6', 'clang3.7',
'vs2010', 'vs2013', 'vs2015',
- 'python2.7', 'python3.4', 'python3.5', 'python3.6',
+ 'python2.7', 'python3.4', 'python3.5', 'python3.6', 'pypy', 'pypy3',
'node0.12', 'node4', 'node5',
'coreclr'],
default='default',
diff --git a/tools/run_tests/sanity/check_submodules.sh b/tools/run_tests/sanity/check_submodules.sh
index 04123ee5d8..d2ab5b01cc 100755
--- a/tools/run_tests/sanity/check_submodules.sh
+++ b/tools/run_tests/sanity/check_submodules.sh
@@ -47,6 +47,7 @@ cat << EOF | awk '{ print $1 }' | sort > $want_submodules
f8ac463766281625ad710900479130c7fcb4d63b third_party/nanopb (nanopb-0.3.4-29-gf8ac463)
e8ae137c96444ea313485ed1118c5e43b2099cf1 third_party/protobuf (v3.0.0-beta-4-74-ge8ae137)
50893291621658f355bc5b4d450a8d06a563053d third_party/zlib (v1.2.8)
+ bcad91771b7f0bff28a1cac1981d7ef2b9bcef3c third_party/thrift
EOF
diff -u $submodules $want_submodules
diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json
index 4071eba94d..e5946cc14a 100644
--- a/tools/run_tests/sources_and_headers.json
+++ b/tools/run_tests/sources_and_headers.json
@@ -2164,14 +2164,11 @@
{
"deps": [
"gpr",
- "gpr_test_util",
"grpc",
"grpc++",
"grpc++_reflection",
"grpc++_test_config",
- "grpc++_test_util",
- "grpc_cli_libs",
- "grpc_test_util"
+ "grpc_cli_libs"
],
"headers": [],
"language": "c++",
@@ -2262,6 +2259,35 @@
},
{
"deps": [
+ "gpr",
+ "gpr_test_util",
+ "grpc",
+ "grpc++",
+ "grpc++_codegen_proto",
+ "grpc++_config_proto",
+ "grpc++_reflection",
+ "grpc_cli_libs",
+ "grpc_test_util"
+ ],
+ "headers": [
+ "src/proto/grpc/testing/echo.grpc.pb.h",
+ "src/proto/grpc/testing/echo.pb.h",
+ "src/proto/grpc/testing/echo_messages.grpc.pb.h",
+ "src/proto/grpc/testing/echo_messages.pb.h",
+ "test/cpp/util/string_ref_helper.h"
+ ],
+ "language": "c++",
+ "name": "grpc_tool_test",
+ "src": [
+ "test/cpp/util/grpc_tool_test.cc",
+ "test/cpp/util/string_ref_helper.cc",
+ "test/cpp/util/string_ref_helper.h"
+ ],
+ "third_party": false,
+ "type": "target"
+ },
+ {
+ "deps": [
"grpc",
"grpc++",
"grpc++_test_util",
@@ -4468,7 +4494,8 @@
"grpc++_codegen_base_src",
"grpc++_codegen_proto",
"grpc++_config_proto",
- "grpc_test_util"
+ "grpc_test_util",
+ "thrift_util"
],
"headers": [
"src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h",
@@ -4525,10 +4552,13 @@
"deps": [
"grpc++",
"grpc++_reflection",
- "grpc_plugin_support"
+ "grpc++_test_config"
],
"headers": [
"test/cpp/util/cli_call.h",
+ "test/cpp/util/cli_credentials.h",
+ "test/cpp/util/config_grpc_cli.h",
+ "test/cpp/util/grpc_tool.h",
"test/cpp/util/proto_file_parser.h",
"test/cpp/util/proto_reflection_descriptor_database.h"
],
@@ -4537,6 +4567,11 @@
"src": [
"test/cpp/util/cli_call.cc",
"test/cpp/util/cli_call.h",
+ "test/cpp/util/cli_credentials.cc",
+ "test/cpp/util/cli_credentials.h",
+ "test/cpp/util/config_grpc_cli.h",
+ "test/cpp/util/grpc_tool.cc",
+ "test/cpp/util/grpc_tool.h",
"test/cpp/util/proto_file_parser.cc",
"test/cpp/util/proto_file_parser.h",
"test/cpp/util/proto_reflection_descriptor_database.cc",
@@ -6870,5 +6905,22 @@
],
"third_party": false,
"type": "filegroup"
+ },
+ {
+ "deps": [
+ "grpc++_codegen_base"
+ ],
+ "headers": [
+ "include/grpc++/impl/codegen/thrift_serializer.h",
+ "include/grpc++/impl/codegen/thrift_utils.h"
+ ],
+ "language": "c++",
+ "name": "thrift_util",
+ "src": [
+ "include/grpc++/impl/codegen/thrift_serializer.h",
+ "include/grpc++/impl/codegen/thrift_utils.h"
+ ],
+ "third_party": false,
+ "type": "filegroup"
}
]
diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json
index 11fb460dd5..b0c09ace5b 100644
--- a/tools/run_tests/tests.json
+++ b/tools/run_tests/tests.json
@@ -2324,6 +2324,27 @@
"flaky": false,
"gtest": true,
"language": "c++",
+ "name": "grpc_tool_test",
+ "platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ]
+ },
+ {
+ "args": [],
+ "ci_platforms": [
+ "linux",
+ "mac",
+ "posix",
+ "windows"
+ ],
+ "cpu_cost": 1.0,
+ "exclude_configs": [],
+ "flaky": false,
+ "gtest": true,
+ "language": "c++",
"name": "grpclb_api_test",
"platforms": [
"linux",