blob: c9809515427b674608236d357538a550f093e336 [file] [log] [blame]
Stuart Scottff15fe92015-08-28 15:34:10 -07001# 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 Zhu3a3721b2017-08-29 10:58:19 -070019# 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)
Stuart Scottff15fe92015-08-28 15:34:10 -070027 @echo Generating: $@
Guang Zhu3a3721b2017-08-29 10:58:19 -070028 $(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 Scottff15fe92015-08-28 15:34:10 -070034
35# Reset variables
36LOCAL_SUITE_BUILD_NUMBER :=
37LOCAL_SUITE_NAME :=
38LOCAL_SUITE_FULLNAME :=
39LOCAL_SUITE_VERSION :=
40
Guang Zhu3a3721b2017-08-29 10:58:19 -070041# Include the test suite properties file
42LOCAL_JAVA_RESOURCE_FILES += $(suite_info_prop)
Stuart Scottff15fe92015-08-28 15:34:10 -070043
44# Add the base libraries
Julien Desprez9d3da912020-07-09 15:23:19 -070045LOCAL_JAVA_LIBRARIES += tradefed loganalysis compatibility-host-util
Stuart Scottff15fe92015-08-28 15:34:10 -070046
47LOCAL_MODULE_TAGS := optional
48
jdesprez13f52502017-12-20 03:50:16 -080049# 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
Stuart Scottff15fe92015-08-28 15:34:10 -070056include $(BUILD_HOST_JAVA_LIBRARY)
Guang Zhu3a3721b2017-08-29 10:58:19 -070057
jdesprez13f52502017-12-20 03:50:16 -080058dynamic_config_local :=
Guang Zhu3a3721b2017-08-29 10:58:19 -070059suite_info_prop :=