| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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 import glob | 6 import glob |
| 7 import logging | 7 import logging |
| 8 import os | 8 import os |
| 9 import time | 9 import time |
| 10 | 10 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 # Type 'yes' and enter password | 91 # Type 'yes' and enter password |
| 92 self.SendKeysToHterm('yes\\n', tab_index=1) | 92 self.SendKeysToHterm('yes\\n', tab_index=1) |
| 93 self.WaitForHtermText('Password:', tab_index=1, | 93 self.WaitForHtermText('Password:', tab_index=1, |
| 94 msg='Did not get password prompt') | 94 msg='Did not get password prompt') |
| 95 self.SendKeysToHterm('test0000\\n', tab_index=1) | 95 self.SendKeysToHterm('test0000\\n', tab_index=1) |
| 96 self.WaitForHtermText('chronos@localhost $', tab_index=1, | 96 self.WaitForHtermText('chronos@localhost $', tab_index=1, |
| 97 msg='Did not get shell login prompt') | 97 msg='Did not get shell login prompt') |
| 98 | 98 |
| 99 # Type 'exit' and close the tab | 99 # Type 'exit' and close the tab |
| 100 self.SendKeysToHterm('exit\\n', tab_index=1) | 100 self.SendKeysToHterm('exit\\n', tab_index=1) |
| 101 self.WaitForHtermText('exited with status code 0', tab_index=1, | 101 # Check for only 'code 0' since that is what indicates that we exited |
| 102 # successfully. Checking for more stringage causes flakes since the exit |
| 103 # string does change at times. |
| 104 self.WaitForHtermText('code 0', tab_index=1, |
| 102 msg='Did not get correct exit message') | 105 msg='Did not get correct exit message') |
| 103 | 106 |
| 104 | 107 |
| 105 if __name__ == '__main__': | 108 if __name__ == '__main__': |
| 106 pyauto_functional.Main() | 109 pyauto_functional.Main() |
| OLD | NEW |