Merge "Add FrameworksCoreTests into PackageManager's test plan"

This commit is contained in:
TreeHugger Robot
2021-12-01 02:21:53 +00:00
committed by Android (Google) Code Review
21 changed files with 86 additions and 13 deletions

View File

@@ -1,5 +1,8 @@
{
"imports": [
{
"path": "frameworks/base/core/tests/coretests/src/android/content/pm"
},
{
"path": "frameworks/base/services/tests/PackageManagerServiceTests"
},

View File

@@ -19,9 +19,11 @@ package android.content.pm;
import static com.google.common.truth.Truth.assertThat;
import android.app.Person;
import android.platform.test.annotations.Presubmit;
import org.junit.Test;
@Presubmit
public class AppSearchPersonTest {
@Test

View File

@@ -21,14 +21,18 @@ import static com.google.common.truth.Truth.assertThat;
import android.app.Person;
import android.content.ComponentName;
import android.content.Intent;
import android.platform.test.annotations.Presubmit;
import android.util.ArraySet;
import org.junit.Ignore;
import org.junit.Test;
import java.util.Set;
@Presubmit
public class AppSearchShortcutInfoTest {
@Ignore("b/208375334")
@Test
public void testBuildShortcutAndGetValue() {
final String category =

View File

@@ -16,16 +16,16 @@
package android.content.pm;
import android.content.Context;
import android.content.Intent;
import android.os.UserHandle;
import android.platform.test.annotations.Presubmit;
import android.test.AndroidTestCase;
import android.view.inputmethod.InputMethodInfo;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
@Presubmit
public class AppsQueryHelperTests extends AndroidTestCase {
private AppsQueryHelper mAppsQueryHelper;

View File

@@ -23,6 +23,7 @@ import static android.content.pm.PackageManager.GET_DISABLED_COMPONENTS;
import android.content.ComponentName;
import android.content.Intent;
import android.platform.test.annotations.Presubmit;
import android.test.AndroidTestCase;
import androidx.test.filters.MediumTest;
@@ -48,6 +49,7 @@ import java.util.List;
* would fix this.
*/
@Suppress // Failing.
@Presubmit
public class ComponentTest extends AndroidTestCase {
private PackageManager mPackageManager;

View File

@@ -16,6 +16,7 @@
package android.content.pm;
import android.platform.test.annotations.Presubmit;
import android.test.AndroidTestCase;
import androidx.test.filters.MediumTest;
@@ -25,6 +26,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
@Presubmit
public class LimitedLengthInputStreamTest extends AndroidTestCase {
private final byte[] TEST_STRING1 = "This is a test".getBytes();

View File

@@ -16,6 +16,7 @@
package android.content.pm;
import android.platform.test.annotations.Presubmit;
import android.test.AndroidTestCase;
import androidx.test.filters.LargeTest;
@@ -29,6 +30,7 @@ import javax.crypto.Mac;
import javax.crypto.SecretKey;
import javax.crypto.spec.SecretKeySpec;
@Presubmit
@LargeTest
public class MacAuthenticatedInputStreamTest extends AndroidTestCase {

View File

@@ -21,6 +21,7 @@ import static android.os.storage.VolumeInfo.STATE_MOUNTED;
import android.content.Context;
import android.os.storage.StorageManager;
import android.os.storage.VolumeInfo;
import android.platform.test.annotations.Presubmit;
import android.test.AndroidTestCase;
import android.util.Log;
@@ -34,6 +35,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
@Presubmit
public class PackageHelperTests extends AndroidTestCase {
private static final boolean localLOGV = true;
public static final String TAG = "PackageHelperTests";

View File

@@ -24,12 +24,14 @@ import static org.junit.Assert.fail;
import android.content.pm.PackageManager.Property;
import android.os.Bundle;
import android.platform.test.annotations.Presubmit;
import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
@Presubmit
@RunWith(AndroidJUnit4.class)
public class PackageManagerPropertyTests {

View File

@@ -50,6 +50,7 @@ import android.os.Process;
import android.os.RemoteException;
import android.os.StatFs;
import android.os.SystemClock;
import android.platform.test.annotations.Presubmit;
import android.provider.Settings;
import android.provider.Settings.SettingNotFoundException;
import android.system.ErrnoException;
@@ -85,6 +86,7 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.SynchronousQueue;
import java.util.concurrent.TimeUnit;
@Presubmit
public class PackageManagerTests extends AndroidTestCase {
private static final boolean localLOGV = true;

View File

@@ -22,6 +22,7 @@ import android.content.pm.PackageParserCacheHelper.ReadHelper;
import android.content.pm.PackageParserCacheHelper.WriteHelper;
import android.os.Bundle;
import android.os.Parcel;
import android.platform.test.annotations.Presubmit;
import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
@@ -29,6 +30,7 @@ import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
@Presubmit
@SmallTest
@RunWith(AndroidJUnit4.class)
public class PackageParserCacheHelperTest {

View File

@@ -22,6 +22,7 @@ import static java.util.function.Function.identity;
import android.content.pm.PackagePartitions.SystemPartition;
import android.os.SystemProperties;
import android.platform.test.annotations.Presubmit;
import androidx.test.runner.AndroidJUnit4;
@@ -30,6 +31,7 @@ import org.junit.runner.RunWith;
import java.util.ArrayList;
@Presubmit
@RunWith(AndroidJUnit4.class)
public class PackagePartitionsTest {

View File

@@ -18,6 +18,7 @@ package android.content.pm;
import android.os.Parcel;
import android.os.Parcelable;
import android.platform.test.annotations.Presubmit;
import androidx.test.filters.LargeTest;
@@ -27,6 +28,7 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@Presubmit
@LargeTest
public class ParceledListSliceTest extends TestCase {

View File

@@ -21,6 +21,7 @@ import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import android.os.Parcel;
import android.platform.test.annotations.Presubmit;
import android.util.ArraySet;
import androidx.test.ext.junit.runners.AndroidJUnit4;
@@ -28,6 +29,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
@Presubmit
@RunWith(AndroidJUnit4.class)
public final class PermissionInfoTest {
private static final String KNOWN_CERT_DIGEST_1 =

View File

@@ -21,6 +21,7 @@ import android.os.FileUtils;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.UserHandle;
import android.platform.test.annotations.Presubmit;
import android.test.AndroidTestCase;
import android.util.AttributeSet;
import android.util.SparseArray;
@@ -45,6 +46,7 @@ import java.util.Set;
/**
* Tests for {@link android.content.pm.RegisteredServicesCache}
*/
@Presubmit
@LargeTest
public class RegisteredServicesCacheTest extends AndroidTestCase {
private static final int U0 = 0;

View File

@@ -16,10 +16,13 @@
package android.content.pm;
import android.platform.test.annotations.Presubmit;
import androidx.test.filters.LargeTest;
import junit.framework.TestCase;
@Presubmit
@LargeTest
public class SignatureTest extends TestCase {

View File

@@ -27,6 +27,7 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import android.platform.test.annotations.Presubmit;
import android.util.ArraySet;
import android.util.PackageUtils;
@@ -38,6 +39,7 @@ import org.junit.runner.RunWith;
import java.util.Set;
@Presubmit
@RunWith(AndroidJUnit4.class)
@SmallTest
public class SigningDetailsTest {

View File

@@ -0,0 +1,40 @@
{
"presubmit-large": [
{
"name": "FrameworksCoreTests",
"options": [
{
"include-filter": "android.content.pm."
},
{
"include-annotation": "android.platform.test.annotations.Presubmit"
},
{
"exclude-annotation": "androidx.test.filters.FlakyTest"
},
{
"exclude-annotation": "org.junit.Ignore"
}
]
}
],
"postsubmit": [
{
"name": "FrameworksCoreTests",
"options": [
{
"include-filter": "android.content.pm."
},
{
"include-annotation": "android.platform.test.annotations.Postsubmit"
},
{
"exclude-annotation": "androidx.test.filters.FlakyTest"
},
{
"exclude-annotation": "org.junit.Ignore"
}
]
}
]
}

View File

@@ -17,11 +17,15 @@
package android.content.pm;
import android.os.Parcel;
import android.platform.test.annotations.Presubmit;
import androidx.test.filters.LargeTest;
import org.junit.Ignore;
import java.util.Random;
@Presubmit
@LargeTest
public class VerifierDeviceIdentityTest extends android.test.AndroidTestCase {
private static final long TEST_1 = 0x7A5F00FF5A55AAA5L;
@@ -151,6 +155,7 @@ public class VerifierDeviceIdentityTest extends android.test.AndroidTestCase {
}
}
@Ignore("b/208373220")
public void testVerifierDeviceIdentity_Generate_MinValue() {
VerifierDeviceIdentity id1 = new VerifierDeviceIdentity(TEST_MINVALUE);
@@ -162,6 +167,7 @@ public class VerifierDeviceIdentityTest extends android.test.AndroidTestCase {
+ " should be the same", id1, id2);
}
@Ignore("b/208373220")
public void testVerifierDeviceIdentity_Generate_Random() {
VerifierDeviceIdentity id1 = new VerifierDeviceIdentity(TEST_1);

View File

@@ -18,6 +18,7 @@ package android.content.pm.parsing.result
import android.content.pm.PackageManager
import android.os.Build
import android.platform.test.annotations.Presubmit
import com.google.common.truth.Truth.assertThat
import org.junit.After
import org.junit.Assume.assumeFalse
@@ -34,6 +35,7 @@ import org.mockito.Mockito.verify
import org.mockito.Mockito.verifyNoMoreInteractions
import java.io.IOException
@Presubmit
class ParseInputAndResultTest {
companion object {

View File

@@ -76,17 +76,6 @@
}
]
},
{
"name": "FrameworksCoreTests",
"options": [
{
"include-filter": "android.content.pm.PackageManagerTests"
},
{
"exclude-annotation": "androidx.test.filters.Suppress"
}
]
},
{
"name": "PackageManagerServiceHostTests",
"options": [