OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 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 """Runs all the native unit tests. | 6 """Runs all the native unit tests. |
7 | 7 |
8 1. Copy over test binary to /data/local on device. | 8 1. Copy over test binary to /data/local on device. |
9 2. Resources: chrome/unit_tests requires resources (chrome.pak and en-US.pak) | 9 2. Resources: chrome/unit_tests requires resources (chrome.pak and en-US.pak) |
10 to be deployed to the device (in /data/local/tmp). | 10 to be deployed to the device (in /data/local/tmp). |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 additonal filter file which lists the tests only failed in emulator will be | 45 additonal filter file which lists the tests only failed in emulator will be |
46 loaded. We don't care about the rare testcases which succeeded on emuatlor, but | 46 loaded. We don't care about the rare testcases which succeeded on emuatlor, but |
47 failed on device. | 47 failed on device. |
48 """ | 48 """ |
49 | 49 |
50 import logging | 50 import logging |
51 import os | 51 import os |
52 import re | 52 import re |
53 import subprocess | 53 import subprocess |
54 import sys | 54 import sys |
| 55 import time |
55 | 56 |
56 import android_commands | 57 import android_commands |
57 import cmd_helper | 58 import cmd_helper |
58 import debug_info | 59 import debug_info |
59 import emulator | 60 import emulator |
60 import run_tests_helper | 61 import run_tests_helper |
61 from single_test_runner import SingleTestRunner | 62 from single_test_runner import SingleTestRunner |
62 from test_package_executable import TestPackageExecutable | 63 from test_package_executable import TestPackageExecutable |
63 from test_result import BaseTestResult, TestResults | 64 from test_result import BaseTestResult, TestResults |
64 | 65 |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 if len(args) > 1: | 258 if len(args) > 1: |
258 print 'Unknown argument:', args[1:] | 259 print 'Unknown argument:', args[1:] |
259 option_parser.print_usage() | 260 option_parser.print_usage() |
260 sys.exit(1) | 261 sys.exit(1) |
261 run_tests_helper.SetLogLevel(options.verbose_count) | 262 run_tests_helper.SetLogLevel(options.verbose_count) |
262 return Dispatch(options) | 263 return Dispatch(options) |
263 | 264 |
264 | 265 |
265 if __name__ == '__main__': | 266 if __name__ == '__main__': |
266 sys.exit(main(sys.argv)) | 267 sys.exit(main(sys.argv)) |
OLD | NEW |