diff options
author | Craig Tiller <craig.tiller@gmail.com> | 2016-02-08 12:57:34 -0800 |
---|---|---|
committer | Craig Tiller <craig.tiller@gmail.com> | 2016-02-08 12:57:34 -0800 |
commit | 2d3bed911ead4aa92ca90be087df00a3b69606df (patch) | |
tree | 61e524ac7d8dc216979f8ea17f380def2b01773e /tools | |
parent | f008f067f82d88cbcd70a104e20479d4ed3a3386 (diff) | |
parent | 81b780b84b77a093ac2273865cd1af8a0f6f69bf (diff) |
Merge github.com:grpc/grpc into version_number
Diffstat (limited to 'tools')
-rw-r--r-- | tools/run_tests/distribtest_targets.py | 36 |
1 files changed, 29 insertions, 7 deletions
diff --git a/tools/run_tests/distribtest_targets.py b/tools/run_tests/distribtest_targets.py index f3ebc00b4e..fc7dd17145 100644 --- a/tools/run_tests/distribtest_targets.py +++ b/tools/run_tests/distribtest_targets.py @@ -55,28 +55,49 @@ def create_docker_jobspec(name, dockerfile_dir, shell_command, environ={}, return jobspec +def create_jobspec(name, cmdline, environ=None, shell=False, + flake_retries=0, timeout_retries=0): + """Creates jobspec.""" + jobspec = jobset.JobSpec( + cmdline=cmdline, + environ=environ, + shortname='distribtest.%s' % (name), + timeout_seconds=10*60, + flake_retries=flake_retries, + timeout_retries=timeout_retries, + shell=shell) + return jobspec + + class CSharpDistribTest(object): """Tests C# NuGet package""" - def __init__(self, platform, arch, docker_suffix): - self.name = 'csharp_nuget_%s_%s_%s' % (platform, arch, docker_suffix) + def __init__(self, platform, arch, docker_suffix=None): + self.name = 'csharp_nuget_%s_%s' % (platform, arch) self.platform = platform self.arch = arch self.docker_suffix = docker_suffix - self.labels = ['distribtest', 'csharp', platform, arch, docker_suffix] + self.labels = ['distribtest', 'csharp', platform, arch] + if docker_suffix: + self.name += '_%s' % docker_suffix + self.labels.append(docker_suffix) def pre_build_jobspecs(self): return [] def build_jobspec(self): - if not self.platform == 'linux': - raise Exception("Not supported yet.") - - return create_docker_jobspec(self.name, + if self.platform == 'linux': + return create_docker_jobspec(self.name, 'tools/dockerfile/distribtest/csharp_%s_%s' % ( self.docker_suffix, self.arch), 'test/distrib/csharp/run_distrib_test.sh') + elif self.platform == 'macos': + return create_jobspec(self.name, + ['test/distrib/csharp/run_distrib_test.sh'], + environ={'EXTERNAL_GIT_ROOT': '../../..'}) + else: + raise Exception("Not supported yet.") def __str__(self): return self.name @@ -175,6 +196,7 @@ def targets(): CSharpDistribTest('linux', 'x64', 'ubuntu1504'), CSharpDistribTest('linux', 'x64', 'ubuntu1510'), CSharpDistribTest('linux', 'x64', 'ubuntu1604'), + CSharpDistribTest('macos', 'x86'), PythonDistribTest('linux', 'x64', 'wheezy'), PythonDistribTest('linux', 'x64', 'jessie'), PythonDistribTest('linux', 'x86', 'jessie'), |