Skip to content
Snippets Groups Projects
Commit afcbfa1b authored by Craig Tiller's avatar Craig Tiller
Browse files

Merge pull request #865 from nicolasnoble/flaky

Adding flaky attribute for tests.
parents 6a80e572 9db7c3b1
No related branches found
No related tags found
No related merge requests found
...@@ -866,7 +866,8 @@ ...@@ -866,7 +866,8 @@
"grpc", "grpc",
"gpr_test_util", "gpr_test_util",
"gpr" "gpr"
] ],
"flaky": true
}, },
{ {
"name": "fling_test", "name": "fling_test",
...@@ -880,7 +881,8 @@ ...@@ -880,7 +881,8 @@
"grpc", "grpc",
"gpr_test_util", "gpr_test_util",
"gpr" "gpr"
] ],
"flaky": true
}, },
{ {
"name": "gen_hpack_tables", "name": "gen_hpack_tables",
......
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
import json import json
%> %>
${json.dumps([{"name": tgt.name, "language": tgt.language} ${json.dumps([{"name": tgt.name,
"language": tgt.language,
"flaky": tgt.get("flaky", False)}
for tgt in targets for tgt in targets
if tgt.get('run', True) and tgt.build == 'test'], if tgt.get('run', True) and tgt.build == 'test'],
sort_keys=True, indent=2)} sort_keys=True, indent=2)}
......
...@@ -83,14 +83,14 @@ class CLanguage(object): ...@@ -83,14 +83,14 @@ class CLanguage(object):
self.make_target = make_target self.make_target = make_target
with open('tools/run_tests/tests.json') as f: with open('tools/run_tests/tests.json') as f:
js = json.load(f) js = json.load(f)
self.binaries = [tgt['name'] self.binaries = [tgt for tgt in js if tgt['language'] == test_lang]
for tgt in js
if tgt['language'] == test_lang]
def test_specs(self, config): def test_specs(self, config, travis):
out = [] out = []
for name in self.binaries: for target in self.binaries:
binary = 'bins/%s/%s' % (config.build_config, name) if travis and target['flaky']:
continue
binary = 'bins/%s/%s' % (config.build_config, target['name'])
out.append(config.job_spec(binary, [binary])) out.append(config.job_spec(binary, [binary]))
return out return out
...@@ -103,7 +103,7 @@ class CLanguage(object): ...@@ -103,7 +103,7 @@ class CLanguage(object):
class NodeLanguage(object): class NodeLanguage(object):
def test_specs(self, config): def test_specs(self, config, travis):
return [config.job_spec('tools/run_tests/run_node.sh', None)] return [config.job_spec('tools/run_tests/run_node.sh', None)]
def make_targets(self): def make_targets(self):
...@@ -115,7 +115,7 @@ class NodeLanguage(object): ...@@ -115,7 +115,7 @@ class NodeLanguage(object):
class PhpLanguage(object): class PhpLanguage(object):
def test_specs(self, config): def test_specs(self, config, travis):
return [config.job_spec('src/php/bin/run_tests.sh', None)] return [config.job_spec('src/php/bin/run_tests.sh', None)]
def make_targets(self): def make_targets(self):
...@@ -127,7 +127,7 @@ class PhpLanguage(object): ...@@ -127,7 +127,7 @@ class PhpLanguage(object):
class PythonLanguage(object): class PythonLanguage(object):
def test_specs(self, config): def test_specs(self, config, travis):
return [config.job_spec('tools/run_tests/run_python.sh', None)] return [config.job_spec('tools/run_tests/run_python.sh', None)]
def make_targets(self): def make_targets(self):
...@@ -211,7 +211,7 @@ one_run = set( ...@@ -211,7 +211,7 @@ one_run = set(
spec spec
for config in run_configs for config in run_configs
for language in args.language for language in args.language
for spec in _LANGUAGES[language].test_specs(config) for spec in _LANGUAGES[language].test_specs(config, args.travis)
if re.search(args.regex, spec.shortname)) if re.search(args.regex, spec.shortname))
runs_per_test = args.runs_per_test runs_per_test = args.runs_per_test
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment