Cleans the first-use-date in RW_VPD (required for RMA process)

Cleans the first-use-date in RW_VPD to allow forced enterprise-enrolled
devices to guest login once after re-imaging in RMA centers. This will
allow RMA operators to test basic in-OS functionality (for one boot
only!) prior to shipping back to the customer.

BUG=chromium:397354
TEST=Manual test in Rambi

Change-Id: I81441baf43801620ede729a45c2b5f5968ac1e80
Reviewed-on: https://chromium-review.googlesource.com/225542
Tested-by: Bowgo Tsai <bowgotsai@chromium.org>
Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
Commit-Queue: Bowgo Tsai <bowgotsai@chromium.org>
diff --git a/py/test/test_lists/generic.py b/py/test/test_lists/generic.py
index 10fedba..6d54a1b 100644
--- a/py/test/test_lists/generic.py
+++ b/py/test/test_lists/generic.py
@@ -109,6 +109,13 @@
   rlz_brand_code = None
   customization_id = None
 
+  # Cleans the first-use-date in RW_VPD to allow forced enterprise-enrolled
+  # devices to guest login once after re-imaging in RMA centers. This will
+  # allow RMA operators to test basic in-OS functionality (for one boot only!)
+  # prior to shipping back to the customer.
+  # See http://crbug.com/397354 for more details.
+  clean_activate_date = False
+
   #####
   #
   # Parameters for SMT (surface-mount technology) tests.
diff --git a/py/test/test_lists/generic_run_in.py b/py/test/test_lists/generic_run_in.py
index f5780ae..843826f 100644
--- a/py/test/test_lists/generic_run_in.py
+++ b/py/test/test_lists/generic_run_in.py
@@ -10,6 +10,7 @@
 This file implements RunIn method to create generic Run-In test list.
 """
 
+from __future__ import print_function
 
 import factory_common  # pylint: disable=W0611
 from cros.factory.test.test_lists.test_lists import AutomatedSequence
@@ -62,6 +63,19 @@
                  pass_without_prompt=True,
                  accessibility=True)
 
+    if args.clean_activate_date:
+      FactoryTest(
+          id='CleanActivateDate',
+          label_zh=u'清除激活日期',
+          pytest_name='line_check_item',
+          dargs={'title_en': 'CleanActivateDate',
+                 'title_zh': u'清除激活日期',
+                 'items': [
+                     ('CleanActivateDate',
+                      u'清除激活日期',
+                      'activate_date --clean',
+                      False)]})
+
     if args.factory_environment:
       # The image installed on DUT may be outdated since the time between SMT
       # and Run-In can be several monthgs. In this station we can let DUT do