1 # Copyright 2016 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 5 from autotest_lib.client.cros.chameleon import chameleon 6 from autotest_lib.client.cros.chameleon import chameleon_measurer_base 7 from autotest_lib.client.cros.multimedia import local_facade_factory 8 9 10 class LocalChameleonMeasurer(chameleon_measurer_base._BaseChameleonMeasurer): 11 """A simple tool to measure using Chameleon for a client test. 12 13 This class can only be used in a client test. For a server test, use the 14 RemoteChameleonMeasurer in server/cros/chameleon/chameleon_measurer.py. 15 16 """ 17 18 def __init__(self, cros_host, args, chrome, outputdir=None): 19 """Initializes the object.""" 20 self.host = cros_host 21 factory = local_facade_factory.LocalFacadeFactory(chrome) 22 self.display_facade = factory.create_display_facade() 23 24 self.chameleon = chameleon.create_chameleon_board(cros_host.hostname, 25 args) 26 self.chameleon.setup_and_reset(outputdir) 27