blob: e256bbdddcde0c927b70072bc6fa986fec72ab9e [file] [log] [blame]
# Copyright 2020 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.client.common_lib.cros import kernel_utils
from autotest_lib.server.cros.update_engine import update_engine_test
class autoupdate_Basic(update_engine_test.UpdateEngineTest):
"""Performs a simple AU using Nebraska."""
version = 1
def run_once(self, full_payload, job_repo_url=None):
"""
Performs a N-to-N autoupdate with Nebraska.
@param job_repo_url: A url pointing to the devserver where the autotest
package for this build should be staged.
"""
# Get a payload to use for the test.
payload_url = self.get_payload_for_nebraska(job_repo_url,
full_payload=full_payload)
# Record DUT state before the update.
active, inactive = kernel_utils.get_kernel_state(self._host)
# Perform the update.
self._run_client_test_and_check_result('autoupdate_CannedOmahaUpdate',
payload_url=payload_url)
# Verify the update completed successfully.
self._host.reboot()
kernel_utils.verify_boot_expectations(inactive, host=self._host)
rootfs_hostlog, _ = self._create_hostlog_files()
self.verify_update_events(self._FORCED_UPDATE, rootfs_hostlog)