Brian Muramatsu | 88d32a8 | 2011-12-02 10:55:12 -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 an executable and defines a rule to generate the associated test |
| 17 | # package XML needed by CTS. |
| 18 | # |
| 19 | # 1. Replace "include $(BUILD_EXECUTABLE)" |
| 20 | # with "include $(BUILD_CTS_EXECUTABLE)" |
| 21 | # |
| 22 | # 2. Define LOCAL_CTS_TEST_PACKAGE to group the tests under a package |
| 23 | # as needed by CTS. |
| 24 | # |
| 25 | |
| 26 | include $(BUILD_EXECUTABLE) |
| 27 | |
| 28 | cts_executable_xml := $(CTS_NATIVE_XML_OUT)/$(LOCAL_MODULE).xml |
| 29 | |
| 30 | $(cts_executable_xml): PRIVATE_PATH := $(LOCAL_PATH) |
| 31 | $(cts_executable_xml): PRIVATE_TEST_PACKAGE := $(LOCAL_CTS_TEST_PACKAGE) |
| 32 | $(cts_executable_xml): PRIVATE_EXECUTABLE := $(LOCAL_MODULE) |
| 33 | $(cts_executable_xml): $(addprefix $(LOCAL_PATH)/,$(LOCAL_SRC_FILES)) | $(CTS_NATIVE_XML_GENERATOR) |
| 34 | $(hide) echo Generating test description for native package $(PRIVATE_TEST_PACKAGE) |
| 35 | $(hide) $(CTS_NATIVE_XML_GENERATOR) -p $(PRIVATE_TEST_PACKAGE) \ |
| 36 | -n $(PRIVATE_EXECUTABLE) \ |
| 37 | -s $(PRIVATE_PATH) \ |
| 38 | -o $@ |