aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/run_tests/run_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/run_tests/run_tests.py')
-rwxr-xr-xtools/run_tests/run_tests.py24
1 files changed, 8 insertions, 16 deletions
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index a1f2aaab2f..f71be2a65e 100755
--- a/tools/run_tests/run_tests.py
+++ b/tools/run_tests/run_tests.py
@@ -756,9 +756,10 @@ class PythonLanguage(object):
def dockerfile_dir(self):
return 'tools/dockerfile/test/python_%s_%s' % (
- self.python_manager_name(), _docker_arch_suffix(self.args.arch))
+ self._python_manager_name(), _docker_arch_suffix(self.args.arch))
- def python_manager_name(self):
+ def _python_manager_name(self):
+ """Choose the docker image to use based on python version."""
if self.args.compiler in [
'python2.7', 'python3.5', 'python3.6', 'python3.7'
]:
@@ -771,6 +772,7 @@ class PythonLanguage(object):
return 'stretch_3.7'
def _get_pythons(self, args):
+ """Get python runtimes to test with, based on current platform, architecture, compiler etc."""
if args.arch == 'x86':
bits = '32'
else:
@@ -1340,9 +1342,9 @@ argp.add_argument(
argp.add_argument(
'-l',
'--language',
- choices=['all'] + sorted(_LANGUAGES.keys()),
+ choices=sorted(_LANGUAGES.keys()),
nargs='+',
- default=['all'])
+ required=True)
argp.add_argument(
'-S', '--stop_on_failure', default=False, action='store_const', const=True)
argp.add_argument(
@@ -1513,17 +1515,7 @@ build_config = run_config.build_config
if args.travis:
_FORCE_ENVIRON_FOR_WRAPPERS = {'GRPC_TRACE': 'api'}
-if 'all' in args.language:
- lang_list = list(_LANGUAGES.keys())
-else:
- lang_list = args.language
-# We don't support code coverage on some languages
-if 'gcov' in args.config:
- for bad in ['csharp', 'grpc-node', 'objc', 'sanity']:
- if bad in lang_list:
- lang_list.remove(bad)
-
-languages = set(_LANGUAGES[l] for l in lang_list)
+languages = set(_LANGUAGES[l] for l in args.language)
for l in languages:
l.configure(run_config, args)
@@ -1535,7 +1527,7 @@ if any(language.make_options() for language in languages):
)
sys.exit(1)
else:
- # Combining make options is not clean and just happens to work. It allows C/C++ and C# to build
+ # Combining make options is not clean and just happens to work. It allows C & C++ to build
# together, and is only used under gcov. All other configs should build languages individually.
language_make_options = list(
set([