aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/run_tests/run_stress_tests.py
diff options
context:
space:
mode:
authorGravatar Siddharth Shukla <siddharth.shukla@uber.com>2017-03-11 19:12:43 +0100
committerGravatar Siddharth Shukla <siddharth.shukla@uber.com>2017-03-12 17:47:53 +0100
commitd194f59939de8e9956e0d040266e3da269879a01 (patch)
treed6518b7baea61d2d00922b9af64c45d86023609b /tools/run_tests/run_stress_tests.py
parent0b7bd20de4f0d219c399ef8c01c05026bf12da5d (diff)
Make testing scripts python3.x compatible
Update run_tests/*.py to use six based isomorphisms and print function from __future__ module.
Diffstat (limited to 'tools/run_tests/run_stress_tests.py')
-rwxr-xr-xtools/run_tests/run_stress_tests.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/run_tests/run_stress_tests.py b/tools/run_tests/run_stress_tests.py
index a94a615b88..3a2661a9aa 100755
--- a/tools/run_tests/run_stress_tests.py
+++ b/tools/run_tests/run_stress_tests.py
@@ -43,6 +43,7 @@ import sys
import tempfile
import time
import uuid
+import six
import python_utils.dockerjob as dockerjob
import python_utils.jobset as jobset
@@ -239,9 +240,8 @@ servers = set(
for s in itertools.chain.from_iterable(_SERVERS if x == 'all' else [x]
for x in args.server))
-languages = set(_LANGUAGES[l]
- for l in itertools.chain.from_iterable(_LANGUAGES.iterkeys(
- ) if x == 'all' else [x] for x in args.language))
+languages = set(_LANGUAGES[l] for l in itertools.chain.from_iterable(
+ six.iterkeys(_LANGUAGES) if x == 'all' else [x] for x in args.language))
docker_images = {}
# languages for which to build docker images
@@ -267,7 +267,7 @@ if build_jobs:
jobset.message('FAILED',
'Failed to build interop docker images.',
do_newline=True)
- for image in docker_images.itervalues():
+ for image in six.itervalues(docker_images):
dockerjob.remove_image(image, skip_nonexistent=True)
sys.exit(1)
@@ -306,7 +306,7 @@ try:
if not jobs:
print('No jobs to run.')
- for image in docker_images.itervalues():
+ for image in six.itervalues(docker_images):
dockerjob.remove_image(image, skip_nonexistent=True)
sys.exit(1)
@@ -324,8 +324,8 @@ finally:
if not job.is_running():
print('Server "%s" has exited prematurely.' % server)
- dockerjob.finish_jobs([j for j in server_jobs.itervalues()])
+ dockerjob.finish_jobs([j for j in six.itervalues(server_jobs)])
- for image in docker_images.itervalues():
+ for image in six.itervalues(docker_images):
print('Removing docker image %s' % image)
dockerjob.remove_image(image)