Rename WM test filter to FrameworksTestsFilter
This CL adds android.view.InsetsAnimationControllerImplTest to the
test filter, and adds a comment to each tests mentioning about
FrameworksTestsFilter.
Test: Pass all 91 non-flaky presubmit tests in FrameworksCoreTests
using FrameworksTestsFilter
$ tradefed.sh run commandAndExit FrameworksCoreTests \
--instrumentation-arg selectTest=com.android.server.wm. \
--instrumentation-arg filter=com.android.server.wm.test.filters.FrameworksTestsFilter
--include-annotation android.platform.test.annotations.Presubmit \
--exclude-annotation androidx.test.filters.FlakyTest
Bug: 122451194
Change-Id: I9592ff01158eec1b4ef4d0dd22be243e10bd198e
This commit is contained in:
@@ -30,6 +30,15 @@ import androidx.test.runner.AndroidJUnit4;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
/**
|
||||
* Tests for {@link ClientTransaction}.
|
||||
*
|
||||
* <p>Build/Install/Run:
|
||||
* atest FrameworksCoreTests:ClientTransactionTests
|
||||
*
|
||||
* <p>This test class is a part of Window Manager Service tests and specified in
|
||||
* {@link com.android.server.wm.test.filters.FrameworksTestsFilter}.
|
||||
*/
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
@SmallTest
|
||||
@Presubmit
|
||||
|
||||
@@ -42,6 +42,15 @@ import androidx.test.runner.AndroidJUnit4;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
/**
|
||||
* Tests for {@link ObjectPool}.
|
||||
*
|
||||
* <p>Build/Install/Run:
|
||||
* atest FrameworksCoreTests:ObjectPoolTests
|
||||
*
|
||||
* <p>This test class is a part of Window Manager Service tests and specified in
|
||||
* {@link com.android.server.wm.test.filters.FrameworksTestsFilter}.
|
||||
*/
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
@SmallTest
|
||||
@Presubmit
|
||||
|
||||
@@ -26,9 +26,8 @@ import static android.app.servertransaction.ActivityLifecycleItem.ON_STOP;
|
||||
import static android.app.servertransaction.ActivityLifecycleItem.PRE_ON_CREATE;
|
||||
import static android.app.servertransaction.ActivityLifecycleItem.UNDEFINED;
|
||||
|
||||
import static junit.framework.Assert.assertEquals;
|
||||
|
||||
import static org.junit.Assert.assertArrayEquals;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
import static org.mockito.ArgumentMatchers.eq;
|
||||
import static org.mockito.Mockito.inOrder;
|
||||
@@ -61,7 +60,15 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/** Test {@link TransactionExecutor} logic. */
|
||||
/**
|
||||
* Test {@link TransactionExecutor} logic.
|
||||
*
|
||||
* <p>Build/Install/Run:
|
||||
* atest FrameworksCoreTests:TransactionExecutorTests
|
||||
*
|
||||
* <p>This test class is a part of Window Manager Service tests and specified in
|
||||
* {@link com.android.server.wm.test.filters.FrameworksTestsFilter}.
|
||||
*/
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
@SmallTest
|
||||
@Presubmit
|
||||
|
||||
@@ -21,8 +21,8 @@ import static android.app.servertransaction.TestUtils.mergedConfig;
|
||||
import static android.app.servertransaction.TestUtils.referrerIntentList;
|
||||
import static android.app.servertransaction.TestUtils.resultInfoList;
|
||||
|
||||
import static junit.framework.Assert.assertEquals;
|
||||
import static junit.framework.Assert.assertTrue;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import android.app.IApplicationThread;
|
||||
import android.app.IInstrumentationWatcher;
|
||||
@@ -64,7 +64,15 @@ import org.junit.runner.RunWith;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/** Test parcelling and unparcelling of transactions and transaction items. */
|
||||
/**
|
||||
* Test parcelling and unparcelling of transactions and transaction items.
|
||||
*
|
||||
* <p>Build/Install/Run:
|
||||
* atest FrameworksCoreTests:TransactionParcelTests
|
||||
*
|
||||
* <p>This test class is a part of Window Manager Service tests and specified in
|
||||
* {@link com.android.server.wm.test.filters.FrameworksTestsFilter}.
|
||||
*/
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
@SmallTest
|
||||
@Presubmit
|
||||
|
||||
@@ -44,6 +44,15 @@ import org.junit.runner.RunWith;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
|
||||
/**
|
||||
* Tests for {@link DisplayCutout}.
|
||||
*
|
||||
* <p>Build/Install/Run:
|
||||
* atest FrameworksCoreTests:DisplayCutoutTest
|
||||
*
|
||||
* <p>This test class is a part of Window Manager Service tests and specified in
|
||||
* {@link com.android.server.wm.test.filters.FrameworksTestsFilter}.
|
||||
*/
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
@SmallTest
|
||||
@Presubmit
|
||||
|
||||
@@ -18,18 +18,15 @@ package android.view;
|
||||
|
||||
import static android.view.InsetsState.TYPE_NAVIGATION_BAR;
|
||||
import static android.view.InsetsState.TYPE_TOP_BAR;
|
||||
|
||||
import static android.view.ViewRootImpl.NEW_INSETS_MODE_FULL;
|
||||
import static android.view.WindowInsets.Type.sideBars;
|
||||
import static android.view.WindowInsets.Type.systemBars;
|
||||
import static android.view.WindowInsets.Type.topBar;
|
||||
import static junit.framework.Assert.assertEquals;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
import static org.mockito.ArgumentMatchers.eq;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
@@ -55,6 +52,15 @@ import org.mockito.MockitoAnnotations;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Tests for {@link InsetsAnimationControlImpl}.
|
||||
*
|
||||
* <p>Build/Install/Run:
|
||||
* atest FrameworksCoreTests:InsetsAnimationControlImplTest
|
||||
*
|
||||
* <p>This test class is a part of Window Manager Service tests and specified in
|
||||
* {@link com.android.server.wm.test.filters.FrameworksTestsFilter}.
|
||||
*/
|
||||
@Presubmit
|
||||
@FlakyTest(detail = "Promote once confirmed non-flaky")
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
|
||||
@@ -19,13 +19,13 @@ package android.view;
|
||||
import static android.view.InsetsState.TYPE_IME;
|
||||
import static android.view.InsetsState.TYPE_NAVIGATION_BAR;
|
||||
import static android.view.InsetsState.TYPE_TOP_BAR;
|
||||
|
||||
import static android.view.WindowInsets.Type.topBar;
|
||||
import static android.view.WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE;
|
||||
import static junit.framework.Assert.assertEquals;
|
||||
import static junit.framework.Assert.assertFalse;
|
||||
import static junit.framework.Assert.assertNull;
|
||||
import static junit.framework.Assert.assertTrue;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
import static org.mockito.ArgumentMatchers.anyInt;
|
||||
import static org.mockito.Mockito.mock;
|
||||
@@ -53,6 +53,15 @@ import org.mockito.ArgumentCaptor;
|
||||
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
|
||||
/**
|
||||
* Tests for {@link InsetsController}.
|
||||
*
|
||||
* <p>Build/Install/Run:
|
||||
* atest FrameworksCoreTests:InsetsControllerTest
|
||||
*
|
||||
* <p>This test class is a part of Window Manager Service tests and specified in
|
||||
* {@link com.android.server.wm.test.filters.FrameworksTestsFilter}.
|
||||
*/
|
||||
@Presubmit
|
||||
@FlakyTest(detail = "Promote once confirmed non-flaky")
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
|
||||
@@ -43,6 +43,15 @@ import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
|
||||
/**
|
||||
* Tests for {@link InsetsSourceConsumer}.
|
||||
*
|
||||
* <p>Build/Install/Run:
|
||||
* atest FrameworksCoreTests:InsetsSourceConsumerTest
|
||||
*
|
||||
* <p>This test class is a part of Window Manager Service tests and specified in
|
||||
* {@link com.android.server.wm.test.filters.FrameworksTestsFilter}.
|
||||
*/
|
||||
@Presubmit
|
||||
@FlakyTest(detail = "Promote once confirmed non-flaky")
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
|
||||
@@ -18,7 +18,7 @@ package android.view;
|
||||
|
||||
import static android.view.InsetsState.TYPE_NAVIGATION_BAR;
|
||||
|
||||
import static junit.framework.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import android.graphics.Insets;
|
||||
import android.graphics.Rect;
|
||||
@@ -31,6 +31,15 @@ import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
/**
|
||||
* Tests for {@link InsetsSource}.
|
||||
*
|
||||
* <p>Build/Install/Run:
|
||||
* atest FrameworksCoreTests:InsetsSourceTest
|
||||
*
|
||||
* <p>This test class is a part of Window Manager Service tests and specified in
|
||||
* {@link com.android.server.wm.test.filters.FrameworksTestsFilter}.
|
||||
*/
|
||||
@Presubmit
|
||||
@FlakyTest(detail = "Promote once confirmed non-flaky")
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
|
||||
@@ -24,14 +24,13 @@ import static android.view.InsetsState.TYPE_SIDE_BAR_1;
|
||||
import static android.view.InsetsState.TYPE_SIDE_BAR_2;
|
||||
import static android.view.InsetsState.TYPE_SIDE_BAR_3;
|
||||
import static android.view.InsetsState.TYPE_TOP_BAR;
|
||||
|
||||
import static android.view.WindowInsets.Type.ime;
|
||||
import static android.view.WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE;
|
||||
import static junit.framework.Assert.assertEquals;
|
||||
import static junit.framework.Assert.assertFalse;
|
||||
import static junit.framework.Assert.assertTrue;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertNotEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import android.graphics.Insets;
|
||||
import android.graphics.Rect;
|
||||
@@ -47,6 +46,15 @@ import androidx.test.runner.AndroidJUnit4;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
/**
|
||||
* Tests for {@link InsetsState}.
|
||||
*
|
||||
* <p>Build/Install/Run:
|
||||
* atest FrameworksCoreTests:InsetsStateTest
|
||||
*
|
||||
* <p>This test class is a part of Window Manager Service tests and specified in
|
||||
* {@link com.android.server.wm.test.filters.FrameworksTestsFilter}.
|
||||
*/
|
||||
@Presubmit
|
||||
@FlakyTest(detail = "Promote once confirmed non-flaky")
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
|
||||
@@ -22,12 +22,11 @@ import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
|
||||
import static com.android.dx.mockito.inline.extended.ExtendedMockito.verify;
|
||||
import static com.android.dx.mockito.inline.extended.ExtendedMockito.verifyZeroInteractions;
|
||||
|
||||
import static junit.framework.Assert.assertFalse;
|
||||
import static junit.framework.Assert.assertTrue;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import android.platform.test.annotations.Presubmit;
|
||||
|
||||
import androidx.test.filters.FlakyTest;
|
||||
import androidx.test.filters.SmallTest;
|
||||
|
||||
import org.junit.Before;
|
||||
|
||||
@@ -24,9 +24,9 @@ import static android.view.WindowManager.TRANSIT_TASK_CHANGE_WINDOWING_MODE;
|
||||
import static android.view.WindowManager.TRANSIT_TASK_CLOSE;
|
||||
import static android.view.WindowManager.TRANSIT_TASK_OPEN;
|
||||
|
||||
import static junit.framework.Assert.assertEquals;
|
||||
import static junit.framework.Assert.assertFalse;
|
||||
import static junit.framework.Assert.assertTrue;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import android.platform.test.annotations.Presubmit;
|
||||
import android.view.WindowManager;
|
||||
|
||||
@@ -18,11 +18,10 @@ package com.android.server.wm;
|
||||
|
||||
import static com.google.common.truth.Truth.assertWithMessage;
|
||||
|
||||
import static junit.framework.Assert.assertNull;
|
||||
import static junit.framework.Assert.assertSame;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.junit.Assert.assertSame;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import android.os.SystemClock;
|
||||
|
||||
@@ -18,8 +18,8 @@ package com.android.server.wm;
|
||||
|
||||
import static android.view.WindowManager.LayoutParams.FIRST_APPLICATION_WINDOW;
|
||||
|
||||
import static junit.framework.Assert.assertNotNull;
|
||||
import static junit.framework.Assert.assertNull;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNull;
|
||||
|
||||
import android.platform.test.annotations.Presubmit;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ import static android.view.WindowManager.TRANSIT_UNSET;
|
||||
import static com.android.server.wm.TaskSnapshotController.SNAPSHOT_MODE_APP_THEME;
|
||||
import static com.android.server.wm.TaskSnapshotController.SNAPSHOT_MODE_REAL;
|
||||
|
||||
import static junit.framework.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import android.platform.test.annotations.Presubmit;
|
||||
import android.util.ArraySet;
|
||||
|
||||
@@ -16,9 +16,8 @@
|
||||
|
||||
package com.android.server.wm;
|
||||
|
||||
import static junit.framework.Assert.assertTrue;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import android.os.SystemClock;
|
||||
import android.platform.test.annotations.Presubmit;
|
||||
|
||||
import androidx.test.filters.SmallTest;
|
||||
|
||||
@@ -26,23 +26,25 @@ import com.android.test.filters.SelectTest;
|
||||
* <p>Use this filter when running FrameworksCoreTests as
|
||||
* <pre>
|
||||
* adb shell am instrument -w \
|
||||
* -e filter com.android.server.wm.test.filters.CoreTestsFilter \
|
||||
* -e filter com.android.server.wm.test.filters.FrameworksTestsFilter \
|
||||
* -e selectTest_verbose true \
|
||||
* com.android.frameworks.coretests/androidx.test.runner.AndroidJUnitRunner
|
||||
* </pre>
|
||||
*/
|
||||
public final class CoreTestsFilter extends SelectTest {
|
||||
public final class FrameworksTestsFilter extends SelectTest {
|
||||
|
||||
private static final String[] SELECTED_CORE_TESTS = {
|
||||
private static final String[] SELECTED_TESTS = {
|
||||
// Test specifications for FrameworksCoreTests.
|
||||
"android.app.servertransaction.", // all tests under the package.
|
||||
"android.view.DisplayCutoutTest",
|
||||
"android.view.InsetsAnimationControlImplTest",
|
||||
"android.view.InsetsControllerTest",
|
||||
"android.view.InsetsSourceTest",
|
||||
"android.view.InsetsSourceConsumerTest",
|
||||
"android.view.InsetsStateTest",
|
||||
};
|
||||
|
||||
public CoreTestsFilter(Bundle testArgs) {
|
||||
super(addSelectTest(testArgs, SELECTED_CORE_TESTS));
|
||||
public FrameworksTestsFilter(Bundle testArgs) {
|
||||
super(addSelectTest(testArgs, SELECTED_TESTS));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user