aboutsummaryrefslogtreecommitdiff
path: root/server/site_tests/firmware_IntegratedU2F/control.faft_cr50_tot
blob: 5626999b246de1b9b428d820690b4a0d9336676c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Copyright 2019 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_IntegratedU2F.faft_cr50_tot"
PURPOSE = "Verify U2F"
ATTRIBUTES = "suite:faft_cr50_tot"
TIME = "SHORT"
TEST_TYPE = "server"
DEPENDENCIES = "servo_state:WORKING"

DOC = """
Verify second-factor authentication (U2F) using the on-board cr50 firmware
works.

Run U2FTest on the DUT. Use servo to press the power button.

This test is applicable when using ToT cr50 module.
TODO(crbug.com/1014572) Drop this control file once suites can inject test args.
"""

args_dict = utils.args_to_dict(args)
servo_args = hosts.CrosHost.get_servo_arguments(args_dict)

# crbug.com/1014572: Inject test args.
args_dict['tot_test_run'] = 'true'

def run(machine):
    host = hosts.create_host(machine, servo_args=servo_args)

    iterations = int(args_dict.get("iterations", 1))

    job.run_test("firmware_IntegratedU2F", host=host, cmdline_args=args,
                 iterations=iterations)

parallel_simple(run, machines)