Merge "cts: skip wifi related tests if wifi is unsupported" into oc-dev
am: 73a81b18cd
Change-Id: Iabc2d520201900ffa4930b90fb0a534053f357d9
This commit is contained in:
@@ -789,24 +789,40 @@ public class ConnectivityManagerTest extends AndroidTestCase {
|
|||||||
|
|
||||||
/** Verify that accept_ra_rt_info_min_plen exists and is set to the expected value */
|
/** Verify that accept_ra_rt_info_min_plen exists and is set to the expected value */
|
||||||
public void testAcceptRaRtInfoMinPlen() throws Exception {
|
public void testAcceptRaRtInfoMinPlen() throws Exception {
|
||||||
|
if (!mPackageManager.hasSystemFeature(PackageManager.FEATURE_WIFI)) {
|
||||||
|
Log.i(TAG, "testConnectivityChanged_manifestRequestOnlyPreN_shouldReceiveIntent cannot execute unless device supports WiFi");
|
||||||
|
return;
|
||||||
|
}
|
||||||
Scanner s = makeWifiSysctlScanner("accept_ra_rt_info_min_plen");
|
Scanner s = makeWifiSysctlScanner("accept_ra_rt_info_min_plen");
|
||||||
assertEquals(IPV6_WIFI_ACCEPT_RA_RT_INFO_MIN_PLEN, s.nextInt());
|
assertEquals(IPV6_WIFI_ACCEPT_RA_RT_INFO_MIN_PLEN, s.nextInt());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Verify that accept_ra_rt_info_max_plen exists and is set to the expected value */
|
/** Verify that accept_ra_rt_info_max_plen exists and is set to the expected value */
|
||||||
public void testAcceptRaRtInfoMaxPlen() throws Exception {
|
public void testAcceptRaRtInfoMaxPlen() throws Exception {
|
||||||
|
if (!mPackageManager.hasSystemFeature(PackageManager.FEATURE_WIFI)) {
|
||||||
|
Log.i(TAG, "testConnectivityChanged_manifestRequestOnlyPreN_shouldReceiveIntent cannot execute unless device supports WiFi");
|
||||||
|
return;
|
||||||
|
}
|
||||||
Scanner s = makeWifiSysctlScanner("accept_ra_rt_info_max_plen");
|
Scanner s = makeWifiSysctlScanner("accept_ra_rt_info_max_plen");
|
||||||
assertEquals(IPV6_WIFI_ACCEPT_RA_RT_INFO_MAX_PLEN, s.nextInt());
|
assertEquals(IPV6_WIFI_ACCEPT_RA_RT_INFO_MAX_PLEN, s.nextInt());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Verify that router_solicitations exists and is set to the expected value */
|
/** Verify that router_solicitations exists and is set to the expected value */
|
||||||
public void testRouterSolicitations() throws Exception {
|
public void testRouterSolicitations() throws Exception {
|
||||||
|
if (!mPackageManager.hasSystemFeature(PackageManager.FEATURE_WIFI)) {
|
||||||
|
Log.i(TAG, "testConnectivityChanged_manifestRequestOnlyPreN_shouldReceiveIntent cannot execute unless device supports WiFi");
|
||||||
|
return;
|
||||||
|
}
|
||||||
Scanner s = makeWifiSysctlScanner("router_solicitations");
|
Scanner s = makeWifiSysctlScanner("router_solicitations");
|
||||||
assertEquals(IPV6_WIFI_ROUTER_SOLICITATIONS, s.nextInt());
|
assertEquals(IPV6_WIFI_ROUTER_SOLICITATIONS, s.nextInt());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Verify that router_solicitation_max_interval exists and is in an acceptable interval */
|
/** Verify that router_solicitation_max_interval exists and is in an acceptable interval */
|
||||||
public void testRouterSolicitationMaxInterval() throws Exception {
|
public void testRouterSolicitationMaxInterval() throws Exception {
|
||||||
|
if (!mPackageManager.hasSystemFeature(PackageManager.FEATURE_WIFI)) {
|
||||||
|
Log.i(TAG, "testConnectivityChanged_manifestRequestOnlyPreN_shouldReceiveIntent cannot execute unless device supports WiFi");
|
||||||
|
return;
|
||||||
|
}
|
||||||
Scanner s = makeWifiSysctlScanner("router_solicitation_max_interval");
|
Scanner s = makeWifiSysctlScanner("router_solicitation_max_interval");
|
||||||
int interval = s.nextInt();
|
int interval = s.nextInt();
|
||||||
// Verify we're in the interval [15 minutes, 60 minutes]. Lower values may adversely
|
// Verify we're in the interval [15 minutes, 60 minutes]. Lower values may adversely
|
||||||
|
|||||||
@@ -583,6 +583,10 @@ public class WifiManagerTest extends AndroidTestCase {
|
|||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public void testAddPasspointConfigWithUserCredential() throws Exception {
|
public void testAddPasspointConfigWithUserCredential() throws Exception {
|
||||||
|
if (!WifiFeature.isWifiSupported(getContext())) {
|
||||||
|
// skip the test if WiFi is not supported
|
||||||
|
return;
|
||||||
|
}
|
||||||
testAddPasspointConfig(generatePasspointConfig(generateUserCredential()));
|
testAddPasspointConfig(generatePasspointConfig(generateUserCredential()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -593,6 +597,10 @@ public class WifiManagerTest extends AndroidTestCase {
|
|||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public void testAddPasspointConfigWithCertCredential() throws Exception {
|
public void testAddPasspointConfigWithCertCredential() throws Exception {
|
||||||
|
if (!WifiFeature.isWifiSupported(getContext())) {
|
||||||
|
// skip the test if WiFi is not supported
|
||||||
|
return;
|
||||||
|
}
|
||||||
testAddPasspointConfig(generatePasspointConfig(generateCertCredential()));
|
testAddPasspointConfig(generatePasspointConfig(generateCertCredential()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -603,6 +611,10 @@ public class WifiManagerTest extends AndroidTestCase {
|
|||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public void testAddPasspointConfigWithSimCredential() throws Exception {
|
public void testAddPasspointConfigWithSimCredential() throws Exception {
|
||||||
|
if (!WifiFeature.isWifiSupported(getContext())) {
|
||||||
|
// skip the test if WiFi is not supported
|
||||||
|
return;
|
||||||
|
}
|
||||||
testAddPasspointConfig(generatePasspointConfig(generateSimCredential()));
|
testAddPasspointConfig(generatePasspointConfig(generateSimCredential()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user