add FrameworkCoreTest for AndroidResources test plan
This patch adds Android Resources related tests plan into presubmit process. * FrameworkCoreTest:android.content.res * FrameworkCoreTest:com.android.internal.content.res http://ab/I37600009999426943 * cuttlefish * 2 minutes and 10.8 seconds * 5 test classes * 22 tests Test: atest --request-upload-result \ -p frameworks/base/core/java/android/content/res Test: CORETESTS="frameworks/base/core/tests/coretests" ; \ atest -p \ ${CORETESTS}/src/android/content/res:postsubmit Test: CORETESTS="frameworks/base/core/tests/coretests" ; \ atest --collect-tests-only -p \ ${CORETESTS}/src/android/content/res:presubmit Test: CORETESTS="frameworks/base/core/tests/coretests" ; \ atest --collect-tests-only -p \ ${CORETESTS}/src/com/android/internal/content/res:presubmit Test: TP="FrameworksCoreTests:android.content.res" ; atest \ ${TP}.ConfigurationBoundResourceCacheTest \ ${TP}.ConfigurationTest \ ${TP}.FontResourcesParserTest \ ${TP}.ResourcesDrawableTest \ ${TP}.ResourcesLocaleTest Test: TP="FrameworksCoreTests:com.android.internal.content.res" ; \ atest \ ${TP}.OverlayConfigTest Bug: 180650365 Change-Id: Iad83abf18d1d0ab438faef3bfab62139baadbb18
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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> {
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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";
|
||||
|
||||
43
core/tests/coretests/src/android/content/res/TEST_MAPPING
Normal file
43
core/tests/coretests/src/android/content/res/TEST_MAPPING
Normal 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"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -24,6 +24,7 @@ import static org.junit.Assert.assertTrue;
|
||||
|
||||
import android.os.FileUtils;
|
||||
import android.os.SystemProperties;
|
||||
import android.platform.test.annotations.Presubmit;
|
||||
|
||||
import androidx.test.InstrumentationRegistry;
|
||||
import androidx.test.runner.AndroidJUnit4;
|
||||
@@ -46,6 +47,7 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
|
||||
@Presubmit
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class OverlayConfigTest {
|
||||
private static final String TEST_APK_PACKAGE_NAME =
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user