• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2017 The Chromium OS Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5AUTHOR = "dhaddock, Chromium OS"
6NAME = "autoupdate_ForcedOOBEUpdate.full"
7PURPOSE = "Test forced update at OOBE."
8TIME = "MEDIUM"
9TEST_CATEGORY = "Functional"
10TEST_CLASS = "platform"
11TEST_TYPE = "server"
12ATTRIBUTES = "suite:bvt-perbuild"
13DOC = """
14This tests the forced autoupdate flow at OOBE.
15
16Debugging steps:
17This test cannot be debugged locally easily because
181. Using a devserver on your workstation is blocked by SNAX
192. The test relies on reading a job_repo_url which is only set by runs
20initiated in the lab.
21
22You will need to use a lab DUT and a lab devserver but kick it off from your
23workstation. You can start by going to cautotest and locking a DUT.
24
25You will need to pass a job_repo_url param to test_that.
26
27The test needs to be able to ssh into devservers. To ssh into lab devservers
28you need to download the chromium key file from:
29chromeos_internal//chromeos-admin/puppet/modules/users/files/chromeos-test/
30ssh/chromium
31
32Save the file to ~/.ssh/ and run chmod 600 on it.
33Then add these lines to your ~/.ssh/config
34
35Host <devserver hostname>
36  GSSAPITrustDns no
37  GSSAPIDelegateCredentials no
38  GSSAPIAuthentication no
39  ForwardAgent no
40  ForwardX11 no
41  PreferredAuthentications publickey
42  StrictHostKeyChecking no
43  User chromeos-test
44  IdentityFile %d/.ssh/chromium
45
46Check that you can now ssh into a lab devserver without a password.
47Copy the ssh files to your chroot's .ssh folder to ssh from there.
48
49test_that <hostname>.cros autoupdate_ForcedOOBEUpdate --args="job_repo_url='http://<IP>:<port>/static/<board>-release/RXX-XXXX.X.X/autotest/packages'"
50"""
51
52from autotest_lib.client.common_lib import utils
53
54args_dict = utils.args_to_dict(args)
55
56def run(machine):
57    host = hosts.create_host(machine)
58    job.run_test('autoupdate_ForcedOOBEUpdate', host=host, full_payload=True,
59                 **args_dict)
60
61job.parallel_simple(run, machines)
62