示例#1
0
    def set_up(self):
        """
        Set up the test configuration
        """

        LabHspaBase.set_up(self)

        self._data_3g.set_cqi_test_set_up()

        if 0 == len(self._measure_cell_power_list):
            raise AcsConfigException(
                AcsConfigException.INVALID_PARAMETER,
                "MEASURE_CELL_POWER_LIST should contain"
                "at least one cell power value")

        return Global.SUCCESS, self._error.Msg
示例#2
0
    def set_up(self):
        """
        Initialize the test
        """

        LabHspaBase.set_up(self)

        if self._xfer_timeout is None:
            raise AcsConfigException(AcsConfigException.INVALID_PARAMETER,
                                   "XFER_TIMEOUT should be int")
        if self._rrc_idle_timeout is None:
            raise AcsConfigException(AcsConfigException.INVALID_PARAMETER,
                                   "RRC_IDLE_TIMEOUT should be int")
        if self._rrc_inactivity_timer is None:
            raise AcsConfigException(AcsConfigException.INVALID_PARAMETER,
                                   "RRC_INACTIVITY_TIMER should be int")
        # We should stop all the applications which reques the data from the netwrok
        app_list = ["com.google.android.youtube"]
        for app in app_list:
            cmd = "adb shell am force-stop %s" % app
            self._device.run_cmd(cmd, 3)

        return Global.SUCCESS, self._error.Msg
示例#3
0
    def set_up(self):
        """
        Initialize the test
        """
        LabHspaBase.set_up(self)

        # Reset KPI data needed for computing KPI test result
        if self._kpi_test:
            self._kpi_data = KPIUtil()
            self._current_iteration = 0

        # Update server and DUT IP address in iperf_settings
        set_iperf_ip_settings(self._iperf_settings, self._iperf_direction,
                              self._computer, self._networking_api,
                              self._device.get_cellular_network_interface(),
                              self._registration_timeout)

        # Get the iperf configuration corresponding to the target throughput to reach
        if self._tune_options:
            self._iperf_settings.update(
                get_iperf_configuration(self._throughput_targets,
                                        self._iperf_direction))
        else:
            self._iperf_settings.update({'direction': self._iperf_direction})

            self._iperf_settings.update(self._iperf_uldl_parameters)

            if self._iperf_protocol.upper() == "UDP":
                compute_iperf_bw(self._iperf_settings,
                                 self._throughput_targets)

        # Force screen on to avoid end of PDP context due to fast dormancy
        # setting screen timeout to 0 means set it to the maximum value possible
        self._phone_system.set_screen_timeout(0)
        self._phone_system.wake_screen()
        self._phone_system.set_phone_screen_lock_on(1)
        return Global.SUCCESS, "No errors"