Merge "Add CtsNetTestCasesLatestSdk to postsubmit" am: 10944b6376

Original change: https://android-review.googlesource.com/c/platform/cts/+/1322430

Change-Id: Id0b4cd8b3959f9600aaa31ad2e3b2500f7f9c29a
This commit is contained in:
Treehugger Robot
2020-06-05 04:48:13 +00:00
committed by Automerger Merge Worker
4 changed files with 23 additions and 0 deletions

View File

@@ -82,6 +82,7 @@ android_test {
min_sdk_version: "29",
target_sdk_version: "29",
test_suites: [
"device-tests",
"mts",
],
test_config_template: "AndroidTestTemplate.xml",

View File

@@ -0,0 +1,13 @@
{
// TODO: move to mainline-presubmit once supported
"postsubmit": [
{
"name": "CtsNetTestCasesLatestSdk",
"options": [
{
"exclude-annotation": "com.android.testutils.SkipPresubmit"
}
]
}
]
}

View File

@@ -96,6 +96,7 @@ import androidx.test.InstrumentationRegistry;
import androidx.test.runner.AndroidJUnit4;
import com.android.internal.util.ArrayUtils;
import com.android.testutils.SkipPresubmit;
import libcore.io.Streams;
@@ -325,6 +326,7 @@ public class ConnectivityManagerTest {
*/
@AppModeFull(reason = "Cannot get WifiManager in instant app mode")
@Test
@SkipPresubmit(reason = "Virtual devices use a single internet connection for all networks")
public void testOpenConnection() throws Exception {
boolean canRunTest = mPackageManager.hasSystemFeature(FEATURE_WIFI)
&& mPackageManager.hasSystemFeature(FEATURE_TELEPHONY);
@@ -990,6 +992,7 @@ public class ConnectivityManagerTest {
@AppModeFull(reason = "Cannot get WifiManager in instant app mode")
@Test
@SkipPresubmit(reason = "Keepalive is not supported on virtual hardware")
public void testCreateTcpKeepalive() throws Exception {
if (!mPackageManager.hasSystemFeature(FEATURE_WIFI)) {
Log.i(TAG, "testCreateTcpKeepalive cannot execute unless device supports WiFi");
@@ -1199,6 +1202,7 @@ public class ConnectivityManagerTest {
*/
@AppModeFull(reason = "Cannot get WifiManager in instant app mode")
@Test
@SkipPresubmit(reason = "Keepalive is not supported on virtual hardware")
public void testSocketKeepaliveLimitWifi() throws Exception {
if (!mPackageManager.hasSystemFeature(FEATURE_WIFI)) {
Log.i(TAG, "testSocketKeepaliveLimitWifi cannot execute unless device"
@@ -1252,6 +1256,7 @@ public class ConnectivityManagerTest {
*/
@AppModeFull(reason = "Cannot request network in instant app mode")
@Test
@SkipPresubmit(reason = "Keepalive is not supported on virtual hardware")
public void testSocketKeepaliveLimitTelephony() throws Exception {
if (!mPackageManager.hasSystemFeature(FEATURE_TELEPHONY)) {
Log.i(TAG, "testSocketKeepaliveLimitTelephony cannot execute unless device"
@@ -1294,6 +1299,7 @@ public class ConnectivityManagerTest {
*/
@AppModeFull(reason = "Cannot get WifiManager in instant app mode")
@Test
@SkipPresubmit(reason = "Keepalive is not supported on virtual hardware")
public void testSocketKeepaliveUnprivileged() throws Exception {
if (!mPackageManager.hasSystemFeature(FEATURE_WIFI)) {
Log.i(TAG, "testSocketKeepaliveUnprivileged cannot execute unless device"

View File

@@ -27,6 +27,8 @@ import android.os.SystemClock;
import android.test.AndroidTestCase;
import android.util.Log;
import com.android.testutils.SkipPresubmit;
import java.net.Inet4Address;
import java.net.Inet6Address;
import java.net.InetAddress;
@@ -68,6 +70,7 @@ public class DnsTest extends AndroidTestCase {
* Perf - measure size of first and second tier caches and their effect
* Assert requires network permission
*/
@SkipPresubmit(reason = "IPv6 support may be missing on presubmit virtual hardware")
public void testDnsWorks() throws Exception {
ensureIpv6Connectivity();