Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(572)

Side by Side Diff: swarm_client/googletest/shard_test_cases.py

Issue 69143004: Delete swarm_client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 # Copyright 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 """Runs a google-test shard.
7
8 This makes a simple interface to run a shard on the command line independent of
9 the interpreter, e.g. cmd.exe vs bash.
10 """
11
12 import optparse
13 import os
14 import subprocess
15 import sys
16
17 ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
18 if not ROOT_DIR in sys.path:
19 sys.path.insert(0, ROOT_DIR)
20
21 from utils import tools
22
23
24 def main():
25 tools.disable_buffering()
26 parser = optparse.OptionParser(usage='%prog <options> [gtest]')
27 parser.disable_interspersed_args()
28 parser.add_option(
29 '-I', '--index',
30 type='int',
31 default=os.environ.get('GTEST_SHARD_INDEX'),
32 help='Shard index to run')
33 parser.add_option(
34 '-S', '--shards',
35 type='int',
36 default=os.environ.get('GTEST_TOTAL_SHARDS'),
37 help='Total number of shards to calculate from the --index to run')
38 options, args = parser.parse_args()
39 env = os.environ.copy()
40 env['GTEST_TOTAL_SHARDS'] = str(options.shards)
41 env['GTEST_SHARD_INDEX'] = str(options.index)
42 return subprocess.call(tools.fix_python_path(args), env=env)
43
44
45 if __name__ == '__main__':
46 sys.exit(main())
OLDNEW
« no previous file with comments | « swarm_client/googletest/run_test_cases.py ('k') | swarm_client/googletest/tests/fix_test_cases_smoke_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698