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 os | 6 import os |
7 import subprocess | 7 import subprocess |
8 import sys | 8 import sys |
9 import unittest | 9 import unittest |
10 | 10 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
47 'sdktools_commands_test', | 47 'sdktools_commands_test', |
48 'sdktools_config_test', | 48 'sdktools_config_test', |
49 'sdktools_test', | 49 'sdktools_test', |
50 'sel_ldr_test', | 50 'sel_ldr_test', |
51 'update_nacl_manifest_test', | 51 'update_nacl_manifest_test', |
52 'verify_filelist_test', | 52 'verify_filelist_test', |
53 'verify_ppapi_test', | 53 'verify_ppapi_test', |
54 ] | 54 ] |
55 | 55 |
56 def ExtractToolchains(): | 56 def ExtractToolchains(): |
57 subprocess.check_output([sys.executable, PKG_VER, | 57 cmd = [sys.executable, PKG_VER, '--verbose', |
58 '--packages', ','.join(EXTRACT_PACKAGES), | 58 '--packages', ','.join(EXTRACT_PACKAGES), |
59 '--tar-dir', TAR_DIR, | 59 '--tar-dir', TAR_DIR, |
60 '--dest-dir', TOOLCHAIN_OUT, | 60 '--dest-dir', TOOLCHAIN_OUT, |
61 'extract']) | 61 'extract'] |
62 print(cmd) | |
binji
2014/11/13 23:57:02
why?
Sam Clegg
2014/11/30 17:55:12
Dropped.
| |
63 subprocess.check_output(cmd) | |
62 | 64 |
63 def main(): | 65 def main(): |
64 # Some of the unit tests use parts of toolchains. Extract to TOOLCHAIN_OUT. | 66 # Some of the unit tests use parts of toolchains. Extract to TOOLCHAIN_OUT. |
65 ExtractToolchains() | 67 ExtractToolchains() |
66 | 68 |
67 suite = unittest.TestSuite() | 69 suite = unittest.TestSuite() |
68 for module_name in TEST_MODULES: | 70 for module_name in TEST_MODULES: |
69 module = __import__(module_name) | 71 module = __import__(module_name) |
70 suite.addTests(unittest.defaultTestLoader.loadTestsFromModule(module)) | 72 suite.addTests(unittest.defaultTestLoader.loadTestsFromModule(module)) |
71 | 73 |
72 result = unittest.TextTestRunner(verbosity=2).run(suite) | 74 result = unittest.TextTestRunner(verbosity=2).run(suite) |
73 return int(not result.wasSuccessful()) | 75 return int(not result.wasSuccessful()) |
74 | 76 |
75 if __name__ == '__main__': | 77 if __name__ == '__main__': |
76 sys.exit(main()) | 78 sys.exit(main()) |
OLD | NEW |