Exemplo n.º 1
0
    def setup_class(self):
        self.dut = self.android_devices[0]
        wutils.wifi_test_device_init(self.dut)
        req_params = ("run_extended_test", "ping_addr", "max_bugreports")
        opt_param = ["reference_networks"]
        self.unpack_userparams(req_param_names=req_params,
                               opt_param_names=opt_param)

        if "AccessPoint" in self.user_params:
            self.legacy_configure_ap_and_start()

        self.leeway = 10
        self.stime_channel = SCAN_TIME_PASSIVE
        self.default_scan_setting = {
            "band": wutils.WifiEnums.WIFI_BAND_BOTH,
            "periodInMs": SCANTIME,
            "reportEvents": wutils.WifiEnums.REPORT_EVENT_AFTER_EACH_SCAN
        }
        self.default_batch_scan_setting = {
            "band": wutils.WifiEnums.WIFI_BAND_BOTH,
            "periodInMs": SCANTIME,
            "reportEvents": wutils.WifiEnums.REPORT_EVENT_AFTER_BUFFER_FULL
        }
        self.log.debug("Run extended test: {}".format(self.run_extended_test))
        self.wifi_chs = wutils.WifiChannelUS(self.dut.model)
        asserts.assert_true(
            self.dut.droid.wifiIsScannerSupported(),
            "Device %s doesn't support WifiScanner, abort." % self.dut.model)
        self.attenuators = wutils.group_attenuators(self.attenuators)
        self.attenuators[0].set_atten(0)
        self.attenuators[1].set_atten(0)
Exemplo n.º 2
0
 def setup_class(self):
     self.dut = self.android_devices[0]
     wutils.wifi_test_device_init(self.dut)
     req_params = ("attn_vals", "pno_network_a", "pno_network_b",
                   "pno_interval")
     self.unpack_userparams(req_params)
     self.attenuators = wutils.group_attenuators(self.attenuators)
     self.attn_a = self.attenuators[0]
     self.attn_b = self.attenuators[1]
     self.set_attns("default")
 def setup_class(self):
     self.dut = self.android_devices[0]
     wutils.wifi_test_device_init(self.dut)
     req_params = (
         "ent_roaming_ssid",
         "bssid_a",
         "bssid_b",
         "attn_vals",
         # Expected time within which roaming should finish, in seconds.
         "roam_interval",
         "ca_cert",
         "client_cert",
         "client_key",
         "eap_identity",
         "eap_password",
         "device_password")
     self.unpack_userparams(req_params)
     self.config_peap = {
         Ent.EAP: int(EAP.PEAP),
         Ent.CA_CERT: self.ca_cert,
         Ent.IDENTITY: self.eap_identity,
         Ent.PASSWORD: self.eap_password,
         Ent.PHASE2: int(EapPhase2.MSCHAPV2),
         WifiEnums.SSID_KEY: self.ent_roaming_ssid
     }
     self.config_tls = {
         Ent.EAP: int(EAP.TLS),
         Ent.CA_CERT: self.ca_cert,
         WifiEnums.SSID_KEY: self.ent_roaming_ssid,
         Ent.CLIENT_CERT: self.client_cert,
         Ent.PRIVATE_KEY_ID: self.client_key,
         Ent.IDENTITY: self.eap_identity,
     }
     self.config_ttls = {
         Ent.EAP: int(EAP.TTLS),
         Ent.CA_CERT: self.ca_cert,
         Ent.IDENTITY: self.eap_identity,
         Ent.PASSWORD: self.eap_password,
         Ent.PHASE2: int(EapPhase2.MSCHAPV2),
         WifiEnums.SSID_KEY: self.ent_roaming_ssid
     }
     self.config_sim = {
         Ent.EAP: int(EAP.SIM),
         WifiEnums.SSID_KEY: self.ent_roaming_ssid,
     }
     self.attenuators = wutils.group_attenuators(self.attenuators)
     self.attn_a = self.attenuators[0]
     self.attn_b = self.attenuators[1]
     # Set screen lock password so ConfigStore is unlocked.
     self.dut.droid.setDevicePassword(self.device_password)
     self.set_attns("default")
    def setup_class(self):
        super().setup_class()

        self.dut = self.android_devices[0]
        wutils.wifi_test_device_init(self.dut)
        self.unpack_userparams(req_param_names=[],
                               opt_param_names=["reference_networks"])

        if "AccessPoint" in self.user_params:
            self.legacy_configure_ap_and_start()

        asserts.assert_true(
            len(self.reference_networks) > 0,
            "Need at least one reference network with psk.")
        self.attenuators = wutils.group_attenuators(self.attenuators)
 def setup_class(self):
     self.default_scan_setting = {
         "band": wutils.WifiEnums.WIFI_BAND_BOTH_WITH_DFS,
         "periodInMs": SCANTIME,
         "reportEvents": wutils.WifiEnums.REPORT_EVENT_AFTER_EACH_SCAN,
         'numBssidsPerScan': 32
     }
     self.leeway = 5
     self.stime_channel = 47  #dwell time plus 2ms
     self.dut = self.android_devices[0]
     wutils.wifi_test_device_init(self.dut)
     self.attenuators = wutils.group_attenuators(self.attenuators)
     asserts.assert_true(
         self.dut.droid.wifiIsScannerSupported(),
         "Device %s doesn't support WifiScanner, abort." % self.dut.model)
     """It will setup the required dependencies and fetch the user params from
       config file"""
     self.attenuators[0].set_atten(0)
     self.attenuators[1].set_atten(0)
     req_params = ("bssid_2g", "bssid_5g", "bssid_dfs", "attenuator_id",
                   "max_bugreports")
     self.wifi_chs = wutils.WifiChannelUS(self.dut.model)
     self.unpack_userparams(req_params, two_ap_testbed=False)