1 # Copyright (C) 2009 The Android Open Source Project 2 # 3 # Licensed under the Apache License, Version 2.0 (the "License"); 4 # you may not use this file except in compliance with the License. 5 # You may obtain a copy of the License at 6 # 7 # http://www.apache.org/licenses/LICENSE-2.0 8 # 9 # Unless required by applicable law or agreed to in writing, software 10 # distributed under the License is distributed on an "AS IS" BASIS, 11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 # See the License for the specific language governing permissions and 13 # limitations under the License. 14 15 # don't include these packages in any target 16 LOCAL_MODULE_TAGS := optional 17 # and when built explicitly put them in the data partition 18 LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS) 19 20 LOCAL_JAVA_LIBRARIES := android.test.runner bouncycastle 21 LOCAL_STATIC_JAVA_LIBRARIES := CtsTestAnnotationsLib 22 23 LOCAL_PROGUARD_ENABLED := disabled 24 25 include $(BUILD_PACKAGE) 26 27 CORETESTS_INTERMEDIATES := $(call intermediates-dir-for,JAVA_LIBRARIES,core-tests,,COMMON) 28 29 PACKAGE_INTERMEDIATES := $(intermediates) 30 PACKAGE_RESOURCES := $(PACKAGE_INTERMEDIATES)/package_res.apk 31 32 $(LOCAL_INSTALLED_MODULE): $(PACKAGE_RESOURCES) 33 34 $(PACKAGE_RESOURCES): PRIVATE_INTERMEDIATES_COMMON := $(intermediates.COMMON) 35 $(PACKAGE_RESOURCES): PRIVATE_CORETESTS_INTERMEDIATES_COMMON := $(CORETESTS_INTERMEDIATES) 36 $(PACKAGE_RESOURCES): PRIVATE_INTERMEDIATES := $(intermediates) 37 $(PACKAGE_RESOURCES): PRIVATE_MODULE_STEM := $(LOCAL_BUILT_MODULE_STEM) 38 $(PACKAGE_RESOURCES): PRIVATE_RESOURCE_DIRS := $(call all-core-resource-dirs,test) 39 $(PACKAGE_RESOURCES): PRIVATE_LOCAL_PATH := $(LOCAL_PATH) 40 $(PACKAGE_RESOURCES): PRIVATE_PRIVATE_KEY := $(private_key) 41 $(PACKAGE_RESOURCES): PRIVATE_CERTIFICATE := $(certificate) 42 $(PACKAGE_RESOURCES): $(LOCAL_BUILT_MODULE) $(CORETESTS_INTERMEDIATES)/javalib.jar 43 @echo "Add resources to package ($@)" 44 @rm -rf $(PRIVATE_INTERMEDIATES_COMMON)/ctsclasses 45 # javalib.jar should only contain .dex files, but the harmony tests also include 46 # some .class files, so get rid of them 47 $(call unzip-jar-files,$(PRIVATE_CORETESTS_INTERMEDIATES_COMMON)/javalib.jar,\ 48 $(PRIVATE_INTERMEDIATES_COMMON)/ctsclasses) 49 @find $(PRIVATE_INTERMEDIATES_COMMON)/ctsclasses -type f -name "*.class" -delete 50 @rm -f $(PRIVATE_INTERMEDIATES_COMMON)/ctsclasses/classes.dex 51 @cp $< $@ 52 @jar uf $@ -C $(PRIVATE_INTERMEDIATES_COMMON)/ctsclasses . 53 $(sign-package) 54 $(align-package) 55 $(hide) cp $@ $< 56