[autotest] Pass clobber_stateful to cros_au.
This will tell the updater if we want to clobber stateful.
This is currently set to True by default anyway but a coming CL for
autoupdate_EndToEndTest will require it to be false in certain
conditions.
BUG=chromium:709710
TEST=test_that <IP> provision_AutoUpdate
Change-Id: I5dae2724d166b243003a0e40ac1e5ffa4458bd14
Reviewed-on: https://chromium-review.googlesource.com/557299
Commit-Ready: David Haddock <dhaddock@chromium.org>
Tested-by: David Haddock <dhaddock@chromium.org>
Reviewed-by: Xixuan Wu <xixuan@chromium.org>
diff --git a/client/common_lib/cros/dev_server.py b/client/common_lib/cros/dev_server.py
index 1b647db..18dad41 100644
--- a/client/common_lib/cros/dev_server.py
+++ b/client/common_lib/cros/dev_server.py
@@ -2028,7 +2028,8 @@
def auto_update(self, host_name, build_name, original_board=None,
original_release_version=None, log_dir=None,
force_update=False, full_update=False,
- payload_filename=None, force_original=False):
+ payload_filename=None, force_original=False,
+ clobber_stateful=True):
"""Auto-update a CrOS host.
@param host_name: The hostname of the DUT to auto-update.
@@ -2051,6 +2052,7 @@
passing it in here.
@param force_original: Whether to force stateful update with the
original payload.
+ @param clobber_stateful: If True do a clean install of stateful.
@return A set (is_success, pid) in which:
1. is_success indicates whether this auto_update succeeds.
@@ -2062,7 +2064,8 @@
kwargs = {'host_name': host_name,
'build_name': build_name,
'force_update': force_update,
- 'full_update': full_update}
+ 'full_update': full_update,
+ 'clobber_stateful': clobber_stateful}
if payload_filename is not None:
kwargs['payload_filename'] = payload_filename