aboutsummaryrefslogtreecommitdiff
path: root/server/site_tests/bluetooth_PeerUpdate/bluetooth_PeerUpdate.py
blob: 83d2feeb116ffc5f1029f116c1a263bc2eed5980 (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
# Lint as: python2, python3
# 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.
"""
Test which updates chameleond on the Bluetooth Peer device

This is not a test per se. This 'test' checks if the chameleond commit on the
Bluetooth peer device and updates it if it below the expected value.

The expected commit and the installation bundle is downloaded from google cloud
storage.
"""

from autotest_lib.server import test
from autotest_lib.server.cros.bluetooth import bluetooth_peer_update

class bluetooth_PeerUpdate(test.test):
    """
    This test updates chameleond on Bluetooth peer devices

    """

    version = 1

    def run_once(self, host, btpeer_args=[]):
        """ Update Bluetooth peer device

        @param host: the DUT, usually a chromebook
        """
        host.initialize_btpeer(btpeer_args=btpeer_args)
        bluetooth_peer_update.update_all_peers(host, raise_error=True)