xref: /aosp_15_r20/external/autotest/server/site_tests/bluetooth_PeerUpdate/bluetooth_PeerUpdate.py (revision 9c5db1993ded3edbeafc8092d69fe5de2ee02df7)
1# Lint as: python2, python3
2# Copyright 2019 The Chromium OS Authors. All rights reserved.
3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5"""
6Test which updates chameleond on the Bluetooth Peer device
7
8This is not a test per se. This 'test' checks if the chameleond commit on the
9Bluetooth peer device and updates it if it below the expected value.
10
11The expected commit and the installation bundle is downloaded from google cloud
12storage.
13"""
14
15from autotest_lib.server import test
16from autotest_lib.server.cros.bluetooth import bluetooth_peer_update
17
18class bluetooth_PeerUpdate(test.test):
19    """
20    This test updates chameleond on Bluetooth peer devices
21
22    """
23
24    version = 1
25
26    def run_once(self, host, btpeer_args=[]):
27        """ Update Bluetooth peer device
28
29        @param host: the DUT, usually a chromebook
30        """
31        host.initialize_btpeer(btpeer_args=btpeer_args)
32        bluetooth_peer_update.update_all_peers(host, raise_error=True)
33