| 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 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 508 '--verify', | 508 '--verify', |
| 509 ] | 509 ] |
| 510 if proxy_port: cmd.append('--proxy_port=%s' % proxy_port) | 510 if proxy_port: cmd.append('--proxy_port=%s' % proxy_port) |
| 511 self.RunUpdateCmd(cmd) | 511 self.RunUpdateCmd(cmd) |
| 512 | 512 |
| 513 def VerifyImage(self, percent_required_to_pass): | 513 def VerifyImage(self, percent_required_to_pass): |
| 514 """Verifies an image using run_remote_tests.sh with verification suite.""" | 514 """Verifies an image using run_remote_tests.sh with verification suite.""" |
| 515 output = RunCommand([ | 515 output = RunCommand([ |
| 516 '%s/run_remote_tests.sh' % self.crosutils, | 516 '%s/run_remote_tests.sh' % self.crosutils, |
| 517 '--remote=%s' % self.remote, | 517 '--remote=%s' % self.remote, |
| 518 '--hide_info', |
| 518 self.verify_suite, | 519 self.verify_suite, |
| 519 ], error_ok=True, enter_chroot=False, redirect_stdout=True) | 520 ], error_ok=True, enter_chroot=False, redirect_stdout=True) |
| 520 return self.AssertEnoughTestsPassed(self, output, percent_required_to_pass) | 521 return self.AssertEnoughTestsPassed(self, output, percent_required_to_pass) |
| 521 | 522 |
| 522 | 523 |
| 523 class VirtualAUTest(unittest.TestCase, AUTest): | 524 class VirtualAUTest(unittest.TestCase, AUTest): |
| 524 """Test harness for updating virtual machines.""" | 525 """Test harness for updating virtual machines.""" |
| 525 | 526 |
| 526 # Class variables used to acquire individual VM variables per test. | 527 # Class variables used to acquire individual VM variables per test. |
| 527 _vm_lock = threading.Lock() | 528 _vm_lock = threading.Lock() |
| (...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1068 # Can't run in parallel with only one remote device. | 1069 # Can't run in parallel with only one remote device. |
| 1069 test_suite = _PrepareTestSuite(parser, options, test_class) | 1070 test_suite = _PrepareTestSuite(parser, options, test_class) |
| 1070 test_result = unittest.TextTestRunner(verbosity=2).run(test_suite) | 1071 test_result = unittest.TextTestRunner(verbosity=2).run(test_suite) |
| 1071 if not test_result.wasSuccessful(): Die('Test harness failed.') | 1072 if not test_result.wasSuccessful(): Die('Test harness failed.') |
| 1072 finally: | 1073 finally: |
| 1073 my_server.Stop() | 1074 my_server.Stop() |
| 1074 | 1075 |
| 1075 | 1076 |
| 1076 if __name__ == '__main__': | 1077 if __name__ == '__main__': |
| 1077 main() | 1078 main() |
| OLD | NEW |