Re-try with full updates if first delta fails.

Change-Id: Ica7360dc4b2a62384874ba1b802039289747c6e3

BUG=
TEST=Ran it

Review URL: http://codereview.chromium.org/4137010
This commit is contained in:
Chris Sosa 2010-10-28 04:12:23 -07:00
parent 9b76b421e4
commit f8b650ac1a

View File

@ -135,7 +135,17 @@ class AUTest(object):
# Update to - all tests should pass on new image. # Update to - all tests should pass on new image.
Info('Updating from base image on vm to target image.') Info('Updating from base image on vm to target image.')
self.UpdateImage(target_image_path) try:
self.UpdateImage(target_image_path)
except:
if self.use_delta_updates:
Warning('Delta update failed, disabling delta updates and retrying.')
self.use_delta_updates = False
self.source_image = ''
self.UpdateImage(target_image_path)
else:
raise
self.VerifyImage(100) self.VerifyImage(100)
if self.use_delta_updates: self.source_image = target_image_path if self.use_delta_updates: self.source_image = target_image_path
@ -145,8 +155,6 @@ class AUTest(object):
self.UpdateImage(base_image_path) self.UpdateImage(base_image_path)
self.VerifyImage(percent_passed) self.VerifyImage(percent_passed)
# TODO(sosa): Re-enable once we have a good way of checking for version
# compatibility.
def testFullUpdateWipeStateful(self): def testFullUpdateWipeStateful(self):
"""Tests if we can update after cleaning the stateful partition. """Tests if we can update after cleaning the stateful partition.