Merge "Add dummy WmTests"
This commit is contained in:
committed by
Android (Google) Code Review
commit
82aca2a41d
@@ -49,6 +49,20 @@
|
||||
"exclude-annotation": "androidx.test.filters.FlakyTest"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "WmTests",
|
||||
"options": [
|
||||
{
|
||||
"include-filter": "com.android.server.am."
|
||||
},
|
||||
{
|
||||
"include-annotation": "android.platform.test.annotations.Presubmit"
|
||||
},
|
||||
{
|
||||
"exclude-annotation": "androidx.test.filters.FlakyTest"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"postsubmit": [
|
||||
@@ -65,6 +79,14 @@
|
||||
"include-filter": "com.android.server.am."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "WmTests",
|
||||
"options": [
|
||||
{
|
||||
"include-filter": "com.android.server.am."
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -24,6 +24,20 @@
|
||||
"exclude-annotation": "android.support.test.filters.FlakyTest"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "WmTests",
|
||||
"options": [
|
||||
{
|
||||
"include-filter": "com.android.server.wm."
|
||||
},
|
||||
{
|
||||
"include-annotation": "android.platform.test.annotations.Presubmit"
|
||||
},
|
||||
{
|
||||
"exclude-annotation": "android.support.test.filters.FlakyTest"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"postsubmit": [
|
||||
@@ -37,6 +51,14 @@
|
||||
"include-filter": "com.android.server.wm."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "WmTests",
|
||||
"options": [
|
||||
{
|
||||
"include-filter": "com.android.server.wm."
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
41
services/tests/wmtests/Android.mk
Normal file
41
services/tests/wmtests/Android.mk
Normal file
@@ -0,0 +1,41 @@
|
||||
#########################################################################
|
||||
# Build WmTests package
|
||||
#########################################################################
|
||||
|
||||
LOCAL_PATH:= $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
# We only want this apk build for tests.
|
||||
LOCAL_MODULE_TAGS := tests
|
||||
|
||||
# Include all test java files.
|
||||
LOCAL_SRC_FILES := \
|
||||
$(call all-java-files-under, src) \
|
||||
$(call all-java-files-under, ../servicestests/utils)
|
||||
|
||||
LOCAL_STATIC_JAVA_LIBRARIES := \
|
||||
androidx-test \
|
||||
mockito-target-minus-junit4 \
|
||||
platform-test-annotations \
|
||||
|
||||
LOCAL_JAVA_LIBRARIES := \
|
||||
android.test.mock \
|
||||
android.test.base \
|
||||
android.test.runner \
|
||||
|
||||
LOCAL_PACKAGE_NAME := WmTests
|
||||
LOCAL_PRIVATE_PLATFORM_APIS := true
|
||||
LOCAL_COMPATIBILITY_SUITE := device-tests
|
||||
|
||||
LOCAL_CERTIFICATE := platform
|
||||
|
||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
||||
|
||||
LOCAL_JACK_FLAGS := --multi-dex native
|
||||
LOCAL_DX_FLAGS := --multi-dex
|
||||
|
||||
LOCAL_PROGUARD_ENABLED := disabled
|
||||
|
||||
include $(BUILD_PACKAGE)
|
||||
|
||||
include $(call all-makefiles-under, $(LOCAL_PATH))
|
||||
31
services/tests/wmtests/AndroidManifest.xml
Normal file
31
services/tests/wmtests/AndroidManifest.xml
Normal file
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2018 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.android.frameworks.wmtests">
|
||||
|
||||
<!-- Uses API introduced in P (28) -->
|
||||
<uses-sdk
|
||||
android:minSdkVersion="1"
|
||||
android:targetSdkVersion="28" />
|
||||
|
||||
<application android:testOnly="true" />
|
||||
|
||||
<instrumentation
|
||||
android:name="androidx.test.runner.AndroidJUnitRunner"
|
||||
android:label="Window Manager Tests"
|
||||
android:targetPackage="com.android.frameworks.wmtests" />
|
||||
</manifest>
|
||||
32
services/tests/wmtests/AndroidTest.xml
Normal file
32
services/tests/wmtests/AndroidTest.xml
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2018 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<configuration description="Runs Window Manager Tests.">
|
||||
<option name="test-suite-tag" value="apct" />
|
||||
<option name="test-suite-tag" value="apct-instrumentation" />
|
||||
<target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
|
||||
<option name="cleanup-apks" value="true" />
|
||||
<option name="install-arg" value="-t" />
|
||||
<option name="test-file-name" value="WmTests.apk" />
|
||||
</target_preparer>
|
||||
|
||||
<option name="test-tag" value="WmTests" />
|
||||
<test class="com.android.tradefed.testtype.AndroidJUnitTest">
|
||||
<option name="package" value="com.android.frameworks.wmtests" />
|
||||
<option name="runner" value="androidx.test.runner.AndroidJUnitRunner" />
|
||||
<option name="hidden-api-checks" value="false" />
|
||||
</test>
|
||||
</configuration>
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright (C) 2018 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.am;
|
||||
|
||||
import android.platform.test.annotations.Presubmit;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import androidx.test.filters.FlakyTest;
|
||||
|
||||
/**
|
||||
* Dummy test for com.android.server.am.
|
||||
* TODO(b/113800711): Remove this class once the actual tests are moved from servicestests.
|
||||
*/
|
||||
public class DummyAmTests {
|
||||
|
||||
@Presubmit
|
||||
@Test
|
||||
public void preSubmitTest() {}
|
||||
|
||||
@FlakyTest
|
||||
@Presubmit
|
||||
@Test
|
||||
public void flakyPreSubmitTest() {}
|
||||
|
||||
@Test
|
||||
public void postSubmitTest() {}
|
||||
|
||||
@FlakyTest
|
||||
@Test
|
||||
public void flakyPostSubmitTest() {}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright (C) 2018 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.wm;
|
||||
|
||||
import android.platform.test.annotations.Presubmit;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import androidx.test.filters.FlakyTest;
|
||||
|
||||
/**
|
||||
* Dummy test for com.android.server.wm
|
||||
* TODO(b/113800711): Remove this class once the actual tests are moved from servicestests.
|
||||
*/
|
||||
public class DummyWmTests {
|
||||
|
||||
@Presubmit
|
||||
@Test
|
||||
public void preSubmitTest() {}
|
||||
|
||||
@FlakyTest
|
||||
@Presubmit
|
||||
@Test
|
||||
public void flakyPreSubmitTest() {}
|
||||
|
||||
@Test
|
||||
public void postSubmitTest() {}
|
||||
|
||||
@FlakyTest
|
||||
@Test
|
||||
public void flakyPostSubmitTest() {}
|
||||
}
|
||||
Reference in New Issue
Block a user