aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/interop_matrix
diff options
context:
space:
mode:
authorGravatar Adele Zhou <adelez@google.com>2017-10-11 16:51:06 -0700
committerGravatar Adele Zhou <adelez@google.com>2017-10-11 16:51:06 -0700
commit091c3ebba8b8c85318f88efba319e357149bb8b1 (patch)
treed82649158c44fe9ccdfb6e5d38c44971d30acd04 /tools/interop_matrix
parent1dcc10359c0ff6d3e813766217e5b41989ad01fa (diff)
Add suite name, client lang, server name to shortname for displaying on Sponge and being able to use upload_interop_results_to_bq func
Diffstat (limited to 'tools/interop_matrix')
-rwxr-xr-xtools/interop_matrix/run_interop_matrix_tests.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/tools/interop_matrix/run_interop_matrix_tests.py b/tools/interop_matrix/run_interop_matrix_tests.py
index cd963d0e2d..d037e13921 100755
--- a/tools/interop_matrix/run_interop_matrix_tests.py
+++ b/tools/interop_matrix/run_interop_matrix_tests.py
@@ -123,7 +123,7 @@ def find_all_images_for_lang(lang):
# caches test cases (list of JobSpec) loaded from file. Keyed by lang and runtime.
_loaded_testcases = {}
-def find_test_cases(lang, release):
+def find_test_cases(lang, release, suite_name):
"""Returns the list of test cases from testcase files per lang/release."""
file_tmpl = os.path.join(os.path.dirname(__file__), 'testcases/%s__%s')
if not os.path.exists(file_tmpl % (lang, release)):
@@ -140,8 +140,12 @@ def find_test_cases(lang, release):
if line.startswith('docker run'):
m = re.search('--test_case=(.*)"', line)
shortname = m.group(1) if m else 'unknown_test'
+ m = re.search('--server_host_override=(.*).sandbox.googleapis.com',
+ line)
+ server = m.group(1) if m else 'unknown_server'
spec = jobset.JobSpec(cmdline=line,
- shortname=shortname,
+ shortname='%s:%s:%s:%s' % (suite_name, lang,
+ server, shortname),
timeout_seconds=_TEST_TIMEOUT,
shell=True,
flake_retries=5 if args.allow_flakes else 0)
@@ -169,7 +173,8 @@ def run_tests_for_lang(lang, runtime, images):
# Download the docker image before running each test case.
subprocess.check_call(['gcloud', 'docker', '--', 'pull', image])
_docker_images_cleanup.append(image)
- job_spec_list = find_test_cases(lang,release)
+ suite_name = '%s__%s_%s' % (lang, runtime, release)
+ job_spec_list = find_test_cases(lang, release, suite_name)
num_failures, resultset = jobset.run(job_spec_list,
newline_on_success=True,
add_env={'docker_image':image},
@@ -187,7 +192,7 @@ def run_tests_for_lang(lang, runtime, images):
_xml_report_tree,
resultset,
'grpc_interop_matrix',
- '%s__%s %s'%(lang,runtime,release),
+ suite_name,
str(uuid.uuid4()))
return total_num_failures