Keun young Park | 3769d33 | 2012-08-29 10:16:37 -0700 | [diff] [blame] | 1 | # Copyright (C) 2012 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 | # copied from cts/build. modified for PTS |
| 16 | |
| 17 | # Disable by default so "m pts" will work in emulator builds |
| 18 | LOCAL_DEX_PREOPT := false |
| 19 | |
| 20 | include $(BUILD_PACKAGE) |
| 21 | |
| 22 | pts_package_apk := $(PTS_TESTCASES_OUT)/$(LOCAL_PACKAGE_NAME).apk |
| 23 | pts_package_xml := $(PTS_TESTCASES_OUT)/$(LOCAL_PACKAGE_NAME).xml |
| 24 | |
| 25 | $(pts_package_apk): PRIVATE_PACKAGE := $(LOCAL_PACKAGE_NAME) |
| 26 | $(pts_package_apk): $(call intermediates-dir-for,APPS,$(LOCAL_PACKAGE_NAME))/package.apk | $(ACP) |
| 27 | $(hide) mkdir -p $(PTS_TESTCASES_OUT) |
| 28 | $(hide) $(ACP) -fp $< $@ |
| 29 | |
| 30 | $(pts_package_xml): PRIVATE_PATH := $(LOCAL_PATH) |
| 31 | $(pts_package_xml): PRIVATE_INSTRUMENTATION := $(LOCAL_INSTRUMENTATION_FOR) |
| 32 | $(pts_package_xml): PRIVATE_PACKAGE := $(LOCAL_PACKAGE_NAME) |
| 33 | $(pts_package_xml): PRIVATE_TEST_PACKAGE := com.android.pts.$(notdir $(LOCAL_PATH)) |
| 34 | $(pts_package_xml): PRIVATE_MANIFEST := $(LOCAL_PATH)/AndroidManifest.xml |
| 35 | $(pts_package_xml): PRIVATE_TEST_TYPE := $(if $(LOCAL_PTS_TEST_RUNNER),$(LOCAL_PTS_TEST_RUNNER),'') |
| 36 | $(pts_package_xml): $(call intermediates-dir-for,APPS,$(LOCAL_PACKAGE_NAME))/package.apk $(PTS_EXPECTATIONS) $(PTS_JAVA_TEST_SCANNER_DOCLET) $(PTS_JAVA_TEST_SCANNER) $(PTS_XML_GENERATOR) |
| 37 | $(hide) echo Generating test description for java package $(PRIVATE_PACKAGE) |
| 38 | $(hide) mkdir -p $(PTS_TESTCASES_OUT) |
| 39 | $(hide) $(PTS_JAVA_TEST_SCANNER) \ |
| 40 | -s $(PRIVATE_PATH) \ |
| 41 | -d $(PTS_JAVA_TEST_SCANNER_DOCLET) | \ |
| 42 | $(PTS_XML_GENERATOR) \ |
| 43 | -t $(PRIVATE_TEST_TYPE) \ |
| 44 | -m $(PRIVATE_MANIFEST) \ |
| 45 | -i "$(PRIVATE_INSTRUMENTATION)" \ |
| 46 | -n $(PRIVATE_PACKAGE) \ |
| 47 | -p $(PRIVATE_TEST_PACKAGE) \ |
| 48 | -e $(PTS_EXPECTATIONS) \ |
| 49 | -o $@ |