| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 56 |
| 57 import android_commands | 57 import android_commands |
| 58 import cmd_helper | 58 import cmd_helper |
| 59 import debug_info | 59 import debug_info |
| 60 import emulator | 60 import emulator |
| 61 import run_tests_helper | 61 import run_tests_helper |
| 62 from single_test_runner import SingleTestRunner | 62 from single_test_runner import SingleTestRunner |
| 63 from test_package_executable import TestPackageExecutable | 63 from test_package_executable import TestPackageExecutable |
| 64 from test_result import BaseTestResult, TestResults | 64 from test_result import BaseTestResult, TestResults |
| 65 | 65 |
| 66 _TEST_SUITES = ['base_unittests', 'sql_unittests', 'ipc_tests'] | 66 _TEST_SUITES = ['base_unittests', 'sql_unittests', 'ipc_tests', 'net_unittests'] |
| 67 | |
| 68 | 67 |
| 69 class Xvfb(object): | 68 class Xvfb(object): |
| 70 """Class to start and stop Xvfb if relevant. Nop if not Linux.""" | 69 """Class to start and stop Xvfb if relevant. Nop if not Linux.""" |
| 71 | 70 |
| 72 def __init__(self): | 71 def __init__(self): |
| 73 self._pid = 0 | 72 self._pid = 0 |
| 74 | 73 |
| 75 def _IsLinux(self): | 74 def _IsLinux(self): |
| 76 """Return True if on Linux; else False.""" | 75 """Return True if on Linux; else False.""" |
| 77 return sys.platform.startswith('linux') | 76 return sys.platform.startswith('linux') |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 if len(args) > 1: | 258 if len(args) > 1: |
| 260 print 'Unknown argument:', args[1:] | 259 print 'Unknown argument:', args[1:] |
| 261 option_parser.print_usage() | 260 option_parser.print_usage() |
| 262 sys.exit(1) | 261 sys.exit(1) |
| 263 run_tests_helper.SetLogLevel(options.verbose_count) | 262 run_tests_helper.SetLogLevel(options.verbose_count) |
| 264 return Dispatch(options) | 263 return Dispatch(options) |
| 265 | 264 |
| 266 | 265 |
| 267 if __name__ == '__main__': | 266 if __name__ == '__main__': |
| 268 sys.exit(main(sys.argv)) | 267 sys.exit(main(sys.argv)) |
| OLD | NEW |