Exemple #1
0
    def install(self,
                appuri,
                additionnals=None,
                arguments=None,
                destination=None):
        """
        install the application : create .sh file and push it on device
        """
        IApplication.install(self, appuri, additionnals, arguments,
                             destination)

        # get number of capture
        capture_number = self.__get_arguments_value("NumberOfIteration")
        # default value_execution_file
        if capture_number is None:
            self._capture_number = 10
        else:
            self._capture_number = int(capture_number)

        # get sleep time between capture
        sleep_time = self.__get_arguments_value("SleepTimeBetweenCapture")

        # default value
        if sleep_time is None:
            self._sleep_time_between_capture = 30
        else:
            self._sleep_time_between_capture = int(sleep_time)

        self._camera = Camera(self._device)

        # generate and push application file
        self.__generate_and_push_sh()
Exemple #2
0
    def install(self,
                appuri,
                additionnals=None,
                arguments=None,
                url=None,
                destination=None):
        """
        Install the application on the device

        :type appuri: String
        :param appuri: The full path to the application file

        :type additionnals: String
        :param additionnals: The full path of additionnals elements to run the
                             application

        :type arguments: String
        :param arguments: The arguments of the application. May be everything
                          the application need to run.

        :type destination: String
        :param destination: The directory where the application will be installed
        """
        IApplication.install(self, appuri, additionnals, arguments, url,
                             destination)
        app_name = os.path.split(self._application_uri)[1]
        cmd = "mv /data/%s /data/%s" % (app_name, self._benchmark_name)
        self.adb_shell(cmd, 3)
Exemple #3
0
    def install(self,
                appuri,
                additionnals=None,
                arguments=None,
                url=None,
                destination=None):
        """
        Install the application on the device

        :type appuri: String
        :param appuri: The full path to the application file

        :type additionnals: String
        :param additionnals: The full path of additionnals elements to run the
                             application

        :type arguments: String
        :param arguments: The arguments of the application. May be everything
                          the application need to run.

        :type destination: String
        :param destination: The directory where the application will be installed
        """
        IApplication.install(self, appuri, additionnals, arguments, url,
                             destination)
        self.__url = url
Exemple #4
0
    def install(self,
                appuri,
                additionnals=None,
                arguments=None,
                url=None,
                destination=None):
        """
        Install the application on the device

        :type appuri: String
        :param appuri: The full path to the application file

        :type additionnals: String
        :param additionnals: The full path of additionnals elements to run the
                             application

        :type arguments: String
        :param arguments: The arguments of the application. May be everything
                          the application need to run.

        :type destination: String
        :param destination: The directory where the application will be installed
        """
        IApplication.install(self, appuri, additionnals, arguments, url,
                             destination)

        metadata = self._ApkMetaReader(self._application_uri)
        apk_infos = metadata.get_infos()

        self.__app_name = apk_infos["package"]["name"]
        self.__version = apk_infos["package"]["versionName"]

        if "launchable-activity" in apk_infos:
            self.__launcher = apk_infos["launchable-activity"]["name"]