• 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
5from autotest_lib.server import utils
6
7AUTHOR = "mruthven"
8NAME = "firmware_Cr50BID"
9PURPOSE = "Verify cr50 response to board id"
10ATTRIBUTES = "suite:faft_cr50_experimental"
11TIME = "LONG"
12TEST_TYPE = "server"
13DEPENDENCIES = "servo_state:WORKING"
14
15DOC = """
16Verify cr50 board id behavior on a board id locked image.
17
18Check that cr50 will not accept mismatched board ids when it is running a board
19id locked image. This test will only run if the running image has a non-zero
20board id. If the image isn't board id locked, it won't reject anything, so this
21test wouldn't be useful.
22
23Set the board id on a non board id locked image and verify cr50 will rollback
24when it is updated to a mismatched board id image.
25
26The DBG image path is optional. If it's not given, the test will download the
27image from google storage.
28
29@param iterations: Number of times to run the test
30@param cr50_dbg_image_path: local path for the dev image
31@param basic: True if the test should just use test cases to do basic
32              verification.
33"""
34
35if 'args_dict' not in locals():
36    args_dict = {}
37
38args_dict.update(utils.args_to_dict(args))
39servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
40
41def run(machine):
42    host = hosts.create_host(machine, servo_args=servo_args)
43
44    iterations = int(args_dict.get("iterations", 1))
45    basic = args_dict.get("basic", "").lower() == 'true'
46
47    job.run_test("firmware_Cr50BID", host=host, cmdline_args=args,
48                 iterations=iterations, basic=basic, full_args=args_dict)
49
50parallel_simple(run, machines)
51