| 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 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 def ProcessOptions(cls, parser, options): | 475 def ProcessOptions(cls, parser, options): |
| 476 """Processes non-vm-specific options.""" | 476 """Processes non-vm-specific options.""" |
| 477 AUTest.ProcessOptions(parser, options) | 477 AUTest.ProcessOptions(parser, options) |
| 478 cls.remote = options.remote | 478 cls.remote = options.remote |
| 479 | 479 |
| 480 if not cls.remote: | 480 if not cls.remote: |
| 481 parser.error('We require a remote address for real tests.') | 481 parser.error('We require a remote address for real tests.') |
| 482 | 482 |
| 483 def PrepareBase(self, image_path): | 483 def PrepareBase(self, image_path): |
| 484 """Auto-update to base image to prepare for test.""" | 484 """Auto-update to base image to prepare for test.""" |
| 485 _PrepareRealBase(image_path) | 485 self._PrepareRealBase(image_path) |
| 486 | 486 |
| 487 def _UpdateImage(self, image_path, src_image_path='', stateful_change='old', | 487 def _UpdateImage(self, image_path, src_image_path='', stateful_change='old', |
| 488 proxy_port=None, private_key_path=None): | 488 proxy_port=None, private_key_path=None): |
| 489 """Updates a remote image using image_to_live.sh.""" | 489 """Updates a remote image using image_to_live.sh.""" |
| 490 stateful_change_flag = self.GetStatefulChangeFlag(stateful_change) | 490 stateful_change_flag = self.GetStatefulChangeFlag(stateful_change) |
| 491 cmd = ['%s/image_to_live.sh' % self.crosutils, | 491 cmd = ['%s/image_to_live.sh' % self.crosutils, |
| 492 '--remote=%s' % self.remote, | 492 '--remote=%s' % self.remote, |
| 493 stateful_change_flag, | 493 stateful_change_flag, |
| 494 '--verify', | 494 '--verify', |
| 495 ] | 495 ] |
| (...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1070 # Can't run in parallel with only one remote device. | 1070 # Can't run in parallel with only one remote device. |
| 1071 test_suite = _PrepareTestSuite(parser, options, test_class) | 1071 test_suite = _PrepareTestSuite(parser, options, test_class) |
| 1072 test_result = unittest.TextTestRunner(verbosity=2).run(test_suite) | 1072 test_result = unittest.TextTestRunner(verbosity=2).run(test_suite) |
| 1073 if not test_result.wasSuccessful(): Die('Test harness failed.') | 1073 if not test_result.wasSuccessful(): Die('Test harness failed.') |
| 1074 finally: | 1074 finally: |
| 1075 my_server.Stop() | 1075 my_server.Stop() |
| 1076 | 1076 |
| 1077 | 1077 |
| 1078 if __name__ == '__main__': | 1078 if __name__ == '__main__': |
| 1079 main() | 1079 main() |
| OLD | NEW |