summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-prod (mdb) <android-build-team-robot@google.com>2018-10-12 02:16:14 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-10-12 02:16:14 +0000
commit4a589b9de052934ac068d700a34c20bade928998 (patch)
tree951a32a566cb3a0af1ae0062249e5af5b29f923a
parentc70c965749ed3d0fdc29a21f939b488af618912a (diff)
parent52497b20034e3a74fde63e74883426afacabffa1 (diff)
downloadcts-master-cuttlefish-testing-release.tar.gz
Merge "Snap for 5061196 from 9afb8772e940865f692850c23f648c1760e77cb8 to master-cuttlefish-testing-release" into master-cuttlefish-testing-releasemaster-cuttlefish-testing-release
-rw-r--r--hostsidetests/jvmti/TEST_MAPPING268
-rw-r--r--hostsidetests/os/test-apps/StaticSharedLibConsumerApp3/Android.mk4
-rw-r--r--tests/app/app/Android.mk4
-rw-r--r--tests/app/src/android/app/cts/ActivityManagerTest.java12
-rw-r--r--tests/app/src/android/app/cts/SystemFeaturesTest.java7
-rw-r--r--tests/tests/binder_ndk/AndroidManifest.xml2
-rw-r--r--tests/tests/os/Android.mk4
-rw-r--r--tests/tests/permission2/res/raw/android_manifest.xml1
8 files changed, 283 insertions, 19 deletions
diff --git a/hostsidetests/jvmti/TEST_MAPPING b/hostsidetests/jvmti/TEST_MAPPING
new file mode 100644
index 00000000000..3309c0e18e6
--- /dev/null
+++ b/hostsidetests/jvmti/TEST_MAPPING
@@ -0,0 +1,268 @@
+{
+ "presubmit": [
+ {
+ "name": "CtsJvmtiAttachingHostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRedefineClassesHostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest902HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest903HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest904HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest905HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest906HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest907HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest908HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest910HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest911HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest912HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest913HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest914HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest915HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest917HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest918HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest919HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest920HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest922HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest923HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest924HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest926HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest927HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest928HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest930HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest931HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest932HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest940HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest942HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest944HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest945HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest947HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest951HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest982HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest983HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest984HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest985HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest986HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest988HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest989HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest990HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest991HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest992HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest993HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest994HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest995HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest996HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest997HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest1900HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest1901HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest1902HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest1903HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest1904HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest1906HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest1907HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest1908HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest1909HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest1910HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest1911HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest1912HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest1913HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest1914HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest1915HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest1916HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest1917HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest1920HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest1921HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest1922HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest1923HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest1924HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest1925HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest1926HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest1927HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest1928HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest1930HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest1931HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest1932HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest1933HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest1934HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest1936HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest1937HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest1939HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest1941HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest1942HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiRunTest1943HostTestCases"
+ },
+ {
+ "name": "CtsJvmtiTaggingHostTestCases"
+ },
+ {
+ "name": "CtsJvmtiTrackingHostTestCases"
+ }
+ ]
+}
diff --git a/hostsidetests/os/test-apps/StaticSharedLibConsumerApp3/Android.mk b/hostsidetests/os/test-apps/StaticSharedLibConsumerApp3/Android.mk
index 7a3e054c962..bcded5bebd9 100644
--- a/hostsidetests/os/test-apps/StaticSharedLibConsumerApp3/Android.mk
+++ b/hostsidetests/os/test-apps/StaticSharedLibConsumerApp3/Android.mk
@@ -31,9 +31,5 @@ LOCAL_SDK_VERSION := current
LOCAL_COMPATIBILITY_SUITE := cts vts general-tests cts_instant
LOCAL_USE_AAPT2 := true
-# Disable AAPT2 manifest checks to fix:
-# cts/hostsidetests/os/test-apps/StaticSharedLibConsumerApp3/AndroidManifest.xml:28: error: unexpected element <additional-certificate> found in <manifest><application><uses-static-library>.
-# TODO(b/79755007): Remove when AAPT2 recognizes the manifest elements.
-LOCAL_AAPT_FLAGS += --warn-manifest-validation
include $(BUILD_CTS_SUPPORT_PACKAGE)
diff --git a/tests/app/app/Android.mk b/tests/app/app/Android.mk
index 2d24cb50159..69c6d76d8ee 100644
--- a/tests/app/app/Android.mk
+++ b/tests/app/app/Android.mk
@@ -48,9 +48,5 @@ LOCAL_PACKAGE_NAME := CtsAppTestStubs
LOCAL_PRIVATE_PLATFORM_APIS := true
LOCAL_USE_AAPT2 := true
-# Disable AAPT2 manifest checks to fix:
-# cts/tests/app/app/AndroidManifest.xml:25: error: unexpected element <meta-data> found in <manifest><permission>.
-# TODO(b/79755007): Remove when AAPT2 recognizes the manifest elements.
-LOCAL_AAPT_FLAGS += --warn-manifest-validation
include $(BUILD_CTS_SUPPORT_PACKAGE)
diff --git a/tests/app/src/android/app/cts/ActivityManagerTest.java b/tests/app/src/android/app/cts/ActivityManagerTest.java
index be30de110ff..747c52e699e 100644
--- a/tests/app/src/android/app/cts/ActivityManagerTest.java
+++ b/tests/app/src/android/app/cts/ActivityManagerTest.java
@@ -437,11 +437,13 @@ public class ActivityManagerTest extends InstrumentationTestCase {
* lifetime tests.
*/
private void launchHome() throws Exception {
- Intent intent = new Intent(Intent.ACTION_MAIN);
- intent.addCategory(Intent.CATEGORY_HOME);
- intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
- mContext.startActivity(intent);
- Thread.sleep(WAIT_TIME);
+ if (!noHomeScreen()) {
+ Intent intent = new Intent(Intent.ACTION_MAIN);
+ intent.addCategory(Intent.CATEGORY_HOME);
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ mContext.startActivity(intent);
+ Thread.sleep(WAIT_TIME);
+ }
}
/**
diff --git a/tests/app/src/android/app/cts/SystemFeaturesTest.java b/tests/app/src/android/app/cts/SystemFeaturesTest.java
index 40774c74d85..09d99a385cb 100644
--- a/tests/app/src/android/app/cts/SystemFeaturesTest.java
+++ b/tests/app/src/android/app/cts/SystemFeaturesTest.java
@@ -43,6 +43,8 @@ import android.os.Build;
import android.telephony.TelephonyManager;
import android.test.InstrumentationTestCase;
+import com.android.compatibility.common.util.PropertyUtil;
+
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.HashSet;
@@ -495,6 +497,7 @@ public class SystemFeaturesTest extends InstrumentationTestCase {
!mPackageManager.hasSystemFeature(PackageManager.FEATURE_TELEVISION) &&
!mPackageManager.hasSystemFeature(PackageManager.FEATURE_WATCH) &&
!mPackageManager.hasSystemFeature(PackageManager.FEATURE_EMBEDDED) &&
+ !isAndroidEmulator() &&
!mPackageManager.hasSystemFeature(PackageManager.FEATURE_PC)) {
// USB accessory mode is only a requirement for devices with USB ports supporting
// peripheral mode. As there is no public API to distinguish a device with only host
@@ -543,6 +546,10 @@ public class SystemFeaturesTest extends InstrumentationTestCase {
}
}
+ private boolean isAndroidEmulator() {
+ return PropertyUtil.propertyEquals("ro.kernel.qemu", "1");
+ }
+
private void assertFeature(boolean exist, String feature) {
if (exist) {
assertAvailable(feature);
diff --git a/tests/tests/binder_ndk/AndroidManifest.xml b/tests/tests/binder_ndk/AndroidManifest.xml
index 6972282cbb8..410676ad1cc 100644
--- a/tests/tests/binder_ndk/AndroidManifest.xml
+++ b/tests/tests/binder_ndk/AndroidManifest.xml
@@ -27,7 +27,7 @@
android:exported="true" />
<service
android:name="android.binder.cts.NativeService"
- android:process=":java"
+ android:process=":native"
android:exported="true" />
</application>
diff --git a/tests/tests/os/Android.mk b/tests/tests/os/Android.mk
index 8f126108a1c..5ab51d85966 100644
--- a/tests/tests/os/Android.mk
+++ b/tests/tests/os/Android.mk
@@ -57,10 +57,6 @@ LOCAL_JAVA_LIBRARIES += android.test.base.stubs
LOCAL_AAPT_FLAGS := -0 .policy
LOCAL_USE_AAPT2 := true
-# Disable AAPT2 manifest checks to fix:
-# cts/tests/tests/os/AndroidManifest.xml:25: error: unexpected element <meta-data> found in <manifest><permission>.
-# TODO(b/79755007): Remove when AAPT2 recognizes the manifest elements.
-LOCAL_AAPT_FLAGS += --warn-manifest-validation
include $(BUILD_CTS_PACKAGE)
diff --git a/tests/tests/permission2/res/raw/android_manifest.xml b/tests/tests/permission2/res/raw/android_manifest.xml
index b20bd67737e..040bdbd2318 100644
--- a/tests/tests/permission2/res/raw/android_manifest.xml
+++ b/tests/tests/permission2/res/raw/android_manifest.xml
@@ -138,7 +138,6 @@
<protected-broadcast android:name="android.bluetooth.device.action.MAS_INSTANCE" />
<protected-broadcast android:name="android.bluetooth.device.action.ALIAS_CHANGED" />
<protected-broadcast android:name="android.bluetooth.device.action.FOUND" />
- <protected-broadcast android:name="android.bluetooth.device.action.DISAPPEARED" />
<protected-broadcast android:name="android.bluetooth.device.action.CLASS_CHANGED" />
<protected-broadcast android:name="android.bluetooth.device.action.ACL_CONNECTED" />
<protected-broadcast android:name="android.bluetooth.device.action.ACL_DISCONNECT_REQUESTED" />