blob: 8e071e41a692ba97aa291a0698a45283a04ea8fc [file] [log] [blame]
Brian Muramatsu5df641c2011-12-28 15:46:57 -08001# Copyright (C) 2011 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 host library and defines a rule to generate the associated test
17# package XML needed by CTS.
18#
19
20include $(BUILD_HOST_JAVA_LIBRARY)
21
22cts_library_xml := $(CTS_TESTCASES_OUT)/$(LOCAL_MODULE).xml
23
dcashman8e1f6e42014-10-24 16:16:30 -070024cts_src_dirs := $(LOCAL_PATH)/src
25cts_src_dirs += $(sort $(dir $(LOCAL_GENERATED_SOURCES)))
26cts_src_dirs := $(addprefix -s , $(cts_src_dirs))
27
28$(cts_library_xml): PRIVATE_SRC_DIRS := $(cts_src_dirs)
Brian Muramatsu5df641c2011-12-28 15:46:57 -080029$(cts_library_xml): PRIVATE_TEST_PACKAGE := $(LOCAL_CTS_TEST_PACKAGE)
30$(cts_library_xml): PRIVATE_LIBRARY := $(LOCAL_MODULE)
31$(cts_library_xml): PRIVATE_JAR_PATH := $(LOCAL_MODULE).jar
Stuart Scott34c8fc82014-09-08 13:25:16 -070032$(cts_library_xml): $(HOST_OUT_JAVA_LIBRARIES)/$(LOCAL_MODULE).jar $(CTS_EXPECTATIONS) $(CTS_UNSUPPORTED_ABIS) $(CTS_JAVA_TEST_SCANNER_DOCLET) $(CTS_JAVA_TEST_SCANNER) $(CTS_XML_GENERATOR)
Brian Muramatsu5df641c2011-12-28 15:46:57 -080033 $(hide) echo Generating test description for host library $(PRIVATE_LIBRARY)
34 $(hide) mkdir -p $(CTS_TESTCASES_OUT)
dcashman8e1f6e42014-10-24 16:16:30 -070035 $(hide) $(CTS_JAVA_TEST_SCANNER) $(PRIVATE_SRC_DIRS) \
Brian Muramatsu5df641c2011-12-28 15:46:57 -080036 -d $(CTS_JAVA_TEST_SCANNER_DOCLET) | \
37 $(CTS_XML_GENERATOR) -t hostSideOnly \
38 -j $(PRIVATE_JAR_PATH) \
39 -n $(PRIVATE_LIBRARY) \
40 -p $(PRIVATE_TEST_PACKAGE) \
41 -e $(CTS_EXPECTATIONS) \
Stuart Scott34c8fc82014-09-08 13:25:16 -070042 -b $(CTS_UNSUPPORTED_ABIS) \
Stuart Scottccdc00b2014-09-29 20:42:08 +000043 -a $(CTS_TARGET_ARCH) \
Brian Muramatsu5df641c2011-12-28 15:46:57 -080044 -o $@