1# Lint as: python2, python3
2# Copyright (c) 2013 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
6import logging
7import sys
8
9# TODO (b/206008069), remove this when migrated to new env
10sys.path.insert(0,
11                '/usr/local/lib/python2.7/dist-packages/six-1.16.0-py2.7.egg')
12try:
13    # This is weird. But it seems something is bringing in six earlier
14    # Going to force a reload after the egg is inserted.
15    import six
16    if six.PY2:
17        reload(six)
18    else:
19        import importlib
20        importlib.reload(six)
21    logging.debug("six version is {}".format(six.__version__))
22    if six.__version__ != '1.16.0':
23        logging.debug(sys.path)
24except ImportError as e:
25    logging.warning("Could not import six due to %s", e)
26
27from autotest_lib.server import test
28from autotest_lib.server.cros import telemetry_runner
29
30
31class telemetry_ScrollingActionTests(test.test):
32    """Run the telemetry scrolling action tests."""
33    version = 1
34
35
36    def run_once(self, host=None):
37        """Run the telemetry scrolling action tests.
38
39        @param host: host we are running telemetry on.
40        """
41        with telemetry_runner.TelemetryRunnerFactory().get_runner(
42                host) as telemetry:
43            result = telemetry.run_telemetry_test('ScrollingActionTest')
44            logging.debug(
45                    'Telemetry completed with a status of: %s with '
46                    'output: %s', result.status, result.output)
47