1# Copyright (C) 2015 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# 16# Builds a compatibility test suite. 17# 18 19# Generate suite info property file 20suite_info_prop := $(call intermediates-dir-for,JAVA_LIBRARIES,$(LOCAL_MODULE),true,COMMON)/test-suite-info.properties 21$(suite_info_prop): PRIVATE_SUITE_BUILD_NUMBER := $(LOCAL_SUITE_BUILD_NUMBER) 22$(suite_info_prop): PRIVATE_SUITE_TARGET_ARCH := $(LOCAL_SUITE_TARGET_ARCH) 23$(suite_info_prop): PRIVATE_SUITE_NAME := $(LOCAL_SUITE_NAME) 24$(suite_info_prop): PRIVATE_SUITE_FULLNAME := $(LOCAL_SUITE_FULLNAME) 25$(suite_info_prop): PRIVATE_SUITE_VERSION := $(LOCAL_SUITE_VERSION) 26$(suite_info_prop): cts/build/compatibility_test_suite.mk $(LOCAL_MODULE_MAKEFILE) 27 @echo Generating: $@ 28 $(hide) echo "# This file is auto generated by Android.mk. Do not modify." > $@ 29 $(hide) echo "build_number = $(PRIVATE_SUITE_BUILD_NUMBER)" >> $@ 30 $(hide) echo "target_arch = $(PRIVATE_SUITE_TARGET_ARCH)" >> $@ 31 $(hide) echo "name = $(PRIVATE_SUITE_NAME)" >> $@ 32 $(hide) echo "fullname = $(PRIVATE_SUITE_FULLNAME)" >> $@ 33 $(hide) echo "version = $(PRIVATE_SUITE_VERSION)" >> $@ 34 35# Reset variables 36LOCAL_SUITE_BUILD_NUMBER := 37LOCAL_SUITE_NAME := 38LOCAL_SUITE_FULLNAME := 39LOCAL_SUITE_VERSION := 40 41# Include the test suite properties file 42LOCAL_JAVA_RESOURCE_FILES += $(suite_info_prop) 43 44# Add the base libraries 45LOCAL_JAVA_LIBRARIES += tradefed loganalysis compatibility-host-util 46 47LOCAL_MODULE_TAGS := optional 48 49# If DynamicConfig.xml exists copy it inside the jar 50ifneq (,$(wildcard $(LOCAL_PATH)/DynamicConfig.xml)) 51 dynamic_config_local := $(call intermediates-dir-for,JAVA_LIBRARIES,$(LOCAL_MODULE),true,COMMON)/$(LOCAL_MODULE).dynamic 52 $(eval $(call copy-one-file,$(LOCAL_PATH)/DynamicConfig.xml,$(dynamic_config_local))) 53 LOCAL_JAVA_RESOURCE_FILES += $(dynamic_config_local) 54endif 55 56include $(BUILD_HOST_JAVA_LIBRARY) 57 58dynamic_config_local := 59suite_info_prop := 60