| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2013 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 import glob | 6 import glob |
| 7 import sys | 7 import sys |
| 8 import unittest | 8 import unittest |
| 9 | 9 |
| 10 if __name__ == '__main__': | 10 if __name__ == '__main__': |
| 11 testlist = glob.glob('*_test.py') | 11 suite = unittest.TestSuite() |
| 12 for testname in testlist: | 12 for testname in glob.glob('*_test.py'): |
| 13 unittest.main(verbosity=2, module=testname[:-3]) | 13 print 'Adding Test: ' + testname |
| 14 module = __import__(testname[:-3]) |
| 15 suite.addTests(unittest.defaultTestLoader.loadTestsFromModule(module)) |
| 16 result = unittest.TextTestRunner(verbosity=2).run(suite) |
| 17 if result.wasSuccessful(): |
| 18 sys.exit(0) |
| 19 else: |
| 20 sys.exit(1) |
| OLD | NEW |