Exemple #1
0
    def run_test(self):
        """
        Execute the test
        """

        # Call LAB_WCDMA_BASE Run function
        LabWcdmaBase.run_test(self)

        # Start IPERF measurement using PORT
        # and DURATION and LAB_SERVER ip_address parameters
        time.sleep(self._wait_btwn_cmd)

        iperf_settings = \
            {"server_ip_address": self._server_ip_address,
             "port_number": self._port,
             "duration": self._duration,
             "protocol": self._iperf_protocol.lower()}

        if self._tune_options:
            iperf_settings.update(get_iperf_configuration(self._throughput_targets))
        else:
            iperf_settings.update({'direction': self._iperf_direction})
            iperf_settings.update(self._iperf_uldl_parameters)
        # Update server and DUT IP address in iperf_settings
        set_iperf_ip_settings(iperf_settings, self._iperf_direction, self._computer, self._networking_api, self._device.get_cellular_network_interface(), self._registration_timeout)

        if self._computer is not None:
            iperf_settings.update({"computer": self._computer})

        throughput = self._networking_api.iperf(iperf_settings)

        # Compute verdict depending on throughputs
        return compute_iperf_verdict(throughput, self._throughput_targets, self._iperf_direction)
Exemple #2
0
    def set_up(self):
        """
        Initialize the test
        """
        # Call LAB_EGPRS_BASE set_up function
        LabEgprsBase.set_up(self)

        # 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)

        if self._computer is not None:
            self._iperf_settings.update({"computer": self._computer})

        if self._tune_options == 1:
            # Set Iperf settings depending on the expected throughput
            self._iperf_settings.update(
                get_iperf_configuration(self._throughput_targets))
        else:
            self._iperf_settings.update({'direction': self._iperf_direction})
            self._iperf_settings.update(self._iperf_uldl_parameters)

        return Global.SUCCESS, "No errors"
Exemple #3
0
    def set_up(self):
        """
        Initialize the test
        """
        # Call LAB_TDSCDMA_BASE set_up function
        LabTdscdmaBase.set_up(self)

        # Set up DUT to registered
        self._set_up_registration()

        # Set up DUT to pdp activated
        self._set_up_pdp_active()

        # 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 bandwidth from target throughput and iperf bandwidth
                compute_iperf_bw(self._iperf_settings,
                                 self._throughput_targets,
                                 self._iperf_bandwidth)

        # Force screen on to avoid end of PDP context due to fast dormancy
        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"
    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"