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

Side by Side Diff: mojo/tools/run_mojo_python_tests.py

Issue 241713003: Add run_mojo_python_tests.py so that we can run the python tests on the bots. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch for review Created 6 years, 8 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
« mojo/tools/mojob.sh ('K') | « mojo/tools/mojob.sh ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/bin/python
2 # Copyright 2014 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 import optparse
7 import os
8 import sys
9 import unittest
10
11
12 # TODO(dpranke): crbug.com/364709 . We should add the ability to return
13 # JSONified results data for the bots.
14
15
16 def main():
17 parser = optparse.OptionParser()
18 parser.add_option('-v', '--verbose', action='count', default=0)
19 options, args = parser.parse_args()
20 if args:
21 parser.usage()
22 return 1
23
24 chromium_src_dir = os.path.join(os.path.dirname(__file__),
25 os.pardir,
26 os.pardir)
27
28 loader = unittest.loader.TestLoader()
29 print "Running Python unit tests under mojo/public/tools/bindings/pylib ..."
30 suite = loader.discover(os.path.join(chromium_src_dir, 'mojo', 'public',
31 'tools', 'bindings', 'pylib'),
32 pattern='*_unittest.py')
33
34 runner = unittest.runner.TextTestRunner(verbosity=(options.verbose+1))
35 result = runner.run(suite)
36 return 0 if result.wasSuccessful() else 1
37
38
39 if __name__ == '__main__':
40 sys.exit(main())
OLDNEW
« mojo/tools/mojob.sh ('K') | « mojo/tools/mojob.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698