diff options
author | Richard Belleville <rbellevi@google.com> | 2018-11-02 14:18:58 -0700 |
---|---|---|
committer | Richard Belleville <rbellevi@google.com> | 2018-11-02 14:18:58 -0700 |
commit | 666fb1c5ee27f70ba9ad94519c8c39cc742ee2ab (patch) | |
tree | 9bdeaba55b115facad277076b84fcad8688579ee /tools/run_tests/run_tests.py | |
parent | 53657b5de385ffc54e33899b3f2a87ff78d2952b (diff) |
Make run_tests.py python-version agnostic
Diffstat (limited to 'tools/run_tests/run_tests.py')
-rwxr-xr-x | tools/run_tests/run_tests.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 44151f49fb..ede64f2a28 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -14,7 +14,7 @@ # limitations under the License. """Run tests in parallel.""" -from __future__ import print_function + import argparse import ast @@ -158,7 +158,7 @@ class Config(object): would like to run """ actual_environ = self.environ.copy() - for k, v in environ.items(): + for k, v in list(environ.items()): actual_environ[k] = v if not flaky and shortname and shortname in flaky_tests: flaky = True @@ -1512,7 +1512,7 @@ if args.travis: _FORCE_ENVIRON_FOR_WRAPPERS = {'GRPC_TRACE': 'api'} if 'all' in args.language: - lang_list = _LANGUAGES.keys() + lang_list = list(_LANGUAGES.keys()) else: lang_list = args.language # We don't support code coverage on some languages @@ -1653,7 +1653,7 @@ build_steps = list( if make_targets: make_commands = itertools.chain.from_iterable( make_jobspec(build_config, list(targets), makefile) - for (makefile, targets) in make_targets.items()) + for (makefile, targets) in list(make_targets.items())) build_steps.extend(set(make_commands)) build_steps.extend( set( @@ -1719,9 +1719,9 @@ def _has_epollexclusive(): try: subprocess.check_call(binary) return True - except subprocess.CalledProcessError, e: + except subprocess.CalledProcessError as e: return False - except OSError, e: + except OSError as e: # For languages other than C and Windows the binary won't exist return False |