Ejemplo n.º 1
0
    def run(self, context):
        """
        Runs the test step
        """
        SysDebugBase.run(self, context)

        self._sysdebug_apis.stop()
Ejemplo n.º 2
0
    def run(self, context):
        """
        Runs the test step

        @type context: TestStepContext
        @param context: test case context
        """
        SysDebugBase.run(self, context)

        self.ts_verdict_msg = "VERDICT: Can't find the Wi-Fi SoftAP channel in logs."

        while self._result == None and self._timeout > 0:
            sysdebug_log = self._get_sysdebug_logs()
            for cur_log in sysdebug_log.iter():
                if cur_log.tag == "WifiSoftApChannel":
                    value = cur_log.get('value')
                    if value is not None:
                        self._result = int(value)
                    break

            if self._result == None:
                self._logger.debug(
                    "Can't find the Wi-Fi SoftAP channel in logs (%d tries remaining)."
                    % (self._timeout))
                self._timeout = self._timeout - 1
                sleep(self._delay_between_checks)

            else:
                self.ts_verdict_msg = "VERDICT: Wi-Fi SoftAP channel is %d." % (
                    self._result)
                break
        if self._result == None:
            self._raise_device_exception(self.ts_verdict_msg)
        self._logger.debug(self.ts_verdict_msg)
        context.set_info(self._pars.save_wifi_hostpot_channel, self._result)
Ejemplo n.º 3
0
    def run(self, context):
        """
        Runs the test step

        :type context: TestStepContext
        :param context: test case context
        """

        SysDebugBase.run(self, context)
        self.sysdebug_log = self._get_sysdebug_logs()
        modem_panics_logs = None
        for cur_log in self.sysdebug_log.iter():
            if cur_log.tag == "ModemPanics":
                modem_panics_logs = cur_log
                break
        if modem_panics_logs is None:
            self._raise_device_exception(
                DeviceException.OPERATION_FAILED,
                "Can't find ModemPanics in the logs, did you enable it at init?"
            )

        for cur_panic in modem_panics_logs:
            self._logger.debug(cur_panic.tag)

        nb_modem_panic = len(modem_panics_logs)

        self.ts_verdict_msg = "VERDICT: %d modem panic found." % nb_modem_panic
        context.set_info(self._pars.modem_panic_count, str(nb_modem_panic))
        self._logger.debug(self.ts_verdict_msg)
Ejemplo n.º 4
0
    def run(self, context):
        """
        Runs the test step
        """
        SysDebugBase.run(self, context)

        while not self._sysdebug_apis.synchronize():
            sleep(10)
Ejemplo n.º 5
0
    def run(self, context):
        """
        Runs the test step

        @type context: TestStepContext
        @param context: test case context
        """
        SysDebugBase.run(self, context)
Ejemplo n.º 6
0
    def run(self, context):
        """
        Runs the test step
        """
        SysDebugBase.run(self, context)
        variable_to_set = self._pars.sysdebug_report_dest

        value = self._sysdebug_apis.report()

        # We have the value, let's save it into the context
        context.set_info(variable_to_set, value)
        self.ts_verdict_msg = "VERDICT: %s stored as {0}".format(
            value) % variable_to_set
        self._logger.debug(self.ts_verdict_msg)
Ejemplo n.º 7
0
 def __init__(self, tc_conf, global_conf, ts_conf, factory):
     SysDebugBase.__init__(self, tc_conf, global_conf, ts_conf, factory)
     self._result = None
     self._timeout = 30
     self._delay_between_checks = 1
Ejemplo n.º 8
0
 def __init__(self, tc_conf, global_conf, ts_conf, factory):
     SysDebugBase.__init__(self, tc_conf, global_conf, ts_conf, factory)
     self.sysdebug_log = None