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

Side by Side Diff: list_test_cases.py

Issue 19917006: Move all googletest related scripts into googletest/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/swarm_client
Patch Set: Remove unnecessary pylint warning disable Created 7 years, 5 months 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
« no previous file with comments | « isolate_test_cases.py ('k') | run_test_cases.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 # Copyright (c) 2012 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 """List all the test cases for a google test.
7
8 See more info at http://code.google.com/p/googletest/.
9 """
10
11 import os
12 import sys
13
14 import run_test_cases
15
16
17 def main():
18 """CLI frontend to validate arguments."""
19 run_test_cases.run_isolated.disable_buffering()
20 parser = run_test_cases.OptionParserWithTestShardingAndFiltering(
21 usage='%prog <options> [gtest]')
22 options, args = parser.parse_args()
23 if not args:
24 parser.error('Please provide the executable to run')
25
26 cmd = run_test_cases.fix_python_path(args)
27 try:
28 tests = run_test_cases.list_test_cases(
29 cmd,
30 os.getcwd(),
31 index=options.index,
32 shards=options.shards,
33 disabled=options.disabled,
34 fails=options.fails,
35 flaky=options.flaky,
36 pre=False,
37 manual=options.manual,
38 seed=0)
39 for test in tests:
40 print test
41 except run_test_cases.Failure, e:
42 print e.args[0]
43 return e.args[1]
44 return 0
45
46
47 if __name__ == '__main__':
48 sys.exit(main())
OLDNEW
« no previous file with comments | « isolate_test_cases.py ('k') | run_test_cases.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698