1# Copyright 2019 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.server import utils 6 7AUTHOR = 'chromeos-bluetooth' 8NAME = 'bluetooth_PeerUpdate' 9PURPOSE = 'Update chameleond on Bluetooth peer device' 10CRITERIA = 'Bluetooth peer should be present' 11ATTRIBUTES = 'suite:bluetooth, suite:bluetooth_e2e, suite:bluetooth_flaky' 12TIME = 'SHORT' # This test takes about 1 minutes while running locally 13TEST_CATEGORY = 'Functional' 14TEST_CLASS = 'bluetooth' 15TEST_TYPE = 'server' 16DEPENDENCIES = 'bluetooth, chameleon:bt_peer' 17 18DOC = """ 19 20This is not a test. This 'test' checks the chameleond version on the 21Bluetooth peer and updates if it is less that expected version in the test. 22 23Use this test if you have made a change to chameleond which should be deployed 24in the lab. 25 26Please follow the steps to update chameleond version in the lab. 27 281) Test and update chameleond code 29- Deploy the change in chameleon in a local bt peer 30 and run bluetooth_AdapterQuickSanity against it. 31- Increase self.bt_pkg_version in 'chameleond/drivers/fpga_tio.py' 32- Merge the changes 33 342) Update test and merge changes to this test 35 36After chameleond changes are merged 37- run make in chamleon folder 38- copy dist/chameleond-0.0.2.tar.gz to server/site_tests/bluetooth_PeerUpdate 39- Change CUR_BT_PKG_VERSION in bluetooth_PeerUpdate.py 40- merge the change 41 42Once the change is merged, the test will be run in the lab and peer devices 43will be updated. 44 45Note: Due to way the scheduler works, if there is more than one DUT of same 46model, test will be run only on one of them. Thus the process is indeterministic 47now but over a large period of time all the peer devices in the lab should(?) 48be updated. 49 50""" 51 52args_dict = utils.args_to_dict(args) 53chameleon_args = hosts.CrosHost.get_chameleon_arguments(args_dict) 54 55def run(machine): 56 host = hosts.create_host(machine, chameleon_args=chameleon_args) 57 job.run_test('bluetooth_PeerUpdate', host=host) 58 59parallel_simple(run, machines) 60