| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 | 2 |
| 3 # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. |
| 4 # 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 |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 """This module runs a suite of Auto Update tests. | 7 """This module runs a suite of Auto Update tests. |
| 8 | 8 |
| 9 The tests can be run on either a virtual machine or actual device depending | 9 The tests can be run on either a virtual machine or actual device depending |
| 10 on parameters given. Specific tests can be run by invoking --test_prefix. | 10 on parameters given. Specific tests can be run by invoking --test_prefix. |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 parser.add_option('--public_key', default=None, | 230 parser.add_option('--public_key', default=None, |
| 231 help='Public key to use on images and updates.') | 231 help='Public key to use on images and updates.') |
| 232 parser.add_option('--private_key', default=None, | 232 parser.add_option('--private_key', default=None, |
| 233 help='Private key to use on images and updates.') | 233 help='Private key to use on images and updates.') |
| 234 parser.add_option('-q', '--quick_test', default=False, action='store_true', | 234 parser.add_option('-q', '--quick_test', default=False, action='store_true', |
| 235 help='Use a basic test to verify image.') | 235 help='Use a basic test to verify image.') |
| 236 parser.add_option('-m', '--remote', | 236 parser.add_option('-m', '--remote', |
| 237 help='Remote address for real test.') | 237 help='Remote address for real test.') |
| 238 parser.add_option('-t', '--target_image', | 238 parser.add_option('-t', '--target_image', |
| 239 help='path to the target image.') | 239 help='path to the target image.') |
| 240 parser.add_option('--test_results_root', default=None, |
| 241 help='Root directory to store test results. Should ' |
| 242 'be defined relative to chroot root.') |
| 240 parser.add_option('--test_prefix', default='test', | 243 parser.add_option('--test_prefix', default='test', |
| 241 help='Only runs tests with specific prefix i.e. ' | 244 help='Only runs tests with specific prefix i.e. ' |
| 242 'testFullUpdateWipeStateful.') | 245 'testFullUpdateWipeStateful.') |
| 243 parser.add_option('-p', '--type', default='vm', | 246 parser.add_option('-p', '--type', default='vm', |
| 244 help='type of test to run: [vm, real]. Default: vm.') | 247 help='type of test to run: [vm, real]. Default: vm.') |
| 245 parser.add_option('--verbose', default=True, action='store_true', | 248 parser.add_option('--verbose', default=True, action='store_true', |
| 246 help='Print out rather than capture output as much as ' | 249 help='Print out rather than capture output as much as ' |
| 247 'possible.') | 250 'possible.') |
| 248 (options, leftover_args) = parser.parse_args() | 251 (options, leftover_args) = parser.parse_args() |
| 249 | 252 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 # Can't run in parallel with only one remote device. | 290 # Can't run in parallel with only one remote device. |
| 288 test_suite = _PrepareTestSuite(options) | 291 test_suite = _PrepareTestSuite(options) |
| 289 test_result = unittest.TextTestRunner(verbosity=2).run(test_suite) | 292 test_result = unittest.TextTestRunner(verbosity=2).run(test_suite) |
| 290 if not test_result.wasSuccessful(): cros_lib.Die('Test harness failed.') | 293 if not test_result.wasSuccessful(): cros_lib.Die('Test harness failed.') |
| 291 finally: | 294 finally: |
| 292 my_server.Stop() | 295 my_server.Stop() |
| 293 | 296 |
| 294 | 297 |
| 295 if __name__ == '__main__': | 298 if __name__ == '__main__': |
| 296 main() | 299 main() |
| OLD | NEW |