Exemplo n.º 1
0
    def run_tests(self, tests, test_names):
        self.setup_adb_device()

        if self.config["app"] == "chrome-m":
            # Make sure that chrome is enabled on the device
            self.device.shell_output("pm enable com.android.chrome")

        try:
            if self.config["power_test"]:
                disable_charging(self.device)
            return super(BrowsertimeAndroid, self).run_tests(tests, test_names)
        finally:
            if self.config["power_test"]:
                enable_charging(self.device)
Exemplo n.º 2
0
    def setup_adb_device(self):
        if self.device is None:
            self.device = ADBDevice(verbose=True)
            tune_performance(self.device, log=LOG)
        if self.config['power_test']:
            disable_charging(self.device)

        LOG.info("creating remote root folder for raptor: %s" %
                 self.remote_test_root)
        self.device.rm(self.remote_test_root, force=True, recursive=True)
        self.device.mkdir(self.remote_test_root)
        self.device.chmod(self.remote_test_root, recursive=True, root=True)

        self.clear_app_data()
        self.set_debug_app_flag()
Exemplo n.º 3
0
    def setup_adb_device(self):
        if self.device is None:
            self.device = ADBDeviceFactory(verbose=True)
            if not self.config.get("disable_perf_tuning", False):
                tune_performance(self.device, log=LOG)

        self.device.run_as_package = self.config["binary"]
        self.remote_test_root = os.path.join(self.device.test_root, "raptor")
        self.remote_profile = os.path.join(self.remote_test_root, "profile")
        if self.config["power_test"]:
            disable_charging(self.device)

        LOG.info("creating remote root folder for raptor: %s" %
                 self.remote_test_root)
        self.device.rm(self.remote_test_root, force=True, recursive=True)
        self.device.mkdir(self.remote_test_root, parents=True)

        self.clear_app_data()
        self.set_debug_app_flag()