diff options
author | Jiyong Park <jiyong@google.com> | 2017-12-28 12:03:28 +0900 |
---|---|---|
committer | Jiyong Park <jiyong@google.com> | 2018-03-12 10:40:33 +0900 |
commit | 090c6b1c94f75fb0d2193354ca453d528da0fa99 (patch) | |
tree | cf7af82334e2f94e594aed9f219f5d456b2f9d56 /tests/OdmApps | |
parent | be1033fda24a7c1ba9ef3ca590da30be56acc6d2 (diff) |
Allow apps in /odm/app and /odm/priv-app
/odm is a vendor partition other than /vendor. Both partitions are for
HW-specific modules such as HALs. The difference is that /odm is owned
by ODM (usually device manufacturer which designs the board), whereas
/vendor is owned by SoC manufacturer. In other words, /odm partition is
for board-specific customization to the /vendor partition.
Since apps can exist in /vendor/app and /vendor/priv-app, the same has
to be supported for /odm partition.
Bug: 71366495
Test: m -j
Teet: cd frameworks/base/tests/OdmApps; atest .
Change-Id: I1ec8b22b080efdefd67a45ce9c7aeaa2aef350e0
Diffstat (limited to 'tests/OdmApps')
-rw-r--r-- | tests/OdmApps/Android.mk | 26 | ||||
-rw-r--r-- | tests/OdmApps/AndroidTest.xml | 27 | ||||
-rw-r--r-- | tests/OdmApps/app/Android.mk | 22 | ||||
-rwxr-xr-x | tests/OdmApps/app/AndroidManifest.xml | 21 | ||||
-rw-r--r-- | tests/OdmApps/priv-app/Android.mk | 22 | ||||
-rwxr-xr-x | tests/OdmApps/priv-app/AndroidManifest.xml | 21 | ||||
-rw-r--r-- | tests/OdmApps/src/com/android/test/odm/app/OdmAppsTest.java | 35 |
7 files changed, 174 insertions, 0 deletions
diff --git a/tests/OdmApps/Android.mk b/tests/OdmApps/Android.mk new file mode 100644 index 000000000000..64fa65325acc --- /dev/null +++ b/tests/OdmApps/Android.mk @@ -0,0 +1,26 @@ +# 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. + +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_MODULE := OdmAppsTest +LOCAL_MODULE_TAGS := tests +LOCAL_SRC_FILES := $(call all-java-files-under, src) +LOCAL_JAVA_LIBRARIES := tradefed +LOCAL_COMPATIBILITY_SUITE := device-tests +include $(BUILD_HOST_JAVA_LIBRARY) + +include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/tests/OdmApps/AndroidTest.xml b/tests/OdmApps/AndroidTest.xml new file mode 100644 index 000000000000..2f1283850a97 --- /dev/null +++ b/tests/OdmApps/AndroidTest.xml @@ -0,0 +1,27 @@ +<?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="Config for ODM apps test"> + <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer"> + <option name="cleanup" value="true" /> + <option name="remount-system" value="true" /> + <option name="push" value="TestOdmApp.apk->/odm/app/TestOdmApp/TestOdmApp.apk" /> + <option name="push" value="TestOdmPrivApp.apk->/odm/priv-app/TestOdmPrivApp/TestOdmPrivApp.apk" /> + <option name="post-push" value="stop; start; sleep 5" /> + </target_preparer> + <test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" > + <option name="jar" value="OdmAppsTest.jar" /> + </test> +</configuration> diff --git a/tests/OdmApps/app/Android.mk b/tests/OdmApps/app/Android.mk new file mode 100644 index 000000000000..9eec0cc4f66f --- /dev/null +++ b/tests/OdmApps/app/Android.mk @@ -0,0 +1,22 @@ +# 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. + +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_PACKAGE_NAME := TestOdmApp +LOCAL_MODULE_TAGS := tests +LOCAL_COMPATIBILITY_SUITE := device-tests +LOCAL_SDK_VERSION := current +include $(BUILD_PACKAGE) diff --git a/tests/OdmApps/app/AndroidManifest.xml b/tests/OdmApps/app/AndroidManifest.xml new file mode 100755 index 000000000000..84a9ea84b522 --- /dev/null +++ b/tests/OdmApps/app/AndroidManifest.xml @@ -0,0 +1,21 @@ +<?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.test.odm.app"> +</manifest> + diff --git a/tests/OdmApps/priv-app/Android.mk b/tests/OdmApps/priv-app/Android.mk new file mode 100644 index 000000000000..d423133fc9f5 --- /dev/null +++ b/tests/OdmApps/priv-app/Android.mk @@ -0,0 +1,22 @@ +# 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. + +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_PACKAGE_NAME := TestOdmPrivApp +LOCAL_MODULE_TAGS := tests +LOCAL_COMPATIBILITY_SUITE := device-tests +LOCAL_SDK_VERSION := current +include $(BUILD_PACKAGE) diff --git a/tests/OdmApps/priv-app/AndroidManifest.xml b/tests/OdmApps/priv-app/AndroidManifest.xml new file mode 100755 index 000000000000..031cf64ea7b1 --- /dev/null +++ b/tests/OdmApps/priv-app/AndroidManifest.xml @@ -0,0 +1,21 @@ +<?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.test.odm.privapp"> +</manifest> + diff --git a/tests/OdmApps/src/com/android/test/odm/app/OdmAppsTest.java b/tests/OdmApps/src/com/android/test/odm/app/OdmAppsTest.java new file mode 100644 index 000000000000..de742b80a372 --- /dev/null +++ b/tests/OdmApps/src/com/android/test/odm/app/OdmAppsTest.java @@ -0,0 +1,35 @@ +/* + * 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.test.odm.apps; + +import com.android.tradefed.testtype.DeviceTestCase; + +public class OdmAppsTest extends DeviceTestCase { + /** + * Test if /odm/app is working + */ + public void testOdmApp() throws Exception { + assertNotNull(getDevice().getAppPackageInfo("com.android.test.odm.app")); + } + + /** + * Test if /odm/priv-app is working + */ + public void testOdmPrivApp() throws Exception { + assertNotNull(getDevice().getAppPackageInfo("com.android.test.odm.privapp")); + } +} |