• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2015 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
5import common
6from autotest_lib.server import adb_utils
7from autotest_lib.server import constants
8from autotest_lib.server import test
9
10
11class testbed_DummyTest(test.test):
12    """A dummy test to verify testbed can access connected Android devices."""
13    version = 1
14
15    def run_once(self, testbed=None, test_apk_install=False):
16        """A dummy test to verify testbed can access connected Android devices.
17
18        Prerequisite: All connected DUTs are in ADB mode.
19
20        @param testbed: host object representing the testbed.
21        @param test_apk_install: True to test installing sl4a.apk. Default is
22                False.
23        """
24        self.testbed = testbed
25        for device in self.testbed.get_all_hosts():
26            device.run('true')
27
28        if test_apk_install:
29            for adb_host in testbed.get_adb_devices().values():
30              adb_utils.install_apk_from_build(
31                        adb_host, constants.SL4A_APK, constants.SL4A_ARTIFACT,
32                        package_name=constants.SL4A_PACKAGE)
33