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.
12 # TODO(dpranke): crbug.com/364709 . We should add the ability to return
13 # JSONified results data for the bots.
17 parser
= optparse
.OptionParser()
18 parser
.add_option('-v', '--verbose', action
='count', default
=0)
19 options
, args
= parser
.parse_args()
24 chromium_src_dir
= os
.path
.join(os
.path
.dirname(__file__
),
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')
34 runner
= unittest
.runner
.TextTestRunner(verbosity
=(options
.verbose
+1))
35 result
= runner
.run(suite
)
36 return 0 if result
.wasSuccessful() else 1
39 if __name__
== '__main__':