Use guest login for DUT test environment.

Guest login does not own TPM; while test user login will own TPM and
cause problem to verify_tpm in finalize.

BUG=chrome-os-partner:22050
TEST=make lint test
TEST=manually on my DUT

Change-Id: I66478977fd95b41278e559f0b03e4f183a0b4e7b
Reviewed-on: https://chromium-review.googlesource.com/171700
Reviewed-by: Ricky Liang <jcliang@chromium.org>
Commit-Queue: Ricky Liang <jcliang@chromium.org>
Tested-by: Ricky Liang <jcliang@chromium.org>
diff --git a/py/goofy/goofy.py b/py/goofy/goofy.py
index 632cece..7d7420c 100755
--- a/py/goofy/goofy.py
+++ b/py/goofy/goofy.py
@@ -1223,6 +1223,9 @@
     parser.add_option('--automation', dest='automation',
                       action='store_true',
                       help='Enable automation on running factory test')
+    parser.add_option('--test_login', dest='test_login',
+                      action='store_true',
+                      help='Log in with the test user. This will own the TPM.')
     (self.options, self.args) = parser.parse_args(args)
 
     # Make sure factory directories exist.
@@ -1261,7 +1264,8 @@
       logging.warn(
         'Using chroot environment: will not actually run autotests')
     else:
-      self.env = test_environment.DUTEnvironment()
+      self.env = test_environment.DUTEnvironment(
+          test_login=self.options.test_login)
     self.env.goofy = self
 
     if self.options.restart: