diff options
author | yongni <yongni@google.com> | 2017-04-28 14:10:14 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-28 14:10:14 -0700 |
commit | 365c52b47e8d322dfc0bdf15ddea2b598f3b4dbb (patch) | |
tree | a3767dcbe8de7524c4f74c4961a09e03fd7566b0 /tools | |
parent | 7c6b4beb88e8f4f494bd102a1c816e5ec11ad125 (diff) | |
parent | 35ee7e7967d390c269ae82367a3667b10bfa8d9b (diff) |
Merge pull request #10873 from yongni/master
Added verbose option to run_interop_test to ease tracing the commands…
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/run_tests/python_utils/jobset.py | 5 | ||||
-rwxr-xr-x | tools/run_tests/run_interop_tests.py | 10 |
2 files changed, 15 insertions, 0 deletions
diff --git a/tools/run_tests/python_utils/jobset.py b/tools/run_tests/python_utils/jobset.py index 460f359cf3..d01e82a76b 100755 --- a/tools/run_tests/python_utils/jobset.py +++ b/tools/run_tests/python_utils/jobset.py @@ -208,6 +208,11 @@ class JobSpec(object): def __repr__(self): return 'JobSpec(shortname=%s, cmdline=%s)' % (self.shortname, self.cmdline) + def __str__(self): + return '%s: %s %s' % (self.shortname, + ' '.join('%s=%s' % kv for kv in self.environ.items()), + ' '.join(self.cmdline)) + class JobResult(object): def __init__(self): diff --git a/tools/run_tests/run_interop_tests.py b/tools/run_tests/run_interop_tests.py index 44e93eb9cc..867d9e6f7b 100755 --- a/tools/run_tests/run_interop_tests.py +++ b/tools/run_tests/run_interop_tests.py @@ -888,6 +888,10 @@ argp.add_argument('-t', '--travis', default=False, action='store_const', const=True) +argp.add_argument('-v', '--verbose', + default=False, + action='store_const', + const=True) argp.add_argument('--use_docker', default=False, action='store_const', @@ -989,6 +993,9 @@ if args.use_docker: if build_jobs: jobset.message('START', 'Building interop docker images.', do_newline=True) + if args.verbose: + print('Jobs to run: \n%s\n' % '\n'.join(str(j) for j in build_jobs)) + num_failures, _ = jobset.run( build_jobs, newline_on_success=True, maxjobs=args.jobs) if num_failures == 0: @@ -1164,6 +1171,9 @@ try: if args.manual_run: print('All tests will skipped --manual_run option is active.') + if args.verbose: + print('Jobs to run: \n%s\n' % '\n'.join(str(job) for job in jobs)) + num_failures, resultset = jobset.run(jobs, newline_on_success=True, maxjobs=args.jobs, skip_jobs=args.manual_run) |