Home | History | Annotate | Download | only in PrivilegedUpdateApp
      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 compatibility-device-util ctstestrunner
     27 LOCAL_JAVA_LIBRARIES := android.test.base.stubs
     28 # Tag this module as a cts test artifact
     29 LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
     30 LOCAL_PROGUARD_ENABLED := disabled
     31 LOCAL_DEX_PREOPT := false
     32 LOCAL_PACKAGE_NAME := CtsPrivilegedUpdateTests
     33 
     34 LOCAL_SRC_FILES := $(call all-java-files-under, src)
     35 
     36 include $(BUILD_CTS_SUPPORT_PACKAGE)
     37 
     38 
     39 ###########################################################
     40 # Variant: Privileged app upgrade
     41 
     42 include $(CLEAR_VARS)
     43 
     44 LOCAL_MODULE := CtsShimPrivUpgradePrebuilt
     45 LOCAL_MODULE_TAGS := tests
     46 LOCAL_MODULE_CLASS := APPS
     47 LOCAL_BUILT_MODULE_STEM := package.apk
     48 # Make sure the build system doesn't try to resign the APK
     49 LOCAL_CERTIFICATE := PRESIGNED
     50 LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
     51 
     52 # The 'arm' apk has both arm and arm64 so's. Same for x86/x86_64.
     53 my_apk_dir := $(subst arm64,arm,$(TARGET_ARCH))
     54 my_apk_dir := $(subst x86_64,x86,$(my_apk_dir))
     55 LOCAL_REPLACE_PREBUILT_APK_INSTALLED := $(LOCAL_PATH)/apk/$(my_apk_dir)/CtsShimPrivUpgrade.apk
     56 
     57 include $(BUILD_PREBUILT)
     58 
     59 ###########################################################
     60 # Variant: Privileged app upgrade (wrong SHA)
     61 
     62 include $(CLEAR_VARS)
     63 
     64 LOCAL_MODULE := CtsShimPrivUpgradeWrongSHAPrebuilt
     65 LOCAL_MODULE_TAGS := tests
     66 LOCAL_MODULE_CLASS := APPS
     67 LOCAL_BUILT_MODULE_STEM := package.apk
     68 # Make sure the build system doesn't try to resign the APK
     69 LOCAL_CERTIFICATE := PRESIGNED
     70 LOCAL_COMPATIBILITY_SUITE := cts vts general-tests
     71 
     72 LOCAL_REPLACE_PREBUILT_APK_INSTALLED := $(LOCAL_PATH)/apk/$(my_apk_dir)/CtsShimPrivUpgradeWrongSHA.apk
     73 
     74 include $(BUILD_PREBUILT)
     75 
     76 my_apk_dir :=
     77