diff --git a/TEST_MAPPING b/TEST_MAPPING index 6f3671a06c..0ac09cc89b 100644 --- a/TEST_MAPPING +++ b/TEST_MAPPING @@ -22,6 +22,11 @@ "name": "TetheringIntegrationTests" } ], + "postsubmit": [ + { + "name": "TetheringPrivilegedTests" + } + ], "mainline-presubmit": [ { // TODO: add back the tethering modules when updatable in this branch diff --git a/Tethering/tests/privileged/src/android/net/ip/DadProxyTest.java b/Tethering/tests/privileged/src/android/net/ip/DadProxyTest.java index a933e1b277..23d9055745 100644 --- a/Tethering/tests/privileged/src/android/net/ip/DadProxyTest.java +++ b/Tethering/tests/privileged/src/android/net/ip/DadProxyTest.java @@ -31,6 +31,7 @@ import android.net.InetAddresses; import android.net.MacAddress; import android.net.util.InterfaceParams; import android.net.util.TetheringUtils; +import android.os.Build; import android.os.Handler; import android.os.HandlerThread; import android.os.IBinder; @@ -38,8 +39,9 @@ import android.os.Looper; import androidx.test.InstrumentationRegistry; import androidx.test.filters.SmallTest; -import androidx.test.runner.AndroidJUnit4; +import com.android.testutils.DevSdkIgnoreRule.IgnoreUpTo; +import com.android.testutils.DevSdkIgnoreRunner; import com.android.testutils.TapPacketReader; import com.android.testutils.TapPacketReaderRule; @@ -54,7 +56,8 @@ import org.mockito.MockitoAnnotations; import java.io.IOException; import java.nio.ByteBuffer; -@RunWith(AndroidJUnit4.class) +@RunWith(DevSdkIgnoreRunner.class) +@IgnoreUpTo(Build.VERSION_CODES.R) @SmallTest public class DadProxyTest { private static final int DATA_BUFFER_LEN = 4096; diff --git a/Tethering/tests/privileged/src/com/android/networkstack/tethering/BpfMapTest.java b/Tethering/tests/privileged/src/com/android/networkstack/tethering/BpfMapTest.java index 830729d98f..0deb17722a 100644 --- a/Tethering/tests/privileged/src/com/android/networkstack/tethering/BpfMapTest.java +++ b/Tethering/tests/privileged/src/com/android/networkstack/tethering/BpfMapTest.java @@ -31,9 +31,8 @@ import android.system.ErrnoException; import android.system.OsConstants; import android.util.ArrayMap; -import androidx.test.runner.AndroidJUnit4; - import com.android.testutils.DevSdkIgnoreRule.IgnoreUpTo; +import com.android.testutils.DevSdkIgnoreRunner; import org.junit.Before; import org.junit.BeforeClass; @@ -45,7 +44,7 @@ import java.util.NoSuchElementException; import java.util.concurrent.atomic.AtomicInteger; -@RunWith(AndroidJUnit4.class) +@RunWith(DevSdkIgnoreRunner.class) @IgnoreUpTo(Build.VERSION_CODES.R) public final class BpfMapTest { // Sync from packages/modules/Connectivity/Tethering/bpf_progs/offload.c.