| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 Args: | 46 Args: |
| 47 options: options from parsed parser. | 47 options: options from parsed parser. |
| 48 Returns: | 48 Returns: |
| 49 Dictionary of Update Identifiers->Relative cache locations. | 49 Dictionary of Update Identifiers->Relative cache locations. |
| 50 Raises: | 50 Raises: |
| 51 update_exception.UpdateException if we fail to generate an update. | 51 update_exception.UpdateException if we fail to generate an update. |
| 52 """ | 52 """ |
| 53 def _GenerateVMUpdate(target, src, private_key_path): | 53 def _GenerateVMUpdate(target, src, private_key_path): |
| 54 """Generates an update using the devserver.""" | 54 """Generates an update using the devserver.""" |
| 55 command = ['./enter_chroot.sh', | 55 command = ['./enter_chroot.sh', |
| 56 '--nogit_config', | |
| 57 '--', | 56 '--', |
| 58 'sudo', | 57 'sudo', |
| 59 'start_devserver', | 58 'start_devserver', |
| 60 '--pregenerate_update', | 59 '--pregenerate_update', |
| 61 '--exit', | 60 '--exit', |
| 62 ] | 61 ] |
| 63 # Add actual args to command. | 62 # Add actual args to command. |
| 64 command.append('--image=%s' % cros_lib.ReinterpretPathForChroot(target)) | 63 command.append('--image=%s' % cros_lib.ReinterpretPathForChroot(target)) |
| 65 if src: command.append('--src_image=%s' % | 64 if src: command.append('--src_image=%s' % |
| 66 cros_lib.ReinterpretPathForChroot(src)) | 65 cros_lib.ReinterpretPathForChroot(src)) |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 # Can't run in parallel with only one remote device. | 290 # Can't run in parallel with only one remote device. |
| 292 test_suite = _PrepareTestSuite(options) | 291 test_suite = _PrepareTestSuite(options) |
| 293 test_result = unittest.TextTestRunner(verbosity=2).run(test_suite) | 292 test_result = unittest.TextTestRunner(verbosity=2).run(test_suite) |
| 294 if not test_result.wasSuccessful(): cros_lib.Die('Test harness failed.') | 293 if not test_result.wasSuccessful(): cros_lib.Die('Test harness failed.') |
| 295 finally: | 294 finally: |
| 296 my_server.Stop() | 295 my_server.Stop() |
| 297 | 296 |
| 298 | 297 |
| 299 if __name__ == '__main__': | 298 if __name__ == '__main__': |
| 300 main() | 299 main() |
| OLD | NEW |