• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2020 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.client.common_lib.cros import kernel_utils
6from autotest_lib.server.cros.update_engine import update_engine_test
7
8
9class autoupdate_Basic(update_engine_test.UpdateEngineTest):
10    """Performs a simple AU using Nebraska."""
11    version = 1
12
13    def run_once(self, full_payload, job_repo_url=None):
14        """
15        Performs a N-to-N autoupdate with Nebraska.
16
17        @param job_repo_url: A url pointing to the devserver where the autotest
18            package for this build should be staged.
19
20        """
21        # Get a payload to use for the test.
22        payload_url = self.get_payload_for_nebraska(job_repo_url,
23                                                    full_payload=full_payload)
24
25        # Record DUT state before the update.
26        active, inactive = kernel_utils.get_kernel_state(self._host)
27
28        # Perform the update.
29        self._run_client_test_and_check_result('autoupdate_CannedOmahaUpdate',
30                                               payload_url=payload_url)
31
32        # Verify the update completed successfully.
33        self._host.reboot()
34        kernel_utils.verify_boot_expectations(inactive, host=self._host)
35        rootfs_hostlog, _ = self._create_hostlog_files()
36        self.verify_update_events(self._FORCED_UPDATE, rootfs_hostlog)
37