diff options
author | Jan Tattermusch <jtattermusch@users.noreply.github.com> | 2018-06-11 11:36:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-11 11:36:21 +0200 |
commit | b2f56a0018c08459af23578e193c99af801a5b6b (patch) | |
tree | 37bc84af1020cb9af29ec0346a63eeee1a1ce9aa /tools/interop_matrix/run_interop_matrix_tests.py | |
parent | 8f9445ca9fdb00fec9c76b7d5ed5eafddedc7c7b (diff) |
Revert "run_interop_matrix.py speedup"
Diffstat (limited to 'tools/interop_matrix/run_interop_matrix_tests.py')
-rwxr-xr-x | tools/interop_matrix/run_interop_matrix_tests.py | 35 |
1 files changed, 4 insertions, 31 deletions
diff --git a/tools/interop_matrix/run_interop_matrix_tests.py b/tools/interop_matrix/run_interop_matrix_tests.py index f887bd0fdd..9d442346a7 100755 --- a/tools/interop_matrix/run_interop_matrix_tests.py +++ b/tools/interop_matrix/run_interop_matrix_tests.py @@ -46,7 +46,6 @@ _RELEASES = sorted( for lang in client_matrix.LANG_RELEASE_MATRIX.values() for info in lang))) _TEST_TIMEOUT = 60 -_PULL_IMAGE_TIMEOUT_SECONDS = 10 * 60 argp = argparse.ArgumentParser(description='Run interop tests.') argp.add_argument('-j', '--jobs', default=multiprocessing.cpu_count(), type=int) @@ -210,43 +209,17 @@ def find_test_cases(lang, runtime, release, suite_name): _xml_report_tree = report_utils.new_junit_xml_tree() -def pull_images_for_lang(lang, images): - """Pull all images for given lang from container registry.""" - jobset.message( - 'START', 'Downloading images for language "%s"' % lang, do_newline=True) - download_specs = [] - for release, image in images: - spec = jobset.JobSpec( - cmdline=['gcloud docker -- pull %s' % image], - shortname='pull_image_%s' % (image), - timeout_seconds=_PULL_IMAGE_TIMEOUT_SECONDS, - shell=True) - download_specs.append(spec) - num_failures, resultset = jobset.run( - download_specs, newline_on_success=True, maxjobs=args.jobs) - if num_failures: - jobset.message( - 'FAILED', 'Failed to download some images', do_newline=True) - return False - else: - jobset.message( - 'SUCCESS', 'All images downloaded successfully.', do_newline=True) - return True - - def run_tests_for_lang(lang, runtime, images): """Find and run all test cases for a language. images is a list of (<release-tag>, <image-full-path>) tuple. """ - # Fine to ignore return value as failure to download will result in test failure - # later anyway. - pull_images_for_lang(lang, images) - total_num_failures = 0 - for release, image in images: + for image_tuple in images: + release, image = image_tuple jobset.message('START', 'Testing %s' % image, do_newline=True) - + # Download the docker image before running each test case. + subprocess.check_call(['gcloud', 'docker', '--', 'pull', image]) suite_name = '%s__%s_%s' % (lang, runtime, release) job_spec_list = find_test_cases(lang, runtime, release, suite_name) |