| 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 """Top level script for running all python unittests in the NaCl SDK. | 6 """Top level script for running all python unittests in the NaCl SDK. |
| 7 """ | 7 """ |
| 8 | 8 |
| 9 from __future__ import print_function | 9 from __future__ import print_function |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 sys.path.append(BUILD_TOOLS_DIR) | 25 sys.path.append(BUILD_TOOLS_DIR) |
| 26 sys.path.append(os.path.join(BUILD_TOOLS_DIR, 'tests')) | 26 sys.path.append(os.path.join(BUILD_TOOLS_DIR, 'tests')) |
| 27 | 27 |
| 28 import build_paths | 28 import build_paths |
| 29 | 29 |
| 30 PKG_VER_DIR = os.path.join(build_paths.NACL_DIR, 'build', 'package_version') | 30 PKG_VER_DIR = os.path.join(build_paths.NACL_DIR, 'build', 'package_version') |
| 31 TAR_DIR = os.path.join(build_paths.NACL_DIR, 'toolchain', '.tars') | 31 TAR_DIR = os.path.join(build_paths.NACL_DIR, 'toolchain', '.tars') |
| 32 | 32 |
| 33 PKG_VER = os.path.join(PKG_VER_DIR, 'package_version.py') | 33 PKG_VER = os.path.join(PKG_VER_DIR, 'package_version.py') |
| 34 | 34 |
| 35 EXTRACT_PACKAGES = ['nacl_x86_glibc'] | 35 EXTRACT_PACKAGES = ['nacl_x86_glibc', 'nacl_arm_glibc'] |
| 36 TOOLCHAIN_OUT = os.path.join(build_paths.OUT_DIR, 'sdk_tests', 'toolchain') | 36 TOOLCHAIN_OUT = os.path.join(build_paths.OUT_DIR, 'sdk_tests', 'toolchain') |
| 37 | 37 |
| 38 # List of modules containing unittests. The goal is to keep the total | 38 # List of modules containing unittests. The goal is to keep the total |
| 39 # runtime of these tests under 2 seconds. Any slower tests should go | 39 # runtime of these tests under 2 seconds. Any slower tests should go |
| 40 # in TEST_MODULES_BIG. | 40 # in TEST_MODULES_BIG. |
| 41 TEST_MODULES = [ | 41 TEST_MODULES = [ |
| 42 'build_artifacts_test', | 42 'build_artifacts_test', |
| 43 'build_version_test', | 43 'build_version_test', |
| 44 'create_html_test', | 44 'create_html_test', |
| 45 'create_nmf_test', | 45 'create_nmf_test', |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 else: | 103 else: |
| 104 verbosity = 1 | 104 verbosity = 1 |
| 105 | 105 |
| 106 print('Running unittests...') | 106 print('Running unittests...') |
| 107 result = unittest.TextTestRunner(verbosity=verbosity).run(suite) | 107 result = unittest.TextTestRunner(verbosity=verbosity).run(suite) |
| 108 return int(not result.wasSuccessful()) | 108 return int(not result.wasSuccessful()) |
| 109 | 109 |
| 110 | 110 |
| 111 if __name__ == '__main__': | 111 if __name__ == '__main__': |
| 112 sys.exit(main(sys.argv[1:])) | 112 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |