예제 #1
0
    def init(self):
        """
        Initialization
        """
        SysDebug.init(self)

        # if not defined
        if not self.__socwatch_path:
            return False

        # install socwatch and run
        install_script = ""
        if "Windows" in self._os:
            self._logger.debug("OS found : Windows")
            install_script = "socwatch_android_install.bat"
        elif "Linux" in self._os:
            self._logger.debug("OS found : Linux")
            install_script = "socwatch_android_install.sh"
        else:
            self._logger.debug("Unknown OS : %s, exiting", self._os)
            return False

        cmd = os.path.abspath("%s/%s" % (self.__socwatch_path, install_script))
        self._logger.debug("Running %s to install socwatch" % cmd)
        os.system(cmd)
        self.load_socwatch_modules()

        return True
예제 #2
0
    def init(self):
        """
        Initialisation of module: Get the last id of crashinfo
        """
        SysDebug.init(self)

        self.__event_number = self.__get_nb_events()
        return True
예제 #3
0
    def init(self):
        """
        Initialization
        """
        SysDebug.init(self)

        # if not defined
        if not self.__dyndebug_keywords:
            return False
        return True
예제 #4
0
    def init(self):
        """
        Initialization
        """
        SysDebug.init(self)

        self.__wakelocks_file = "/sys/kernel/debug/wakeup_sources"
        self.__active_since_col = 6

        return True
예제 #5
0
    def init(self):
        """
        Initialization
        """
        SysDebug.init(self)

        cmd = "which %s 1> /dev/null 2>&1 && echo Ok || echo NOk" % self.__pytimechart_cmd
        testfiles = self._exec("adb shell %s" % cmd, 1, force_execution=True)
        if testfiles == "NOk":
            return False
        return True
예제 #6
0
    def init(self):
        """
        Initialization
        """
        SysDebug.init(self)

        cmd = "ls %s 1> /dev/null 2>&1 && echo Ok || echo NOk" % self.__interrupts_file
        testfiles = self._exec("adb shell %s" % cmd, 1, force_execution=True)
        if testfiles == "NOk":
            return False
        return True
예제 #7
0
    def init(self):
        """
        Initialization
        """
        SysDebug.init(self)

        if not self.__d_states_files:
            self._logger.debug(
                "Debug file does not exist, Dstates module should not be loaded"
            )
            return False
        return True
예제 #8
0
파일: Pmu.py 프로젝트: zenghui0-0/tempfile
    def init(self):
        """
        Initialization
        """
        SysDebug.init(self)

        __lss_table_file = "/sys/kernel/debug/pmu_sss_states"
        __pmu_stats_log = "/sys/kernel/debug/pmu_stats_log"
        __pmu_interval_file = "/sys/module/intel_soc_pm_debug/parameters/pmu_stats_interval"

        cmd = "ls %s %s %s 1> /dev/null 2>&1 && echo Ok || echo NOk" % \
             (__lss_table_file, __pmu_stats_log, __pmu_interval_file)
        testfiles = self._exec("adb shell %s" % cmd, 1, force_execution=True)
        if testfiles == "NOk":
            return False

        self.__aplog_dump_init_sync()
        self.__retrieve_lss_table()
        return True
예제 #9
0
 def init(self):
     """
     Initialization
     """
     SysDebug.init(self)
     return True