[moblab] Improve moblab_host reverify process.
* Ensure a boto file is installed before trying to verify or repair
a Moblab's DUTs.
* Extend the timeout for verify from 5 minutes to 15 in order to
allow repairing DUTs process time to finish.
BUG=chromium:419058
TEST=moblab_RunSmokeSuite still works. Manually installing a boto
file and running repair via the lab works.
Change-Id: I5a05603174039f5ba670682602d9276c982341c1
Reviewed-on: https://chromium-review.googlesource.com/220555
Tested-by: Simran Basi <sbasi@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
Commit-Queue: Simran Basi <sbasi@chromium.org>
diff --git a/server/cros/moblab_test.py b/server/cros/moblab_test.py
index 7a83fdf..b37819d 100644
--- a/server/cros/moblab_test.py
+++ b/server/cros/moblab_test.py
@@ -2,7 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
-import os
import re
from autotest_lib.client.common_lib import error, global_config
@@ -33,29 +32,12 @@
"""
super(MoblabTest, self).initialize()
self._host = host
- self.install_boto_file(boto_path)
+ self._host.install_boto_file(boto_path)
self.set_image_storage_server(image_storage_server)
self._host.wait_afe_up()
self._host.find_and_add_duts()
- def install_boto_file(self, boto_path=''):
- """Install a boto file on the Moblab device.
-
- @param boto_path: Path to the boto file to install. If None, sends the
- boto file in the current HOME directory.
-
- @raises error.TestError if the boto file does not exist.
- """
- if not boto_path:
- boto_path = os.path.join(os.getenv('HOME'), '.boto')
- if not os.path.exists(boto_path):
- raise error.TestError('Boto File:%s does not exist.' % boto_path)
- self._host.send_file(boto_path, moblab_host.MOBLAB_BOTO_LOCATION)
- self._host.run('chown moblab:moblab %s' %
- moblab_host.MOBLAB_BOTO_LOCATION)
-
-
def set_image_storage_server(self, image_storage_server):
"""Set the image storage server.