diff options
author | 2015-07-27 16:02:52 -0700 | |
---|---|---|
committer | 2015-07-27 16:02:52 -0700 | |
commit | 1b0e3437be035526a397e69ce6ef9397e61b2eb1 (patch) | |
tree | 3c9ee45506f450a046f34e4b514aea33b769ae9f /tools/run_tests/run_interops.py | |
parent | 2aff2b449f22e0eb7995d31a6c137e6a5951d6c6 (diff) |
Adding c++ interop (cloud to prod) to jenkins work flow.
First effort in adding interop to jenkins work flow, more languages will follow.
Diffstat (limited to 'tools/run_tests/run_interops.py')
-rwxr-xr-x | tools/run_tests/run_interops.py | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/tools/run_tests/run_interops.py b/tools/run_tests/run_interops.py new file mode 100755 index 0000000000..1cf268526d --- /dev/null +++ b/tools/run_tests/run_interops.py @@ -0,0 +1,36 @@ +import argparse +import xml.etree.cElementTree as ET +import jobset + +argp = argparse.ArgumentParser(description='Run interop tests.') +argp.add_argument('-l', '--language', + choices=['build_only', 'c++'], + nargs='+', + default=['build_only']) +args = argp.parse_args() + +# build job +build_steps = 'tools/run_tests/run_interops_build.sh' +build_job = jobset.JobSpec(cmdline=build_steps, shortname='build') + +# test jobs +_TESTS = ['large_unary', 'empty_unary', 'ping_pong', 'client_streaming', 'server_streaming'] +jobs = [] +jobNumber = 0 +for lang in args.language: + for test in _TESTS: + test_job = jobset.JobSpec(cmdline=['tools/run_tests/run_interops_test.sh', '%s' % lang, '%s' % test], shortname=test) + jobs.append(test_job) + jobNumber+=1 + +root = ET.Element('testsuites') +testsuite = ET.SubElement(root, 'testsuite', id='1', package='grpc', name='tests') + +# always do the build of docker first, and then all the tests can run in parallel +jobset.run([build_job], maxjobs=1, xml_report=testsuite) +jobset.run(jobs, maxjobs=jobNumber, xml_report=testsuite) + +tree = ET.ElementTree(root) +tree.write('report.xml', encoding='UTF-8') + + |