# Copyright 2017 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from autotest_lib.server import utils AUTHOR = "mruthven" NAME = "firmware_Cr50BID" PURPOSE = "Verify cr50 response to board id" ATTRIBUTES = "suite:faft_cr50_experimental" TIME = "LONG" TEST_TYPE = "server" DEPENDENCIES = "servo_state:WORKING" DOC = """ Verify cr50 board id behavior on a board id locked image. Check that cr50 will not accept mismatched board ids when it is running a board id locked image. This test will only run if the running image has a non-zero board id. If the image isn't board id locked, it won't reject anything, so this test wouldn't be useful. Set the board id on a non board id locked image and verify cr50 will rollback when it is updated to a mismatched board id image. The DBG image path is optional. If it's not given, the test will download the image from google storage. @param iterations: Number of times to run the test @param cr50_dbg_image_path: local path for the dev image @param basic: True if the test should just use test cases to do basic verification. """ if 'args_dict' not in locals(): args_dict = {} args_dict.update(utils.args_to_dict(args)) servo_args = hosts.CrosHost.get_servo_arguments(args_dict) def run(machine): host = hosts.create_host(machine, servo_args=servo_args) iterations = int(args_dict.get("iterations", 1)) basic = args_dict.get("basic", "").lower() == 'true' job.run_test("firmware_Cr50BID", host=host, cmdline_args=args, iterations=iterations, basic=basic, full_args=args_dict) parallel_simple(run, machines)