1# Copyright 2021 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 = "[email protected], Chromium OS"
6NAME = "autoupdate_ConsecutiveUpdatesBeforeReboot.full"
7TIME = "MEDIUM"
8PURPOSE = "Tests repeated update with Nebraska."
9TEST_CATEGORY = "Functional"
10TEST_CLASS = "platform"
11TEST_TYPE = "server"
12ATTRIBUTES = "suite:au-perbuild"
13PY_VERSION = 3
14DOC = """
15This tests a repeated update by enabling the repeated updates feature.
16This ensures that Update Engine checks for and performs another update even
17when waiting for reboot. The update runs first with a full payload and then
18again with a delta payload to avoid duplicate fingerprint values.
19
20We supply a job_repo_url to the test when running locally. In the lab this will
21be passed directly. The job_repo_url is a link to the autotest packages on a
22devserver. The test uses it to find the correct payload to use.
23
24Example usage:
25test_that autoupdate_ConsecutiveUpdatesBeforeReboot.full <DUT> --board=<board> --args="job_repo_url='http://<devserver IP>:8082/static/<board>-release/RXX-XXXXX.X.X/autotest/packages', running_at_desk=True"
26"""
27
28from autotest_lib.client.common_lib import utils
29args_dict = utils.args_to_dict(args)
30
31def run(machine):
32    host = hosts.create_host(machine)
33    job.run_test('autoupdate_ConsecutiveUpdatesBeforeReboot', host=host,
34                 **args_dict)
35
36job.parallel_simple(run, machines)
37