Merge "add FrameworkCoreTest for AndroidResources test plan"

This commit is contained in:
Yurii Zubrytskyi
2022-01-11 07:18:41 +00:00
committed by Android (Google) Code Review
8 changed files with 82 additions and 0 deletions

View File

@@ -1,4 +1,12 @@
{
"imports": [
{
"path": "frameworks/base/core/tests/coretests/src/android/content/res"
},
{
"path": "frameworks/base/core/tests/coretests/src/com/android/internal/content/res"
}
],
"presubmit": [
{
"name": "CtsResourcesLoaderTests"

View File

@@ -16,6 +16,7 @@
package android.content.res;
import android.platform.test.annotations.Presubmit;
import android.test.ActivityInstrumentationTestCase2;
import android.util.TypedValue;
@@ -25,6 +26,7 @@ import com.android.frameworks.coretests.R;
import java.lang.reflect.InvocationTargetException;
@Presubmit
public class ConfigurationBoundResourceCacheTest
extends ActivityInstrumentationTestCase2<ResourceCacheActivity> {

View File

@@ -27,6 +27,7 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import android.app.Instrumentation;
import android.platform.test.annotations.Presubmit;
import androidx.test.InstrumentationRegistry;
import androidx.test.filters.SmallTest;
@@ -45,6 +46,7 @@ import java.util.List;
/**
* Tests for {@link FontResourcesParser}.
*/
@Presubmit
@SmallTest
@RunWith(AndroidJUnit4.class)
public class FontResourcesParserTest {

View File

@@ -24,6 +24,7 @@ import android.content.Context;
import android.graphics.drawable.ColorStateListDrawable;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.LayerDrawable;
import android.platform.test.annotations.Presubmit;
import androidx.test.InstrumentationRegistry;
import androidx.test.filters.SmallTest;
@@ -34,6 +35,7 @@ import com.android.frameworks.coretests.R;
import org.junit.Test;
import org.junit.runner.RunWith;
@Presubmit
@SmallTest
@RunWith(AndroidJUnit4.class)
public class ResourcesDrawableTest {

View File

@@ -18,6 +18,7 @@ package android.content.res;
import android.os.FileUtils;
import android.os.LocaleList;
import android.platform.test.annotations.Presubmit;
import android.test.AndroidTestCase;
import android.util.DisplayMetrics;
@@ -30,6 +31,7 @@ import java.io.InputStream;
import java.util.Arrays;
import java.util.Locale;
@Presubmit
public class ResourcesLocaleTest extends AndroidTestCase {
private String extractApkAndGetPath(int id) throws Exception {

View File

@@ -20,6 +20,7 @@ import android.annotation.NonNull;
import android.app.ResourcesManager;
import android.os.Binder;
import android.os.LocaleList;
import android.platform.test.annotations.Postsubmit;
import android.util.DisplayMetrics;
import android.util.TypedValue;
import android.view.Display;
@@ -32,6 +33,7 @@ import junit.framework.TestCase;
import java.util.HashMap;
import java.util.Map;
@Postsubmit
public class ResourcesManagerTest extends TestCase {
private static final int SECONDARY_DISPLAY_ID = 1;
private static final String APP_ONE_RES_DIR = "app_one.apk";

View File

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

View File

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