def start(self): """ Start application """ test_dic = self.__test_dic[self.__version] if self._arguments not in test_dic.keys(): raise AcsConfigException( AcsConfigException.INVALID_PARAMETER, "Test %s not in dictionnary for %s" % (self._arguments, self.__version)) self.__test_name = test_dic[self._arguments] if self.__version == "glbenchmark21": self.__drive_version = self.__drive21 elif self.__version == "glbenchmark27": self.__drive_version = self.__drive27 elif self.__version == "glbenchmark25": self.__drive_version = self.__drive25 else: raise AcsConfigException( AcsConfigException.INVALID_PARAMETER, "%s version is not supported in ACS" % self.__version) if "pro" in self.__test_name.lower(): self.__regex_test_result = "Pro:\s*\d*\s*frames\s*\((?P<result>[\d*.]*)\s*FPS\)" IAndroidPackage.start(self)
def drive(self): """ Drive application """ IAndroidPackage.start(self) time.sleep(3) cmd_list = ["ENTER", "ENTER"] self._keyevent.scenario(cmd_list, 2.0)
def start(self): """ Start application """ self._logger.info("++ wait 10 secs before running benchmark") time.sleep(10) self._logger.info("++ start") IAndroidPackage.start(self) time.sleep(3)
def start(self): """ Start application """ self._logger.info("++ start") IAndroidPackage.start(self) time.sleep(5) cmd_list = ["MOVE_HOME", "TAB"] self._keyevent.scenario(cmd_list, 2)
def start(self): """ Start application """ self.adb_shell("rm -rf /data/data/gr.androiddev.BenchmarkPi/*", 3) IAndroidPackage.start(self) time.sleep(2) cmd_list = ["MOVE_HOME", "ENTER"] self._keyevent.scenario(cmd_list)
def start(self): """ Start application """ self._logger.info("++ start") IAndroidPackage.start(self) # Added DPAD_UP to cmd_list to place the focus on 'Full Benchmark' text. cmd_list = ["MOVE_HOME", "DPAD_UP", "DPAD_DOWN", "DPAD_DOWN"] self._keyevent.scenario(cmd_list, 1) time.sleep(2)
def drive(self): """ Start the application """ self._logger.debug("Caffeinemark: drive") version = self._get_version() if "1.2.4" in version: cmd = "dalvikvm -cp /data/CFM.dex CaffeineMarkEmbeddedApp" self._result = self.adb_shell(cmd, 60) else: IAndroidPackage.start(self)
def start(self): """ Start application """ self._logger.info("++ start") IAndroidPackage.start(self) time.sleep(2) if PCCGUtilities.find_view(attr="text", value="Vellamo EULA", clear_dump=False): PCCGUtilities.tap(attr="text", value="Accept", get_dump=False) self._logger.debug("Accepted Vellamo EULA")
def start(self): """ Start application """ self._logger.debug("Andebench - \'start\' begin") IAndroidPackage.start(self) time.sleep(5) if "java" in self._arguments.lower(): cmd_list = ["BUTTON_MODE", "DPAD_LEFT", "ENTER", "TAB", "TAB", "TAB", "TAB", "ENTER", "BACK"] else: cmd_list = ["BUTTON_MODE", "DPAD_LEFT", "ENTER", "TAB", "TAB", "TAB", "ENTER", "BACK"] self._keyevent.scenario(cmd_list, 1) self._logger.debug("Andebench - \'start\' end")
def start(self): """ Start application """ # Clean cache before starting cmd = "find %s -maxdepth 1 -mindepth 1"\ "|grep -v lib|grep -v shared_prefs"\ "|xargs rm -r && echo 0" % self.__data_path self.adb_shell(cmd, 10) version = self._get_version() if "4.0.3" in version: self._results = self._result_v4 elif "5.6" in version: self._results = self._result_v5 IAndroidPackage.start(self)
def __launch_basemark(self): """ Launch basemark """ self._logger.debug("Basemark - launch test case") egl_not_available = "requested EGL_DEPTH_SIZE not available" self._get_device_logger().add_trigger_message(egl_not_available) IAndroidPackage.start(self) if self._get_device_logger().is_message_received(egl_not_available, 5): self.__disable_egl = True self._get_device_logger().remove_trigger_message(egl_not_available) return self.__wait_app_init()
def post_install(self): """ Post-installation actions """ self._logger.debug("++ clear logcat buffer") PCCGUtilities.clear_logcat() self._logger.info("++ start app") IAndroidPackage.start(self) self._logger.info("++ wait till [OK, let's go! button] is displayed") # 10 minutes max timeout for _ in range(600): time.sleep(1) ok_shown = PCCGUtilities.find_in_logcat( pat='onProductModelChange', l_opt='BaseWebViewFragmentActivity:I *:S') if isinstance(ok_shown, str): self._logger.info("++ OK button displayed") time.sleep(5) break else: raise DeviceException( "Could not find OK button on the welcome window") self._logger.info("++ press OK button") command = ["DPAD_DOWN", "ENTER"] self._keyevent.scenario(command, 2.0) self._logger.info("++ wait while searching .dlc files") # 30 minutes max timeout for _ in range(1800): time.sleep(1) dlc_inst = PCCGUtilities.find_in_logcat( pat='dlcState\\":\\"INSTALLED', l_opt='BaseWebViewFragment:E *:S') if isinstance(dlc_inst, str): self._logger.info("++ dlc files installed") time.sleep(10) break else: raise DeviceException("Application failed to install .dlc files") self._logger.info("++ go to Home screen") self._keyevent.scenario(["BACK", "BACK", "BACK", "HOME"], 2.0) self.clear_cache()
def start(self): """ Start application """ self._logger.debug("++ clear logcat buffer") PCCGUtilities.clear_logcat() self._logger.info("++ start") IAndroidPackage.start(self) self._logger.info("++ wait few secs till tests are ready to run") for _ in range(100): time.sleep(1) ok_shown = PCCGUtilities.find_in_logcat( pat='onProductModelChange', l_opt='BaseWebViewFragmentActivity:I *:S') if isinstance(ok_shown, str): self._logger.debug("++ Drop down button displayed") time.sleep(5) break
def start(self): """ Start application """ artifact_param = self._global_config.benchConfig.get_parameters( "ARTIFACT_MANAGER") addr = artifact_param.get_param_value( "cache_folder") + self._arguments.split(";")[0] self.__device.push(addr, "/data/local/tmp/", 60) IAndroidPackage.start(self) command = "adb shell uiautomator runtest Performance.jar -c other.ACSCoremark" _, out = self.__device.run_cmd(command, 3000) out = out.split("\n") for line in out: if line.find("Score") == 0: match = re.search(r'[0-9]+(.[0-9]+)?', line) self._result = match.group(0)