Home | History | Annotate | Download | only in firmware_Fingerprint
      1 # Copyright 2019 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 
      5 from autotest_lib.server import utils
      6 
      7 AUTHOR = "Chrome OS Team"
      8 NAME = "firmware_Fingerprint.ObeysRollback"
      9 PURPOSE = """
     10 Verify that fingerprint firmware rollback functions correctly.
     11 """
     12 CRITERIA = """
     13 Fails if the rollback minimum version is not updated or min rollback version
     14 does not prevent running an older version.
     15 """
     16 ATTRIBUTES = "suite:fingerprint"
     17 TIME = "SHORT"
     18 TEST_CATEGORY = "Functional"
     19 TEST_CLASS = "firmware"
     20 TEST_TYPE = "server"
     21 DEPENDENCIES = "servo, fingerprint"
     22 JOB_RETRIES = 0
     23 
     24 DOC = """
     25 Flashes new RW firmware with a rollback ID of '1' and verifies that all
     26 rollback state is set correctly. Then attempts to flash RW firmware with
     27 rollback ID of '0' and verifies that the RO version of firmware is running
     28 (i.e., not running older version). Finally, flashes RW firmware with rollback
     29 ID of '9' and validates that the RW version of '9' is running.
     30 """
     31 
     32 test_images = [ 'TEST_IMAGE_DEV_RB_ZERO',
     33                 'TEST_IMAGE_DEV_RB_ONE',
     34                 'TEST_IMAGE_DEV_RB_NINE']
     35 
     36 args_dict = utils.args_to_dict(args)
     37 servo_args = hosts.CrosHost.get_servo_arguments(args_dict)
     38 
     39 def run(machine):
     40     host = hosts.create_host(machine, servo_args=servo_args)
     41     job.run_test("firmware_Fingerprint", host=host,
     42                  test_exe="obeys_rollback.sh",
     43                  test_exe_args=test_images,
     44                  use_dev_signed_fw=True)
     45 
     46 parallel_simple(run, machines)
     47