1# 2# Copyright (C) 2016 The Android Open Source Project 3# 4# Licensed under the Apache License, Version 2.0 (the "License"); 5# you may not use this file except in compliance with the License. 6# You may obtain a copy of the License at 7# 8# http://www.apache.org/licenses/LICENSE-2.0 9# 10# Unless required by applicable law or agreed to in writing, software 11# distributed under the License is distributed on an "AS IS" BASIS, 12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13# See the License for the specific language governing permissions and 14# limitations under the License. 15# 16 17LOCAL_PATH := $(call my-dir) 18 19########################################################### 20# Package w/ tests 21 22include $(CLEAR_VARS) 23 24LOCAL_MODULE_TAGS := tests 25LOCAL_SDK_VERSION := current 26LOCAL_STATIC_JAVA_LIBRARIES := android-support-test ctsdeviceutil ctstestrunner 27# Tag this module as a cts test artifact 28LOCAL_COMPATIBILITY_SUITE := cts 29LOCAL_PROGUARD_ENABLED := disabled 30LOCAL_DEX_PREOPT := false 31LOCAL_PACKAGE_NAME := CtsPrivilegedUpdateTests 32 33LOCAL_SRC_FILES := $(call all-java-files-under, src) 34 35include $(BUILD_CTS_SUPPORT_PACKAGE) 36 37 38########################################################### 39# Variant: Privileged app upgrade 40 41include $(CLEAR_VARS) 42 43LOCAL_MODULE := CtsShimPrivUpgradePrebuilt 44LOCAL_MODULE_TAGS := tests 45LOCAL_MODULE_CLASS := APPS 46LOCAL_BUILT_MODULE_STEM := package.apk 47# Make sure the build system doesn't try to resign the APK 48LOCAL_CERTIFICATE := PRESIGNED 49LOCAL_COMPATIBILITY_SUITE := cts 50 51LOCAL_SRC_FILES := CtsShimPrivUpgrade.apk 52 53include $(BUILD_PREBUILT) 54 55# Add package to the set of APKs available to CTS 56# Unceremoneously ripped from cts/build/support_package.mk 57cts_support_apks := 58$(foreach fp, $(ALL_MODULES.$(LOCAL_MODULE).BUILT_INSTALLED),\ 59 $(eval pair := $(subst :,$(space),$(fp)))\ 60 $(eval built := $(word 1,$(pair)))\ 61 $(eval installed := $(CTS_TESTCASES_OUT)/$(notdir $(word 2,$(pair))))\ 62 $(eval $(call copy-one-file, $(built), $(installed)))\ 63 $(eval cts_support_apks += $(installed))) 64 65# Have the module name depend on the cts files; so the cts files get generated when you run mm/mmm/mma/mmma. 66$(my_register_name) : $(cts_support_apks) 67 68 69########################################################### 70# Variant: Privileged app upgrade (wrong SHA) 71 72include $(CLEAR_VARS) 73 74LOCAL_MODULE := CtsShimPrivUpgradeWrongSHAPrebuilt 75LOCAL_MODULE_TAGS := tests 76LOCAL_MODULE_CLASS := APPS 77LOCAL_BUILT_MODULE_STEM := package.apk 78# Make sure the build system doesn't try to resign the APK 79LOCAL_CERTIFICATE := PRESIGNED 80LOCAL_COMPATIBILITY_SUITE := cts 81 82LOCAL_SRC_FILES := CtsShimPrivUpgradeWrongSHA.apk 83 84include $(BUILD_PREBUILT) 85 86# Add package to the set of APKs available to CTS 87# Unceremoneously ripped from cts/build/support_package.mk 88cts_support_apks := 89$(foreach fp, $(ALL_MODULES.$(LOCAL_MODULE).BUILT_INSTALLED),\ 90 $(eval pair := $(subst :,$(space),$(fp)))\ 91 $(eval built := $(word 1,$(pair)))\ 92 $(eval installed := $(CTS_TESTCASES_OUT)/$(notdir $(word 2,$(pair))))\ 93 $(eval $(call copy-one-file, $(built), $(installed)))\ 94 $(eval cts_support_apks += $(installed))) 95 96# Have the module name depend on the cts files; so the cts files get generated when you run mm/mmm/mma/mmma. 97$(my_register_name) : $(cts_support_apks) 98