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

Side by Side Diff: tools/auto_bisect/run_tests

Issue 548233002: Add a module to fetch builds from different types of builders. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 6 years, 2 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
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 The Chromium Authors. All rights reserved. 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 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Runs all tests in all unit test modules in this directory.""" 6 """Runs all tests in all unit test modules in this directory."""
7 7
8 import os 8 import os
9 import sys 9 import sys
10 import unittest 10 import unittest
11 11
12 12
13 sys.path.append(os.path.join(os.path.dirname(__file__), os.path.pardir,
14 'telemetry'))
15 sys.path.append(os.path.join(os.path.dirname(__file__), os.path.pardir,
16 os.path.pardir, 'third_party', 'pymock'))
17
18 print sys.path
ojan 2014/09/29 23:53:42 Did you mean to leave this in?
qyearsley 2014/09/30 00:19:10 Nope! Thanks for catching this. I was just thinkin
19
13 def main(): 20 def main():
14 suite = unittest.TestSuite() 21 suite = unittest.TestSuite()
15 loader = unittest.TestLoader() 22 loader = unittest.TestLoader()
16 23
17 # Add all tests in the directory. 24 # Add all tests in the directory.
18 script_dir = os.path.dirname(__file__) 25 script_dir = os.path.dirname(__file__)
19 suite.addTests(loader.discover(start_dir=script_dir, pattern='*_test.py')) 26 suite.addTests(loader.discover(start_dir=script_dir, pattern='*_test.py'))
20 27
21 print 'Running unit tests in %s...' % os.path.abspath(script_dir) 28 print 'Running unit tests in %s...' % os.path.abspath(script_dir)
22 result = unittest.TextTestRunner(verbosity=1).run(suite) 29 result = unittest.TextTestRunner(verbosity=1).run(suite)
23 return 0 if result.wasSuccessful() else 1 30 return 0 if result.wasSuccessful() else 1
24 31
25 32
26 if __name__ == '__main__': 33 if __name__ == '__main__':
27 sys.exit(main()) 34 sys.exit(main())
OLDNEW
« tools/auto_bisect/fetch_build.py ('K') | « tools/auto_bisect/fetch_build_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698