aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/run_tests
diff options
context:
space:
mode:
authorGravatar David Garcia Quintas <dgq@google.com>2015-06-23 10:23:31 -0700
committerGravatar David Garcia Quintas <dgq@google.com>2015-06-23 10:37:58 -0700
commite75d4c85315c4260f8eea5516dfba986982a6771 (patch)
tree329011db5c526acefcae917f54104998e9cb86fc /tools/run_tests
parente25e92873d1a63d2a377d4b4803337a8b50baa11 (diff)
parent253aaa6b106673553c5cc94c87f7d8932729e54f (diff)
Merge branch 'master' of github.com:grpc/grpc into decompression
Diffstat (limited to 'tools/run_tests')
-rwxr-xr-xtools/run_tests/run_tests.py37
-rw-r--r--tools/run_tests/tests.json67
2 files changed, 71 insertions, 33 deletions
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index 2c9ffe72ec..5ed70f0b7e 100755
--- a/tools/run_tests/run_tests.py
+++ b/tools/run_tests/run_tests.py
@@ -50,6 +50,9 @@ ROOT = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), '../..'))
os.chdir(ROOT)
+_FORCE_ENVIRON_FOR_WRAPPERS = {}
+
+
# SimpleConfig: just compile with CONFIG=config, and run the binary to test
class SimpleConfig(object):
@@ -97,7 +100,7 @@ class ValgrindConfig(object):
def job_spec(self, cmdline, hash_targets):
return jobset.JobSpec(cmdline=['valgrind', '--tool=%s' % self.tool] +
self.args + cmdline,
- shortname='valgrind %s' % binary,
+ shortname='valgrind %s' % cmdline[0],
hash_targets=None)
@@ -130,7 +133,7 @@ class CLanguage(object):
return sorted(out)
def make_targets(self):
- return ['buildtests_%s' % self.make_target]
+ return ['buildtests_%s' % self.make_target, 'tools_%s' % self.make_target]
def build_steps(self):
return []
@@ -146,7 +149,7 @@ class NodeLanguage(object):
def test_specs(self, config, travis):
return [config.job_spec(['tools/run_tests/run_node.sh'], None,
- environ={'GRPC_TRACE': 'surface,batch'})]
+ environ=_FORCE_ENVIRON_FOR_WRAPPERS)]
def make_targets(self):
return ['static_c', 'shared_c']
@@ -165,7 +168,7 @@ class PhpLanguage(object):
def test_specs(self, config, travis):
return [config.job_spec(['src/php/bin/run_tests.sh'], None,
- environ={'GRPC_TRACE': 'surface,batch'})]
+ environ=_FORCE_ENVIRON_FOR_WRAPPERS)]
def make_targets(self):
return ['static_c', 'shared_c']
@@ -190,13 +193,13 @@ class PythonLanguage(object):
modules = [config.job_spec(['tools/run_tests/run_python.sh', '-m',
test['module']],
None,
- environ={'GRPC_TRACE': 'surface,batch'},
+ environ=_FORCE_ENVIRON_FOR_WRAPPERS,
shortname=test['module'])
for test in self._tests if 'module' in test]
files = [config.job_spec(['tools/run_tests/run_python.sh',
test['file']],
None,
- environ={'GRPC_TRACE': 'surface,batch'},
+ environ=_FORCE_ENVIRON_FOR_WRAPPERS,
shortname=test['file'])
for test in self._tests if 'file' in test]
return files + modules
@@ -218,7 +221,7 @@ class RubyLanguage(object):
def test_specs(self, config, travis):
return [config.job_spec(['tools/run_tests/run_ruby.sh'], None,
- environ={'GRPC_TRACE': 'surface,batch'})]
+ environ=_FORCE_ENVIRON_FOR_WRAPPERS)]
def make_targets(self):
return ['run_dep_checks']
@@ -251,7 +254,7 @@ class CSharpLanguage(object):
cmd = 'tools/run_tests/run_csharp.sh'
return [config.job_spec([cmd, assembly],
None, shortname=assembly,
- environ={'GRPC_TRACE': 'surface,batch'})
+ environ=_FORCE_ENVIRON_FOR_WRAPPERS)
for assembly in assemblies ]
def make_targets(self):
@@ -385,9 +388,9 @@ argp.add_argument('--newline_on_success',
action='store_const',
const=True)
argp.add_argument('-l', '--language',
- choices=sorted(_LANGUAGES.keys()),
+ choices=['all'] + sorted(_LANGUAGES.keys()),
nargs='+',
- default=sorted(_LANGUAGES.keys()))
+ default=['all'])
argp.add_argument('-S', '--stop_on_failure',
default=False,
action='store_const',
@@ -402,8 +405,14 @@ run_configs = set(_CONFIGS[cfg]
for x in args.config))
build_configs = set(cfg.build_config for cfg in run_configs)
+if args.travis:
+ _FORCE_ENVIRON_FOR_WRAPPERS = {'GRPC_TRACE': 'surface,batch'}
+
make_targets = []
-languages = set(_LANGUAGES[l] for l in args.language)
+languages = set(_LANGUAGES[l]
+ for l in itertools.chain.from_iterable(
+ _LANGUAGES.iterkeys() if x == 'all' else [x]
+ for x in args.language))
if len(build_configs) > 1:
for language in languages:
@@ -435,8 +444,8 @@ build_steps.extend(set(
one_run = set(
spec
for config in run_configs
- for language in args.language
- for spec in _LANGUAGES[language].test_specs(config, args.travis)
+ for language in languages
+ for spec in language.test_specs(config, args.travis)
if re.search(args.regex, spec.shortname))
runs_per_test = args.runs_per_test
@@ -504,6 +513,8 @@ def _build_and_run(check_cancelled, newline_on_success, travis, cache):
# chance to run.
massaged_one_run = list(one_run) # random.shuffle needs an indexable seq.
random.shuffle(massaged_one_run) # which it modifies in-place.
+ if infinite_runs:
+ assert len(massaged_one_run) > 0, 'Must have at least one test for a -n inf run'
runs_sequence = (itertools.repeat(massaged_one_run) if infinite_runs
else itertools.repeat(massaged_one_run, runs_per_test))
all_runs = itertools.chain.from_iterable(runs_sequence)
diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json
index bc9e52ceb1..0b3729bd63 100644
--- a/tools/run_tests/tests.json
+++ b/tools/run_tests/tests.json
@@ -306,6 +306,15 @@
{
"flaky": false,
"language": "c",
+ "name": "grpc_security_connector_test",
+ "platforms": [
+ "windows",
+ "posix"
+ ]
+ },
+ {
+ "flaky": false,
+ "language": "c",
"name": "grpc_stream_op_test",
"platforms": [
"windows",
@@ -598,6 +607,24 @@
{
"flaky": false,
"language": "c++",
+ "name": "cxx_byte_buffer_test",
+ "platforms": [
+ "windows",
+ "posix"
+ ]
+ },
+ {
+ "flaky": false,
+ "language": "c++",
+ "name": "cxx_slice_test",
+ "platforms": [
+ "windows",
+ "posix"
+ ]
+ },
+ {
+ "flaky": false,
+ "language": "c++",
"name": "cxx_time_test",
"platforms": [
"windows",
@@ -722,7 +749,7 @@
]
},
{
- "flaky": true,
+ "flaky": false,
"language": "c",
"name": "chttp2_fake_security_cancel_after_accept_test",
"platforms": [
@@ -821,7 +848,7 @@
]
},
{
- "flaky": true,
+ "flaky": false,
"language": "c",
"name": "chttp2_fake_security_invoke_large_request_test",
"platforms": [
@@ -1001,7 +1028,7 @@
]
},
{
- "flaky": true,
+ "flaky": false,
"language": "c",
"name": "chttp2_fullstack_cancel_after_accept_test",
"platforms": [
@@ -1100,7 +1127,7 @@
]
},
{
- "flaky": true,
+ "flaky": false,
"language": "c",
"name": "chttp2_fullstack_invoke_large_request_test",
"platforms": [
@@ -1279,7 +1306,7 @@
]
},
{
- "flaky": true,
+ "flaky": false,
"language": "c",
"name": "chttp2_fullstack_uds_posix_cancel_after_accept_test",
"platforms": [
@@ -1367,7 +1394,7 @@
]
},
{
- "flaky": true,
+ "flaky": false,
"language": "c",
"name": "chttp2_fullstack_uds_posix_invoke_large_request_test",
"platforms": [
@@ -1527,7 +1554,7 @@
]
},
{
- "flaky": true,
+ "flaky": false,
"language": "c",
"name": "chttp2_fullstack_with_poll_cancel_after_accept_test",
"platforms": [
@@ -1615,7 +1642,7 @@
]
},
{
- "flaky": true,
+ "flaky": false,
"language": "c",
"name": "chttp2_fullstack_with_poll_invoke_large_request_test",
"platforms": [
@@ -1776,7 +1803,7 @@
]
},
{
- "flaky": true,
+ "flaky": false,
"language": "c",
"name": "chttp2_simple_ssl_fullstack_cancel_after_accept_test",
"platforms": [
@@ -1875,7 +1902,7 @@
]
},
{
- "flaky": true,
+ "flaky": false,
"language": "c",
"name": "chttp2_simple_ssl_fullstack_invoke_large_request_test",
"platforms": [
@@ -2054,7 +2081,7 @@
]
},
{
- "flaky": true,
+ "flaky": false,
"language": "c",
"name": "chttp2_simple_ssl_fullstack_with_poll_cancel_after_accept_test",
"platforms": [
@@ -2142,7 +2169,7 @@
]
},
{
- "flaky": true,
+ "flaky": false,
"language": "c",
"name": "chttp2_simple_ssl_fullstack_with_poll_invoke_large_request_test",
"platforms": [
@@ -2303,7 +2330,7 @@
]
},
{
- "flaky": true,
+ "flaky": false,
"language": "c",
"name": "chttp2_simple_ssl_with_oauth2_fullstack_cancel_after_accept_test",
"platforms": [
@@ -2402,7 +2429,7 @@
]
},
{
- "flaky": true,
+ "flaky": false,
"language": "c",
"name": "chttp2_simple_ssl_with_oauth2_fullstack_invoke_large_request_test",
"platforms": [
@@ -2582,7 +2609,7 @@
]
},
{
- "flaky": true,
+ "flaky": false,
"language": "c",
"name": "chttp2_socket_pair_cancel_after_accept_test",
"platforms": [
@@ -2681,7 +2708,7 @@
]
},
{
- "flaky": true,
+ "flaky": false,
"language": "c",
"name": "chttp2_socket_pair_invoke_large_request_test",
"platforms": [
@@ -2861,7 +2888,7 @@
]
},
{
- "flaky": true,
+ "flaky": false,
"language": "c",
"name": "chttp2_socket_pair_one_byte_at_a_time_cancel_after_accept_test",
"platforms": [
@@ -2960,7 +2987,7 @@
]
},
{
- "flaky": true,
+ "flaky": false,
"language": "c",
"name": "chttp2_socket_pair_one_byte_at_a_time_invoke_large_request_test",
"platforms": [
@@ -3140,7 +3167,7 @@
]
},
{
- "flaky": true,
+ "flaky": false,
"language": "c",
"name": "chttp2_socket_pair_with_grpc_trace_cancel_after_accept_test",
"platforms": [
@@ -3239,7 +3266,7 @@
]
},
{
- "flaky": true,
+ "flaky": false,
"language": "c",
"name": "chttp2_socket_pair_with_grpc_trace_invoke_large_request_test",
"platforms": [