diff options
author | Jan Tattermusch <jtattermusch@google.com> | 2016-02-07 20:21:02 -0800 |
---|---|---|
committer | Jan Tattermusch <jtattermusch@google.com> | 2016-02-08 17:23:01 -0800 |
commit | e70b3c5d5a4224f6cb250d491a442e2c1349bf36 (patch) | |
tree | b31998b53ae6f2a85ad4705c2d668327f4e4d1db | |
parent | 5ed57567b8b75b6fa26bcbb3d1bee6d695a1186e (diff) |
use per-language dockerfiles
-rwxr-xr-x | tools/run_tests/run_tests.py | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 6dfdc705be..f405866442 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -186,7 +186,7 @@ class CLanguage(object): return True def dockerfile_dir(self, config, arch): - return None + return 'tools/dockerfile/test/cxx_jessie_%s' % _docker_arch_suffix(arch) def __str__(self): return self.make_target @@ -225,7 +225,7 @@ class NodeLanguage(object): return False def dockerfile_dir(self, config, arch): - return None + return 'tools/dockerfile/test/node_jessie_%s' % _docker_arch_suffix(arch) def __str__(self): return 'node' @@ -259,7 +259,7 @@ class PhpLanguage(object): return False def dockerfile_dir(self, config, arch): - return None + return 'tools/dockerfile/test/php_jessie_%s' % _docker_arch_suffix(arch) def __str__(self): return 'php' @@ -315,7 +315,7 @@ class PythonLanguage(object): return False def dockerfile_dir(self, config, arch): - return None + return 'tools/dockerfile/test/python_jessie_%s' % _docker_arch_suffix(arch) def __str__(self): return 'python' @@ -349,7 +349,7 @@ class RubyLanguage(object): return False def dockerfile_dir(self, config, arch): - return None + return 'tools/dockerfile/test/ruby_jessie_%s' % _docker_arch_suffix(arch) def __str__(self): return 'ruby' @@ -434,7 +434,7 @@ class CSharpLanguage(object): return False def dockerfile_dir(self, config, arch): - return None + return 'tools/dockerfile/test/csharp_jessie_%s' % _docker_arch_suffix(arch) def __str__(self): return 'csharp' @@ -506,7 +506,7 @@ class Sanity(object): return False def dockerfile_dir(self, config, arch): - return 'tools/dockerfile/grpc_sanity' + return 'tools/dockerfile/test/sanity' def __str__(self): return 'sanity' @@ -630,19 +630,24 @@ def _windows_toolset_option(compiler): sys.exit(1) +def _docker_arch_suffix(arch): + """Returns suffix to dockerfile dir to use.""" + if arch == 'default' or arch == 'x64': + return 'x64' + elif arch == 'x86': + return 'x86' + else: + print 'Architecture %s not supported with current settings.' % arch + sys.exit(1) + + def _get_dockerfile_dir(language, cfg, arch): """Returns dockerfile to use""" custom = language.dockerfile_dir(cfg, arch) if custom: return custom else: - if arch == 'default' or arch == 'x64': - return 'tools/dockerfile/grpc_tests_multilang_x64' - elif arch == 'x86': - return 'tools/dockerfile/grpc_tests_multilang_x86' - else: - print 'Architecture %s not supported with current settings.' % arch - sys.exit(1) + return 'tools/dockerfile/grpc_tests_multilang_%s' % _docker_arch_suffix(arch) def runs_per_test_type(arg_str): """Auxilary function to parse the "runs_per_test" flag. |