Brian Muramatsu | 5df641c | 2011-12-28 15:46:57 -0800 | [diff] [blame] | 1 | # 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 | |
| 20 | include $(BUILD_HOST_JAVA_LIBRARY) |
Guang Zhu | 76be1e5 | 2015-05-18 20:19:01 -0700 | [diff] [blame] | 21 | include $(BUILD_CTS_MODULE_TEST_CONFIG) |
Brian Muramatsu | 5df641c | 2011-12-28 15:46:57 -0800 | [diff] [blame] | 22 | |
Stuart Scott | 0337dbf | 2015-02-04 10:37:07 -0800 | [diff] [blame] | 23 | cts_library_jar := $(CTS_TESTCASES_OUT)/$(LOCAL_MODULE).jar |
| 24 | $(cts_library_jar): $(LOCAL_BUILT_MODULE) |
| 25 | $(copy-file-to-target) |
Brian Muramatsu | 5df641c | 2011-12-28 15:46:57 -0800 | [diff] [blame] | 26 | |
dcashman | 8e1f6e4 | 2014-10-24 16:16:30 -0700 | [diff] [blame] | 27 | cts_src_dirs := $(LOCAL_PATH)/src |
| 28 | cts_src_dirs += $(sort $(dir $(LOCAL_GENERATED_SOURCES))) |
| 29 | cts_src_dirs := $(addprefix -s , $(cts_src_dirs)) |
| 30 | |
Stuart Scott | 0337dbf | 2015-02-04 10:37:07 -0800 | [diff] [blame] | 31 | cts_library_xml := $(CTS_TESTCASES_OUT)/$(LOCAL_MODULE).xml |
dcashman | 8e1f6e4 | 2014-10-24 16:16:30 -0700 | [diff] [blame] | 32 | $(cts_library_xml): PRIVATE_SRC_DIRS := $(cts_src_dirs) |
Brian Muramatsu | 5df641c | 2011-12-28 15:46:57 -0800 | [diff] [blame] | 33 | $(cts_library_xml): PRIVATE_TEST_PACKAGE := $(LOCAL_CTS_TEST_PACKAGE) |
| 34 | $(cts_library_xml): PRIVATE_LIBRARY := $(LOCAL_MODULE) |
| 35 | $(cts_library_xml): PRIVATE_JAR_PATH := $(LOCAL_MODULE).jar |
Stuart Scott | 544aec0 | 2015-03-11 16:41:43 -0700 | [diff] [blame] | 36 | $(cts_library_xml): $(cts_library_jar) |
Guang Zhu | 76be1e5 | 2015-05-18 20:19:01 -0700 | [diff] [blame] | 37 | $(cts_library_xml): $(cts_module_test_config) |
Stuart Scott | 544aec0 | 2015-03-11 16:41:43 -0700 | [diff] [blame] | 38 | $(cts_library_xml): $(CTS_EXPECTATIONS) $(CTS_UNSUPPORTED_ABIS) $(CTS_JAVA_TEST_SCANNER_DOCLET) $(CTS_JAVA_TEST_SCANNER) $(CTS_XML_GENERATOR) |
Brian Muramatsu | 5df641c | 2011-12-28 15:46:57 -0800 | [diff] [blame] | 39 | $(hide) echo Generating test description for host library $(PRIVATE_LIBRARY) |
| 40 | $(hide) mkdir -p $(CTS_TESTCASES_OUT) |
dcashman | 8e1f6e4 | 2014-10-24 16:16:30 -0700 | [diff] [blame] | 41 | $(hide) $(CTS_JAVA_TEST_SCANNER) $(PRIVATE_SRC_DIRS) \ |
Brian Muramatsu | 5df641c | 2011-12-28 15:46:57 -0800 | [diff] [blame] | 42 | -d $(CTS_JAVA_TEST_SCANNER_DOCLET) | \ |
| 43 | $(CTS_XML_GENERATOR) -t hostSideOnly \ |
| 44 | -j $(PRIVATE_JAR_PATH) \ |
| 45 | -n $(PRIVATE_LIBRARY) \ |
| 46 | -p $(PRIVATE_TEST_PACKAGE) \ |
| 47 | -e $(CTS_EXPECTATIONS) \ |
Stuart Scott | 34c8fc8 | 2014-09-08 13:25:16 -0700 | [diff] [blame] | 48 | -b $(CTS_UNSUPPORTED_ABIS) \ |
Stuart Scott | ccdc00b | 2014-09-29 20:42:08 +0000 | [diff] [blame] | 49 | -a $(CTS_TARGET_ARCH) \ |
Brian Muramatsu | 5df641c | 2011-12-28 15:46:57 -0800 | [diff] [blame] | 50 | -o $@ |
Ying Wang | 1aed9cd | 2015-01-28 16:59:57 -0800 | [diff] [blame] | 51 | |
| 52 | # Have the module name depend on the cts files; so the cts files get generated when you run mm/mmm/mma/mmma. |
Guang Zhu | 76be1e5 | 2015-05-18 20:19:01 -0700 | [diff] [blame] | 53 | $(my_register_name) : $(cts_library_jar) $(cts_library_xml) $(cts_module_test_config) |