Merge "Add CtsNetTestCasesLatestSdk to postsubmit" am: 10944b6376 am: a639a7b010
Original change: https://android-review.googlesource.com/c/platform/cts/+/1322430 Change-Id: I89e20ae03411ea60f32af95d8983667cb7197746
This commit is contained in:
@@ -82,6 +82,7 @@ android_test {
|
||||
min_sdk_version: "29",
|
||||
target_sdk_version: "29",
|
||||
test_suites: [
|
||||
"device-tests",
|
||||
"mts",
|
||||
],
|
||||
test_config_template: "AndroidTestTemplate.xml",
|
||||
|
||||
13
tests/cts/net/TEST_MAPPING
Normal file
13
tests/cts/net/TEST_MAPPING
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
// TODO: move to mainline-presubmit once supported
|
||||
"postsubmit": [
|
||||
{
|
||||
"name": "CtsNetTestCasesLatestSdk",
|
||||
"options": [
|
||||
{
|
||||
"exclude-annotation": "com.android.testutils.SkipPresubmit"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -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"
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user