Exemple #1
0
 def teardown_test(self):
     if self.collect_logs:
         stop_qxdm_logger(self.ad)
         stop_adb_tcpdump(self.ad)
         set_attenuator_gnss_signal(self.ad, self.attenuators,
                                    self.default_gnss_signal_attenuation)
     if int(self.ad.adb.shell("settings get global mobile_data")) != 1:
         set_mobile_data(self.ad, True)
     if int(
             self.ad.adb.shell(
                 "settings get global wifi_scan_always_enabled")) != 1:
         set_wifi_and_bt_scanning(self.ad, True)
     if self.ad.droid.wifiCheckState():
         wifi_toggle_state(self.ad, False)
Exemple #2
0
    def test_flp_ttff_strong_signal_wifiscan_off(self):
        """Verify FLP TTFF Hot Start and Cold Start with WiFi scanning OFF
           under strong GNSS signals.

        Steps:
            1. Disable WiFi scanning in location setting.
            2. TTFF Hot Start for 10 iteration.
            3. TTFF Cold Start for 10 iteration.

        Expected Results:
            Both FLP TTFF Hot Start and Cold Start results should be within
            flp_ttff_max_threshold.
        """
        self.start_qxdm_and_tcpdump_log()
        set_wifi_and_bt_scanning(self.ad, False)
        self.flp_ttff_hs_and_cs(self.flp_ttff_max_threshold,
                                self.pixel_lab_location)
Exemple #3
0
    def test_flp_ttff_strong_signal_wifiscan_on_wifi_not_connect(self):
        """Verify FLP TTFF Hot Start and Cold Start under strong GNSS signals
        with WiFi scanning on and not connected.

        Steps:
            1. Enable WiFi scanning in location setting.
            2. WiFi is not connected.
            3. TTFF Hot Start for 10 iteration.
            4. TTFF Cold Start for 10 iteration.

        Expected Results:
            Both FLP TTFF Hot Start and Cold Start results should be within
            flp_ttff_max_threshold.
        """
        self.start_qxdm_and_tcpdump_log()
        set_wifi_and_bt_scanning(self.ad, True)
        self.flp_ttff_hs_and_cs(self.flp_ttff_max_threshold,
                                self.pixel_lab_location)
Exemple #4
0
    def test_flp_ttff_weak_signal_wifiscan_off(self):
        """Verify FLP TTFF Hot Start and Cold Start with WiFi scanning OFF
           under weak GNSS signals.

        Steps:
            1. Set attenuation value to weak GNSS signal.
            2. Disable WiFi scanning in location setting.
            3. TTFF Hot Start for 10 iteration.
            4. TTFF Cold Start for 10 iteration.

        Expected Results:
            Both FLP TTFF Hot Start and Cold Start results should be within
            flp_ttff_max_threshold.
        """
        set_attenuator_gnss_signal(self.ad, self.attenuators,
                                   self.weak_gnss_signal_attenuation)
        self.start_qxdm_and_tcpdump_log()
        set_wifi_and_bt_scanning(self.ad, False)
        self.flp_ttff_hs_and_cs(self.flp_ttff_max_threshold,
                                self.pixel_lab_location)
Exemple #5
0
    def test_flp_ttff_weak_signal_wifiscan_on_wifi_not_connect(self):
        """Verify FLP TTFF Hot Start and Cold Start under Weak GNSS signals
        with WiFi scanning on and not connected.

        Steps:
            1. Set attenuation value to weak GNSS signal.
            2. Enable WiFi scanning in location setting.
            3. WiFi is not connected.
            4. TTFF Hot Start for 10 iteration.
            5. TTFF Cold Start for 10 iteration.

        Expected Results:
            Both FLP TTFF Hot Start and Cold Start results should be within
            flp_ttff_max_threshold.
        """
        set_attenuator_gnss_signal(self.ad, self.attenuators,
                                   self.weak_gnss_signal_attenuation)
        self.start_qxdm_and_tcpdump_log()
        set_wifi_and_bt_scanning(self.ad, True)
        self.flp_ttff_hs_and_cs(self.flp_ttff_max_threshold,
                                self.pixel_lab_location)
Exemple #6
0
    def test_flp_ttff_strong_signal_wifiscan_on_wifi_connect(self):
        """Verify FLP TTFF Hot Start and Cold Start under strong GNSS signals
        with WiFi scanning on and connected.

        Steps:
            1. Enable WiFi scanning in location setting.
            2. Connect to WiFi AP.
            3. TTFF Hot Start for 10 iteration.
            4. TTFF Cold Start for 10 iteration.

        Expected Results:
            Both FLP TTFF Hot Start and Cold Start results should be within
            flp_ttff_max_threshold.
        """
        self.start_qxdm_and_tcpdump_log()
        set_wifi_and_bt_scanning(self.ad, True)
        wifi_toggle_state(self.ad, True)
        connect_to_wifi_network(
            self.ad, self.ssid_map[self.pixel_lab_network[0]["SSID"]])
        self.flp_ttff_hs_and_cs(self.flp_ttff_max_threshold,
                                self.pixel_lab_location)