diff options
7 files changed, 154 insertions, 199 deletions
diff --git a/core/tests/overlaytests/Android.mk b/core/tests/overlaytests/Android.mk deleted file mode 100644 index b798d87878b7..000000000000 --- a/core/tests/overlaytests/Android.mk +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright (C) 2017 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. - -include $(call all-subdir-makefiles) diff --git a/core/tests/overlaytests/host/Android.mk b/core/tests/overlaytests/host/Android.mk deleted file mode 100644 index d58d9393c0b8..000000000000 --- a/core/tests/overlaytests/host/Android.mk +++ /dev/null @@ -1,19 +0,0 @@ -# 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 to build test-apps. -include $(call all-makefiles-under,$(LOCAL_PATH)) - diff --git a/core/tests/overlaytests/host/test-apps/Android.mk b/core/tests/overlaytests/host/test-apps/Android.mk deleted file mode 100644 index 5c7187ead31f..000000000000 --- a/core/tests/overlaytests/host/test-apps/Android.mk +++ /dev/null @@ -1,16 +0,0 @@ -# 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. - -include $(call all-subdir-makefiles) - diff --git a/core/tests/overlaytests/host/test-apps/SignatureOverlay/Android.bp b/core/tests/overlaytests/host/test-apps/SignatureOverlay/Android.bp new file mode 100644 index 000000000000..bb7d63edbebd --- /dev/null +++ b/core/tests/overlaytests/host/test-apps/SignatureOverlay/Android.bp @@ -0,0 +1,57 @@ +// 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. + +// Error: Cannot get the name of the license module in the +// ./Android.bp file. +// If no such license module exists, please add one there first. +// Then reset the default_applicable_licenses property below with the license module name. +package { + // See: http://go/android-license-faq + default_applicable_licenses: ["frameworks_base_license"], +} + +android_test_helper_app { + name: "OverlayHostTests_NonPlatformSignatureOverlay", + sdk_version: "current", + test_suites: ["device-tests"], + aaptflags: [ + "--custom-package com.android.server.om.hosttest.signature_overlay_bad", + ], +} + +android_test_helper_app { + name: "OverlayHostTests_PlatformSignatureStaticOverlay", + sdk_version: "current", + test_suites: ["device-tests"], + certificate: "platform", + manifest: "static/AndroidManifest.xml", + aaptflags: [ + "--custom-package com.android.server.om.hosttest.signature_overlay_static", + ], +} + +android_test_helper_app { + name: "OverlayHostTests_PlatformSignatureOverlay", + sdk_version: "current", + test_suites: ["device-tests"], + certificate: "platform", + aaptflags: [ + "--custom-package", + "com.android.server.om.hosttest.signature_overlay_v1", + "--version-code", + "1", + "--version-name", + "v1", + ], +} diff --git a/core/tests/overlaytests/host/test-apps/SignatureOverlay/Android.mk b/core/tests/overlaytests/host/test-apps/SignatureOverlay/Android.mk deleted file mode 100644 index b453cde925e4..000000000000 --- a/core/tests/overlaytests/host/test-apps/SignatureOverlay/Android.mk +++ /dev/null @@ -1,56 +0,0 @@ -# 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) - -my_package_prefix := com.android.server.om.hosttest.signature_overlay - -include $(CLEAR_VARS) -LOCAL_MODULE_TAGS := tests -LOCAL_PACKAGE_NAME := OverlayHostTests_NonPlatformSignatureOverlay -LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 -LOCAL_LICENSE_CONDITIONS := notice -LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../../NOTICE -LOCAL_SDK_VERSION := current -LOCAL_COMPATIBILITY_SUITE := device-tests -LOCAL_AAPT_FLAGS := --custom-package $(my_package_prefix)_bad -include $(BUILD_PACKAGE) - -include $(CLEAR_VARS) -LOCAL_MODULE_TAGS := tests -LOCAL_PACKAGE_NAME := OverlayHostTests_PlatformSignatureStaticOverlay -LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 -LOCAL_LICENSE_CONDITIONS := notice -LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../../NOTICE -LOCAL_SDK_VERSION := current -LOCAL_COMPATIBILITY_SUITE := device-tests -LOCAL_CERTIFICATE := platform -LOCAL_MANIFEST_FILE := static/AndroidManifest.xml -LOCAL_AAPT_FLAGS := --custom-package $(my_package_prefix)_static -include $(BUILD_PACKAGE) - -include $(CLEAR_VARS) -LOCAL_MODULE_TAGS := tests -LOCAL_PACKAGE_NAME := OverlayHostTests_PlatformSignatureOverlay -LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 -LOCAL_LICENSE_CONDITIONS := notice -LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../../NOTICE -LOCAL_SDK_VERSION := current -LOCAL_COMPATIBILITY_SUITE := device-tests -LOCAL_CERTIFICATE := platform -LOCAL_AAPT_FLAGS := --custom-package $(my_package_prefix)_v1 -LOCAL_AAPT_FLAGS += --version-code 1 --version-name v1 -include $(BUILD_PACKAGE) - -my_package_prefix := diff --git a/core/tests/overlaytests/host/test-apps/UpdateOverlay/Android.bp b/core/tests/overlaytests/host/test-apps/UpdateOverlay/Android.bp new file mode 100644 index 000000000000..ee0c0e526c0a --- /dev/null +++ b/core/tests/overlaytests/host/test-apps/UpdateOverlay/Android.bp @@ -0,0 +1,97 @@ +// 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. + +// Error: Cannot get the name of the license module in the +// ./Android.bp file. +// If no such license module exists, please add one there first. +// Then reset the default_applicable_licenses property below with the license module name. +package { + // See: http://go/android-license-faq + default_applicable_licenses: ["frameworks_base_license"], +} + +android_test_helper_app { + name: "OverlayHostTests_UpdateOverlay", + srcs: ["src/**/*.java"], + sdk_version: "current", + test_suites: ["device-tests"], + static_libs: ["androidx.test.rules"], + aaptflags: ["--no-resource-removal"], +} + +android_test_helper_app { + name: "OverlayHostTests_FrameworkOverlayV1", + sdk_version: "current", + test_suites: ["device-tests"], + certificate: "platform", + aaptflags: [ + "--custom-package", + "com.android.server.om.hosttest.framework_overlay_v1", + "--version-code", + "1", + "--version-name", + "v1", + ], + resource_dirs: ["framework/v1/res"], + manifest: "framework/AndroidManifest.xml", +} + +android_test_helper_app { + name: "OverlayHostTests_FrameworkOverlayV2", + sdk_version: "current", + test_suites: ["device-tests"], + certificate: "platform", + aaptflags: [ + "--custom-package", + "com.android.server.om.hosttest.framework_overlay_v2", + "--version-code", + "2", + "--version-name", + "v2", + ], + resource_dirs: ["framework/v2/res"], + manifest: "framework/AndroidManifest.xml", +} + +android_test_helper_app { + name: "OverlayHostTests_AppOverlayV1", + sdk_version: "current", + test_suites: ["device-tests"], + aaptflags: [ + "--custom-package", + "com.android.server.om.hosttest.app_overlay_v1", + "--version-code", + "1", + "--version-name", + "v1", + ], + resource_dirs: ["app/v1/res"], + manifest: "app/v1/AndroidManifest.xml", +} + +android_test_helper_app { + name: "OverlayHostTests_AppOverlayV2", + sdk_version: "current", + test_suites: ["device-tests"], + aaptflags: [ + "--custom-package", + "com.android.server.om.hosttest.app_overlay_v2", + "--version-code", + "2", + "--version-name", + "v2", + ], + resource_dirs: ["app/v2/res"], + manifest: "app/v2/AndroidManifest.xml", +} diff --git a/core/tests/overlaytests/host/test-apps/UpdateOverlay/Android.mk b/core/tests/overlaytests/host/test-apps/UpdateOverlay/Android.mk deleted file mode 100644 index 77fc887e9493..000000000000 --- a/core/tests/overlaytests/host/test-apps/UpdateOverlay/Android.mk +++ /dev/null @@ -1,93 +0,0 @@ -# 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_TAGS := tests -LOCAL_SRC_FILES := $(call all-java-files-under,src) -LOCAL_PACKAGE_NAME := OverlayHostTests_UpdateOverlay -LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 -LOCAL_LICENSE_CONDITIONS := notice -LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../../NOTICE -LOCAL_SDK_VERSION := current -LOCAL_COMPATIBILITY_SUITE := device-tests -LOCAL_STATIC_JAVA_LIBRARIES := androidx.test.rules -LOCAL_USE_AAPT2 := true -LOCAL_AAPT_FLAGS := --no-resource-removal -include $(BUILD_PACKAGE) - -my_package_prefix := com.android.server.om.hosttest.framework_overlay - -include $(CLEAR_VARS) -LOCAL_MODULE_TAGS := tests -LOCAL_PACKAGE_NAME := OverlayHostTests_FrameworkOverlayV1 -LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 -LOCAL_LICENSE_CONDITIONS := notice -LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../../NOTICE -LOCAL_SDK_VERSION := current -LOCAL_COMPATIBILITY_SUITE := device-tests -LOCAL_CERTIFICATE := platform -LOCAL_AAPT_FLAGS := --custom-package $(my_package_prefix)_v1 -LOCAL_AAPT_FLAGS += --version-code 1 --version-name v1 -LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/framework/v1/res -LOCAL_MANIFEST_FILE := framework/AndroidManifest.xml -include $(BUILD_PACKAGE) - -include $(CLEAR_VARS) -LOCAL_MODULE_TAGS := tests -LOCAL_PACKAGE_NAME := OverlayHostTests_FrameworkOverlayV2 -LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 -LOCAL_LICENSE_CONDITIONS := notice -LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../../NOTICE -LOCAL_SDK_VERSION := current -LOCAL_COMPATIBILITY_SUITE := device-tests -LOCAL_CERTIFICATE := platform -LOCAL_AAPT_FLAGS := --custom-package $(my_package_prefix)_v2 -LOCAL_AAPT_FLAGS += --version-code 2 --version-name v2 -LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/framework/v2/res -LOCAL_MANIFEST_FILE := framework/AndroidManifest.xml -include $(BUILD_PACKAGE) - -my_package_prefix := com.android.server.om.hosttest.app_overlay - -include $(CLEAR_VARS) -LOCAL_MODULE_TAGS := tests -LOCAL_PACKAGE_NAME := OverlayHostTests_AppOverlayV1 -LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 -LOCAL_LICENSE_CONDITIONS := notice -LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../../NOTICE -LOCAL_SDK_VERSION := current -LOCAL_COMPATIBILITY_SUITE := device-tests -LOCAL_AAPT_FLAGS := --custom-package $(my_package_prefix)_v1 -LOCAL_AAPT_FLAGS += --version-code 1 --version-name v1 -LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/app/v1/res -LOCAL_MANIFEST_FILE := app/v1/AndroidManifest.xml -include $(BUILD_PACKAGE) - -include $(CLEAR_VARS) -LOCAL_MODULE_TAGS := tests -LOCAL_PACKAGE_NAME := OverlayHostTests_AppOverlayV2 -LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 -LOCAL_LICENSE_CONDITIONS := notice -LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../../NOTICE -LOCAL_SDK_VERSION := current -LOCAL_COMPATIBILITY_SUITE := device-tests -LOCAL_AAPT_FLAGS := --custom-package $(my_package_prefix)_v2 -LOCAL_AAPT_FLAGS += --version-code 2 --version-name v2 -LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/app/v2/res -LOCAL_MANIFEST_FILE := app/v2/AndroidManifest.xml -include $(BUILD_PACKAGE) - -my_package_prefix := |