aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/run_tests/run_tests.py
diff options
context:
space:
mode:
authorGravatar Nicolas "Pixel" Noble <pixel@nobis-crew.org>2015-02-27 06:03:00 +0100
committerGravatar Nicolas "Pixel" Noble <pixel@nobis-crew.org>2015-02-27 06:50:16 +0100
commit9db7c3b174b9a630899439a0fb3e965b8bd5060d (patch)
treeee2f46a9a04c4e2e73e1c52298adf426b4411b4c /tools/run_tests/run_tests.py
parent47d03aae63b1fa801f9d16ce592ee64da78a98a0 (diff)
Adding flaky attribute for tests.
Diffstat (limited to 'tools/run_tests/run_tests.py')
-rwxr-xr-xtools/run_tests/run_tests.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index 5942ae9180..22f12b019a 100755
--- a/tools/run_tests/run_tests.py
+++ b/tools/run_tests/run_tests.py
@@ -83,14 +83,14 @@ class CLanguage(object):
self.make_target = make_target
with open('tools/run_tests/tests.json') as f:
js = json.load(f)
- self.binaries = [tgt['name']
- for tgt in js
- if tgt['language'] == test_lang]
+ self.binaries = [tgt for tgt in js if tgt['language'] == test_lang]
- def test_specs(self, config):
+ def test_specs(self, config, travis):
out = []
- for name in self.binaries:
- binary = 'bins/%s/%s' % (config.build_config, name)
+ for target in self.binaries:
+ if travis and target['flaky']:
+ continue
+ binary = 'bins/%s/%s' % (config.build_config, target['name'])
out.append(config.job_spec(binary, [binary]))
return out
@@ -103,7 +103,7 @@ class CLanguage(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)]
def make_targets(self):
@@ -115,7 +115,7 @@ class NodeLanguage(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)]
def make_targets(self):
@@ -127,7 +127,7 @@ class PhpLanguage(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)]
def make_targets(self):
@@ -211,7 +211,7 @@ one_run = set(
spec
for config in run_configs
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))
runs_per_test = args.runs_per_test