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 17 LOCAL_PATH := $(call my-dir) 18 19 ########################################################### 20 # Package w/ tests 21 22 include $(CLEAR_VARS) 23 24 LOCAL_MODULE_TAGS := tests 25 LOCAL_SDK_VERSION := current 26 LOCAL_STATIC_JAVA_LIBRARIES := android-support-test ctsdeviceutil ctstestrunner 27 # Tag this module as a cts test artifact 28 LOCAL_COMPATIBILITY_SUITE := cts 29 LOCAL_PROGUARD_ENABLED := disabled 30 LOCAL_DEX_PREOPT := false 31 LOCAL_PACKAGE_NAME := CtsPrivilegedUpdateTests 32 33 LOCAL_SRC_FILES := $(call all-java-files-under, src) 34 35 include $(BUILD_CTS_SUPPORT_PACKAGE) 36 37 38 ########################################################### 39 # Variant: Privileged app upgrade 40 41 include $(CLEAR_VARS) 42 43 LOCAL_MODULE := CtsShimPrivUpgradePrebuilt 44 LOCAL_MODULE_TAGS := tests 45 LOCAL_MODULE_CLASS := APPS 46 LOCAL_BUILT_MODULE_STEM := package.apk 47 # Make sure the build system doesn't try to resign the APK 48 LOCAL_CERTIFICATE := PRESIGNED 49 LOCAL_COMPATIBILITY_SUITE := cts 50 51 LOCAL_SRC_FILES := CtsShimPrivUpgrade.apk 52 53 include $(BUILD_PREBUILT) 54 55 # Add package to the set of APKs available to CTS 56 # Unceremoneously ripped from cts/build/support_package.mk 57 cts_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 72 include $(CLEAR_VARS) 73 74 LOCAL_MODULE := CtsShimPrivUpgradeWrongSHAPrebuilt 75 LOCAL_MODULE_TAGS := tests 76 LOCAL_MODULE_CLASS := APPS 77 LOCAL_BUILT_MODULE_STEM := package.apk 78 # Make sure the build system doesn't try to resign the APK 79 LOCAL_CERTIFICATE := PRESIGNED 80 LOCAL_COMPATIBILITY_SUITE := cts 81 82 LOCAL_SRC_FILES := CtsShimPrivUpgradeWrongSHA.apk 83 84 include $(BUILD_PREBUILT) 85 86 # Add package to the set of APKs available to CTS 87 # Unceremoneously ripped from cts/build/support_package.mk 88 cts_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