OLD | NEW |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 sys | 6 import sys |
7 import unittest | 7 import unittest |
8 | 8 |
9 TEST_MODULES = [ | 9 TEST_MODULES = [ |
10 'test_auto_update_sdktools', | 10 'test_auto_update_sdktools', |
11 'test_update_manifest' | |
12 ] | 11 ] |
binji
2012/09/08 17:45:13
actually, that test is OK. It's called test_update
Sam Clegg
2012/09/10 17:19:17
done
| |
13 | 12 |
14 def main(): | 13 def main(): |
15 suite = unittest.TestSuite() | 14 suite = unittest.TestSuite() |
16 for module_name in TEST_MODULES: | 15 for module_name in TEST_MODULES: |
17 __import__(module_name) | 16 __import__(module_name) |
18 module = sys.modules[module_name] | 17 module = sys.modules[module_name] |
19 suite.addTests(unittest.defaultTestLoader.loadTestsFromModule(module)) | 18 suite.addTests(unittest.defaultTestLoader.loadTestsFromModule(module)) |
20 | 19 |
21 result = unittest.TextTestRunner(verbosity=2).run(suite) | 20 result = unittest.TextTestRunner(verbosity=2).run(suite) |
22 return int(not result.wasSuccessful()) | 21 return int(not result.wasSuccessful()) |
23 | 22 |
24 if __name__ == '__main__': | 23 if __name__ == '__main__': |
25 sys.exit(main()) | 24 sys.exit(main()) |
OLD | NEW |