Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(305)

Side by Side Diff: server/hosts/chromiumos_host.py

Issue 6878082: Skip software verify check. (Closed) Base URL: ssh://gitrw.chromium.org:9222/autotest.git@master
Patch Set: New version. Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 # Copyright (c) 2011 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 time 5 import time
6 from autotest_lib.client.common_lib import global_config 6 from autotest_lib.client.common_lib import global_config
7 from autotest_lib.client.common_lib.cros import autoupdater 7 from autotest_lib.client.common_lib.cros import autoupdater
8 from autotest_lib.server import autoserv_parser 8 from autotest_lib.server import autoserv_parser
9 from autotest_lib.server import site_remote_power 9 from autotest_lib.server import site_remote_power
10 from autotest_lib.server.hosts import base_classes 10 from autotest_lib.server.hosts import base_classes
11 11
(...skipping 12 matching lines...) Expand all
24 Args: 24 Args:
25 hostname: network hostname or address of remote machine 25 hostname: network hostname or address of remote machine
26 """ 26 """
27 super(ChromiumOSHost, self)._initialize(hostname, *args, **dargs) 27 super(ChromiumOSHost, self)._initialize(hostname, *args, **dargs)
28 28
29 29
30 def machine_install(self, update_url=None): 30 def machine_install(self, update_url=None):
31 # TODO(seano): Once front-end changes are in, Kill this entire 31 # TODO(seano): Once front-end changes are in, Kill this entire
32 # cmdline flag; It doesn't match the Autotest workflow. 32 # cmdline flag; It doesn't match the Autotest workflow.
33 if parser.options.image: 33 if parser.options.image:
34 update_url=parser.options.image 34 update_url = parser.options.image
35 elif not update_url: 35 elif not update_url:
36 return False 36 return False
37 updater = autoupdater.ChromiumOSUpdater(host=self, 37 updater = autoupdater.ChromiumOSUpdater(host=self,
38 update_url=update_url) 38 update_url=update_url)
39 updater.run_update() 39 updater.run_update()
40 # Updater has returned, successfully, reboot the host. 40 # Updater has returned, successfully, reboot the host.
41 self.reboot(timeout=60, wait=True) 41 self.reboot(timeout=60, wait=True)
42 42
43 # sleep for 1 min till chromeos-setgoodkernel marks the current 43 # sleep for 1 min till chromeos-setgoodkernel marks the current
44 # partition as 'working'. This is the only way to commit a good update 44 # partition as 'working'. This is the only way to commit a good update
(...skipping 11 matching lines...) Expand all
56 'AUTOSERV', 'client_autodir_paths', type=list): 56 'AUTOSERV', 'client_autodir_paths', type=list):
57 self.run('rm -rf ' + path) 57 self.run('rm -rf ' + path)
58 58
59 59
60 def cleanup(self): 60 def cleanup(self):
61 """Special cleanup method to make sure hosts always get power back.""" 61 """Special cleanup method to make sure hosts always get power back."""
62 super(ChromiumOSHost, self).cleanup() 62 super(ChromiumOSHost, self).cleanup()
63 remote_power = site_remote_power.RemotePower(self.hostname) 63 remote_power = site_remote_power.RemotePower(self.hostname)
64 if remote_power: 64 if remote_power:
65 remote_power.set_power_on() 65 remote_power.set_power_on()
66
67
68 def verify(self):
69 """Override to ensure only our version of verify_software() is run."""
70 self.verify_hardware()
71 self.verify_connectivity()
72 self.__verify_software()
73
74
75 def __verify_software(self):
76 """Ensure the stateful partition has space for Autotest and updates.
77
78 Similar to what is done by AbstractSSH, except instead of checking the
79 Autotest installation path, just check the stateful partition.
80
81 Checking the stateful partition is preferable in case it has been wiped,
82 resulting in an Autotest installation path which doesn't exist and isn't
83 writable. We still want to pass verify in this state since the partition
84 will be recovered with the next install.
85 """
86 super(ChromiumOSHost, self).verify_software()
87 self.check_diskspace(
88 '/mnt/stateful_partition',
89 global_config.global_config.get_config_value(
90 'SERVER', 'gb_diskspace_required', type=int,
91 default=20))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698