OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 # 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 | 4 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 5 # found in the LICENSE file. |
5 | 6 |
6 """Runs all the native unit tests. | 7 """Runs all the native unit tests. |
7 | 8 |
8 1. Copy over test binary to /data/local on device. | 9 1. Copy over test binary to /data/local on device. |
9 2. Resources: chrome/unit_tests requires resources (chrome.pak and en-US.pak) | 10 2. Resources: chrome/unit_tests requires resources (chrome.pak and en-US.pak) |
10 to be deployed to the device (in /data/local/tmp). | 11 to be deployed to the device (in /data/local/tmp). |
11 3. Environment: | 12 3. Environment: |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 | 50 |
50 import fnmatch | 51 import fnmatch |
51 import logging | 52 import logging |
52 import multiprocessing | 53 import multiprocessing |
53 import os | 54 import os |
54 import re | 55 import re |
55 import subprocess | 56 import subprocess |
56 import sys | 57 import sys |
57 import time | 58 import time |
58 | 59 |
59 import android_commands | 60 from pylib import android_commands |
60 from base_test_sharder import BaseTestSharder | 61 from pylib.base_test_sharder import BaseTestSharder |
61 import cmd_helper | 62 from pylib import cmd_helper |
62 import debug_info | 63 from pylib import debug_info |
63 import emulator | 64 import emulator |
64 import run_tests_helper | 65 from pylib import run_tests_helper |
65 from single_test_runner import SingleTestRunner | 66 from pylib.single_test_runner import SingleTestRunner |
66 from test_package_executable import TestPackageExecutable | 67 from pylib.test_package_executable import TestPackageExecutable |
67 from test_result import BaseTestResult, TestResults | 68 from pylib.test_result import BaseTestResult, TestResults |
68 | 69 |
69 _TEST_SUITES = ['base_unittests', | 70 _TEST_SUITES = ['base_unittests', |
70 'content_unittests', | 71 'content_unittests', |
71 'gpu_unittests', | 72 'gpu_unittests', |
72 'ipc_tests', | 73 'ipc_tests', |
73 'net_unittests', | 74 'net_unittests', |
74 'sql_unittests', | 75 'sql_unittests', |
75 'sync_unit_tests', | 76 'sync_unit_tests', |
76 'ui_unittests', | 77 'ui_unittests', |
77 ] | 78 ] |
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
471 # from all suites, but the buildbot associates the exit status only with the | 472 # from all suites, but the buildbot associates the exit status only with the |
472 # most recent step). | 473 # most recent step). |
473 if options.annotate: | 474 if options.annotate: |
474 return 0 | 475 return 0 |
475 else: | 476 else: |
476 return failed_tests_count | 477 return failed_tests_count |
477 | 478 |
478 | 479 |
479 if __name__ == '__main__': | 480 if __name__ == '__main__': |
480 sys.exit(main(sys.argv)) | 481 sys.exit(main(sys.argv)) |
OLD | NEW |