xref: /aosp_15_r20/external/autotest/server/cros/chameleon/chameleon_measurer.py (revision 9c5db1993ded3edbeafc8092d69fe5de2ee02df7)
1*9c5db199SXin Li# Copyright 2016 The Chromium OS Authors. All rights reserved.
2*9c5db199SXin Li# Use of this source code is governed by a BSD-style license that can be
3*9c5db199SXin Li# found in the LICENSE file.
4*9c5db199SXin Li
5*9c5db199SXin Lifrom autotest_lib.client.cros.chameleon import chameleon_measurer_base
6*9c5db199SXin Lifrom autotest_lib.server.cros.multimedia import remote_facade_factory
7*9c5db199SXin Li
8*9c5db199SXin Li
9*9c5db199SXin Liclass RemoteChameleonMeasurer(chameleon_measurer_base._BaseChameleonMeasurer):
10*9c5db199SXin Li    """A simple tool to measure using Chameleon for a server test.
11*9c5db199SXin Li
12*9c5db199SXin Li    This class can only be used in a server test. For a client test, use the
13*9c5db199SXin Li    LocalChameleonMeasurer in client/cros/chameleon/chameleon_measurer.py.
14*9c5db199SXin Li
15*9c5db199SXin Li    """
16*9c5db199SXin Li
17*9c5db199SXin Li    def __init__(self, cros_host, outputdir=None, no_chrome=False):
18*9c5db199SXin Li        """Initializes the object."""
19*9c5db199SXin Li        self.host = cros_host
20*9c5db199SXin Li        factory = remote_facade_factory.RemoteFacadeFactory(
21*9c5db199SXin Li                cros_host, no_chrome)
22*9c5db199SXin Li        self.display_facade = factory.create_display_facade()
23*9c5db199SXin Li
24*9c5db199SXin Li        self.chameleon = cros_host.chameleon
25*9c5db199SXin Li        self.chameleon.setup_and_reset(outputdir)
26