Stuart Scott | ff15fe9 | 2015-08-28 15:34:10 -0700 | [diff] [blame] | 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 | |
Guang Zhu | 3a3721b | 2017-08-29 10:58:19 -0700 | [diff] [blame] | 19 | # Generate suite info property file |
| 20 | suite_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) |
Stuart Scott | ff15fe9 | 2015-08-28 15:34:10 -0700 | [diff] [blame] | 27 | @echo Generating: $@ |
Guang Zhu | 3a3721b | 2017-08-29 10:58:19 -0700 | [diff] [blame] | 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)" >> $@ |
Stuart Scott | ff15fe9 | 2015-08-28 15:34:10 -0700 | [diff] [blame] | 34 | |
| 35 | # Reset variables |
| 36 | LOCAL_SUITE_BUILD_NUMBER := |
| 37 | LOCAL_SUITE_NAME := |
| 38 | LOCAL_SUITE_FULLNAME := |
| 39 | LOCAL_SUITE_VERSION := |
| 40 | |
Guang Zhu | 3a3721b | 2017-08-29 10:58:19 -0700 | [diff] [blame] | 41 | # Include the test suite properties file |
| 42 | LOCAL_JAVA_RESOURCE_FILES += $(suite_info_prop) |
Stuart Scott | ff15fe9 | 2015-08-28 15:34:10 -0700 | [diff] [blame] | 43 | |
| 44 | # Add the base libraries |
Julien Desprez | 9d3da91 | 2020-07-09 15:23:19 -0700 | [diff] [blame] | 45 | LOCAL_JAVA_LIBRARIES += tradefed loganalysis compatibility-host-util |
Stuart Scott | ff15fe9 | 2015-08-28 15:34:10 -0700 | [diff] [blame] | 46 | |
| 47 | LOCAL_MODULE_TAGS := optional |
| 48 | |
jdesprez | 13f5250 | 2017-12-20 03:50:16 -0800 | [diff] [blame] | 49 | # If DynamicConfig.xml exists copy it inside the jar |
| 50 | ifneq (,$(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) |
| 54 | endif |
| 55 | |
Stuart Scott | ff15fe9 | 2015-08-28 15:34:10 -0700 | [diff] [blame] | 56 | include $(BUILD_HOST_JAVA_LIBRARY) |
Guang Zhu | 3a3721b | 2017-08-29 10:58:19 -0700 | [diff] [blame] | 57 | |
jdesprez | 13f5250 | 2017-12-20 03:50:16 -0800 | [diff] [blame] | 58 | dynamic_config_local := |
Guang Zhu | 3a3721b | 2017-08-29 10:58:19 -0700 | [diff] [blame] | 59 | suite_info_prop := |