• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2014 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 = "deymo, chromeos-installer@google.com"
6NAME = "platform_Powerwash"
7TIME = "SHORT"
8TEST_CATEGORY = "Functional"
9TEST_CLASS = "platform"
10TEST_TYPE = "server"
11ATTRIBUTES = "suite:bvt-installer"
12
13DOC = """
14Tests that a device runs powerwash on the first reboot after the powerwash was
15signaled. The test verifies that a given file on the stateful partition is
16deleted during powerwash and that the powerwash counter is increased.
17
18We supply a job_repo_url to the test when running locally. In the lab this will
19be passed directly. The job_repo_url is a link to the autotest packages on a
20devserver. The test uses it to find and stage the stateful payload it needs to
21restore after performing the powerwash.
22
23To get a list of available devservers to use execute this command:
24atest server list | grep devserver
25
26Example usage:
27test_that platform_Powerwash <eureka/cros/beaglobonedevice ip> --board=<board> --args="job_repo_url=http://<devserver IP>:8082/static/<board>-release/RXX-XXXXX.X.X/autotest/packages"
28"""
29
30from autotest_lib.client.common_lib import utils
31args_dict = utils.args_to_dict(args)
32job_repo_url = args_dict.get('job_repo_url')
33
34def run_test(machine):
35    host = hosts.create_host(machine)
36    job.run_test("platform_Powerwash", host=host, job_repo_url=job_repo_url,
37                 disable_sysinfo=True)
38
39parallel_simple(run_test, machines)
40