Add stateful partition reset to upgrade process.

The --stateful_change=clean flag is working again for stateful updates. By adding the flag to our upgrade process we ensure that we're always working with a clean base for testing. No more out of space issues due to lingering core dumps or other files.

Change-Id: Iee205df9964bef49f47422b13d2adcf1f38a9dd4

BUG=chromium-os:11971
TEST=Tested flag manually on ToT public, ToT mario, RC mario, and RC agz. Will test code in production.

Review URL: http://codereview.chromium.org/6021006
diff --git a/client/common_lib/cros/autoupdater.py b/client/common_lib/cros/autoupdater.py
index 244cbbd..0d0a5a6 100644
--- a/client/common_lib/cros/autoupdater.py
+++ b/client/common_lib/cros/autoupdater.py
@@ -117,7 +117,11 @@
         # is testable after we run the autoupdater.
         statefuldev_url = self.update_url.replace('update', 'static/archive')
 
-        statefuldev_cmd = ' '.join([STATEFULDEV_UPDATER, statefuldev_url,
+        # --stateful_change=clean tells the updater to reset the stateful
+        # partition to factory state; giving us a clean slate for testing.
+        statefuldev_cmd = ' '.join([STATEFULDEV_UPDATER,
+                                    '--stateful_change=clean',
+                                    statefuldev_url,
                                     '2>&1'])
         logging.info(statefuldev_cmd)
         try: