The Android Open Source Project | f805710 | 2009-03-15 16:47:16 -0700 | [diff] [blame] | 1 | # Copyright (C) 2008 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 | |
Stuart Scott | 0337dbf | 2015-02-04 10:37:07 -0800 | [diff] [blame] | 15 | # Build the CTS harness |
| 16 | |
| 17 | JUNIT_HOST_JAR := $(HOST_OUT_JAVA_LIBRARIES)/junit.jar |
| 18 | HOSTTESTLIB_JAR := $(HOST_OUT_JAVA_LIBRARIES)/hosttestlib.jar |
| 19 | TF_JAR := $(HOST_OUT_JAVA_LIBRARIES)/tradefed-prebuilt.jar |
| 20 | CTS_TF_JAR := $(HOST_OUT_JAVA_LIBRARIES)/cts-tradefed.jar |
Tsu Chiang Chuang | 09fe7e2 | 2015-02-25 12:08:37 -0800 | [diff] [blame] | 21 | CTS_TF_EXEC_PATH ?= $(HOST_OUT_EXECUTABLES)/cts-tradefed |
Stuart Scott | 0337dbf | 2015-02-04 10:37:07 -0800 | [diff] [blame] | 22 | |
| 23 | cts_prebuilt_jar := $(HOST_OUT)/cts/android-cts/tools/cts-prebuilt.jar |
| 24 | $(cts_prebuilt_jar): PRIVATE_TESTS_DIR := $(HOST_OUT)/cts/android-cts/repository/testcases |
| 25 | $(cts_prebuilt_jar): PRIVATE_PLANS_DIR := $(HOST_OUT)/cts/android-cts/repository/plans |
| 26 | $(cts_prebuilt_jar): PRIVATE_TOOLS_DIR := $(HOST_OUT)/cts/android-cts/tools |
Tsu Chiang Chuang | 09fe7e2 | 2015-02-25 12:08:37 -0800 | [diff] [blame] | 27 | $(cts_prebuilt_jar): $(JUNIT_HOST_JAR) $(HOSTTESTLIB_JAR) $(TF_JAR) $(CTS_TF_JAR) $(CTS_TF_EXEC_PATH) $(ADDITIONAL_TF_JARS) | $(ACP) $(HOST_OUT_EXECUTABLES)/adb |
Stuart Scott | 0337dbf | 2015-02-04 10:37:07 -0800 | [diff] [blame] | 28 | mkdir -p $(PRIVATE_TESTS_DIR) |
| 29 | mkdir -p $(PRIVATE_PLANS_DIR) |
| 30 | mkdir -p $(PRIVATE_TOOLS_DIR) |
Tsu Chiang Chuang | 09fe7e2 | 2015-02-25 12:08:37 -0800 | [diff] [blame] | 31 | $(ACP) -fp $(JUNIT_HOST_JAR) $(HOSTTESTLIB_JAR) $(TF_JAR) $(CTS_TF_JAR) $(CTS_TF_EXEC_PATH) $(ADDITIONAL_TF_JARS) $(PRIVATE_TOOLS_DIR) |
Stuart Scott | 0337dbf | 2015-02-04 10:37:07 -0800 | [diff] [blame] | 32 | |
| 33 | .PHONY: cts-harness |
| 34 | cts-harness : $(cts_prebuilt_jar) |
| 35 | |
Guang Zhu | a386a53 | 2015-05-03 16:16:01 -0700 | [diff] [blame] | 36 | # Put the test coverage report in the dist dir if "cts" is among the build goals. |
| 37 | ifneq ($(filter cts, $(MAKECMDGOALS)),) |
| 38 | $(call dist-for-goals,cts,$(CTS_TF_JAR)) |
| 39 | $(call dist-for-goals,cts,$(HOSTTESTLIB_JAR)) |
| 40 | endif |
| 41 | |
The Android Open Source Project | f805710 | 2009-03-15 16:47:16 -0700 | [diff] [blame] | 42 | include $(call all-subdir-makefiles) |