OLD | NEW |
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import errno, logging, os, re, utils, signal, subprocess, time | 5 import errno, logging, os, re, utils, signal, subprocess, time |
6 from autotest_lib.client.bin import chromeos_constants, site_cryptohome | 6 from autotest_lib.client.bin import site_cryptohome |
7 from autotest_lib.client.bin import site_utils, test, site_log_reader | 7 from autotest_lib.client.bin import site_utils, test, site_log_reader |
8 from autotest_lib.client.common_lib import error, site_ui | 8 from autotest_lib.client.common_lib import error, site_ui |
| 9 from autotest_lib.client.cros import constants as chromeos_constants |
9 | 10 |
10 _DEFAULT_TIMEOUT = 30 | 11 _DEFAULT_TIMEOUT = 30 |
11 | 12 |
12 | 13 |
13 class TimeoutError(error.TestError): | 14 class TimeoutError(error.TestError): |
14 """Error raised when we time out while waiting on a condition.""" | 15 """Error raised when we time out while waiting on a condition.""" |
15 pass | 16 pass |
16 | 17 |
17 | 18 |
18 class CrashError(error.TestError): | 19 class CrashError(error.TestError): |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 except (IOError, OSError) as error: | 363 except (IOError, OSError) as error: |
363 logging.error(error) | 364 logging.error(error) |
364 | 365 |
365 # Restart the UI. | 366 # Restart the UI. |
366 nuke_login_manager() | 367 nuke_login_manager() |
367 site_utils.poll_for_condition( | 368 site_utils.poll_for_condition( |
368 lambda: __session_manager_restarted(oldpid), | 369 lambda: __session_manager_restarted(oldpid), |
369 TimeoutError('Timed out waiting for logout'), | 370 TimeoutError('Timed out waiting for logout'), |
370 timeout) | 371 timeout) |
371 wait_for_login_prompt() | 372 wait_for_login_prompt() |
OLD | NEW |