blob: 56a7f6fd4036aaa03940520e090fa38228166fb7 [file] [log] [blame]
The Android Open Source Project88b60792009-03-03 19:28:42 -08001# 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
15cts_dir := $(HOST_OUT)/cts
16cts_tools_src_dir := cts/tools
17
18cts_name := android-cts
19
Neil Fuller4fdf6742014-05-29 13:18:35 +010020JUNIT_HOST_JAR := $(HOST_OUT_JAVA_LIBRARIES)/junit.jar
Phil Dubach3b7521b2009-08-19 16:26:40 -070021HOSTTESTLIB_JAR := $(HOST_OUT_JAVA_LIBRARIES)/hosttestlib.jar
Brett Chabot358b2472011-01-30 15:07:21 -080022TF_JAR := $(HOST_OUT_JAVA_LIBRARIES)/tradefed-prebuilt.jar
23CTS_TF_JAR := $(HOST_OUT_JAVA_LIBRARIES)/cts-tradefed.jar
Tsu Chiang Chuang557bada2015-02-10 17:47:22 -080024CTS_TF_EXEC_PATH ?= $(HOST_OUT_EXECUTABLES)/cts-tradefed
Brett Chabote847a392011-02-18 15:13:50 -080025CTS_TF_README_PATH := $(cts_tools_src_dir)/tradefed-host/README
Brett Chabot67bae7f2009-06-26 14:41:30 -070026
Ying Wang02d75da2012-08-21 11:54:49 -070027VMTESTSTF_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,vm-tests-tf,HOST)
Brian Muramatsuc0a69242012-01-05 18:24:43 -080028VMTESTSTF_JAR := $(VMTESTSTF_INTERMEDIATES)/android.core.vm-tests-tf.jar
29
Narayan Kamath13a3fe82013-12-31 15:15:41 +000030# The list of test packages that core-tests (libcore/Android.mk)
31# is split into.
Brian Carlstromb6a08f02010-05-28 17:02:57 -070032CTS_CORE_CASE_LIST := \
Brian Carlstromaf850002011-05-27 00:04:57 -070033 android.core.tests.libcore.package.dalvik \
34 android.core.tests.libcore.package.com \
Kenny Root69c00c92013-09-05 15:10:44 -070035 android.core.tests.libcore.package.conscrypt \
Brian Carlstromaf850002011-05-27 00:04:57 -070036 android.core.tests.libcore.package.sun \
37 android.core.tests.libcore.package.tests \
38 android.core.tests.libcore.package.org \
39 android.core.tests.libcore.package.libcore \
Tsu Chiang Chuangd1f75012013-08-21 11:46:03 -070040 android.core.tests.libcore.package.jsr166 \
Tsu Chiang Chuang6b874c92012-10-24 16:47:49 -070041 android.core.tests.libcore.package.harmony_annotation \
Narayan Kamath13a3fe82013-12-31 15:15:41 +000042 android.core.tests.libcore.package.harmony_java_io \
43 android.core.tests.libcore.package.harmony_java_lang \
44 android.core.tests.libcore.package.harmony_java_math \
45 android.core.tests.libcore.package.harmony_java_net \
46 android.core.tests.libcore.package.harmony_java_nio \
47 android.core.tests.libcore.package.harmony_java_text \
48 android.core.tests.libcore.package.harmony_java_util \
49 android.core.tests.libcore.package.harmony_javax_security \
Neil Fuller4fdf6742014-05-29 13:18:35 +010050 android.core.tests.libcore.package.okhttp \
Narayan Kamath13a3fe82013-12-31 15:15:41 +000051 android.core.tests.runner
52
Neil Fuller56128c52015-03-13 14:22:11 +000053# Additional CTS packages for code under libcore
54CTS_CORE_CASE_LIST += \
55 android.core.tests.libcore.package.tzdata
56
Narayan Kamath13a3fe82013-12-31 15:15:41 +000057# The list of test packages that apache-harmony-tests (external/apache-harmony/Android.mk)
58# is split into.
59CTS_CORE_CASE_LIST += \
Tsu Chiang Chuang6b874c92012-10-24 16:47:49 -070060 android.core.tests.libcore.package.harmony_beans \
61 android.core.tests.libcore.package.harmony_logging \
Tsu Chiang Chuang6b874c92012-10-24 16:47:49 -070062 android.core.tests.libcore.package.harmony_prefs \
Narayan Kamath13a3fe82013-12-31 15:15:41 +000063 android.core.tests.libcore.package.harmony_sql
Urs Grobb3c6b2d2009-04-17 11:27:08 -070064
Tsu Chiang Chuangbcf11b02014-06-18 09:59:49 -070065
66CTS_TEST_JAR_LIST := \
Stuart Scott5139ce42015-01-27 10:49:25 -080067 cts-junit \
Tsu Chiang Chuangbcf11b02014-06-18 09:59:49 -070068 CtsJdwp
69
Brian Muramatsuc0a69242012-01-05 18:24:43 -080070# Depend on the full package paths rather than the phony targets to avoid
71# rebuilding the packages every time.
72CTS_CORE_CASES := $(foreach pkg,$(CTS_CORE_CASE_LIST),$(call intermediates-dir-for,APPS,$(pkg))/package.apk)
Tsu Chiang Chuangbcf11b02014-06-18 09:59:49 -070073CTS_TEST_JAR_FILES := $(foreach c,$(CTS_TEST_JAR_LIST),$(call intermediates-dir-for,JAVA_LIBRARIES,$(c))/javalib.jar)
Brian Muramatsuc0a69242012-01-05 18:24:43 -080074
Brian Muramatsufa3d88f2010-07-22 14:46:53 -070075-include cts/CtsTestCaseList.mk
The Android Open Source Project88b60792009-03-03 19:28:42 -080076
Ying Wang89ec7982014-10-01 11:46:30 -070077# A module may have mutliple installed files (e.g. split apks)
78CTS_CASE_LIST_APKS :=
Stuart Scott5139ce42015-01-27 10:49:25 -080079$(foreach m, $(CTS_TEST_CASE_LIST),\
80 $(foreach fp, $(ALL_MODULES.$(m).BUILT_INSTALLED),\
81 $(eval pair := $(subst :,$(space),$(fp)))\
82 $(eval CTS_CASE_LIST_APKS += $(CTS_TESTCASES_OUT)/$(notdir $(word 2,$(pair))))))\
83$(foreach m, $(CTS_CORE_CASE_LIST),\
Ying Wang89ec7982014-10-01 11:46:30 -070084 $(foreach fp, $(ALL_MODULES.$(m).BUILT_INSTALLED),\
85 $(eval pair := $(subst :,$(space),$(fp)))\
86 $(eval built := $(word 1,$(pair)))\
Stuart Scott5139ce42015-01-27 10:49:25 -080087 $(eval installed := $(CTS_TESTCASES_OUT)/$(notdir $(word 2,$(pair))))\
Ying Wang89ec7982014-10-01 11:46:30 -070088 $(eval $(call copy-one-file, $(built), $(installed)))\
89 $(eval CTS_CASE_LIST_APKS += $(installed))))
90
Stuart Scott5139ce42015-01-27 10:49:25 -080091CTS_CASE_LIST_JARS :=
92$(foreach m, $(CTS_TEST_JAR_LIST),\
93 $(eval CTS_CASE_LIST_JARS += $(CTS_TESTCASES_OUT)/$(m).jar))
94
dcashman49b362d2015-05-12 11:31:09 -070095CTS_SHARED_LIBS :=
dcashman17412c82015-04-21 11:25:28 -070096
Joe Onorato80042662010-06-15 17:29:19 -040097DEFAULT_TEST_PLAN := $(cts_dir)/$(cts_name)/resource/plans
dcashman9d50b542015-04-22 14:49:23 -070098$(cts_dir)/all_cts_files_stamp: $(CTS_CORE_CASES) $(CTS_TEST_JAR_FILES) $(CTS_TEST_CASES) $(CTS_CASE_LIST_APKS) $(CTS_CASE_LIST_JARS) $(JUNIT_HOST_JAR) $(HOSTTESTLIB_JAR) $(CTS_HOST_LIBRARY_JARS) $(TF_JAR) $(VMTESTSTF_JAR) $(CTS_TF_JAR) $(CTS_TF_EXEC_PATH) $(CTS_TF_README_PATH) $(ADDITIONAL_TF_JARS) $(ACP) $(CTS_SHARED_LIBS)
Tsu Chiang Chuang557bada2015-02-10 17:47:22 -080099
The Android Open Source Project88b60792009-03-03 19:28:42 -0800100# Make necessary directory for CTS
Brian Muramatsu1cf9e0e2010-12-06 12:49:13 -0800101 $(hide) mkdir -p $(TMP_DIR)
102 $(hide) mkdir -p $(PRIVATE_DIR)/docs
103 $(hide) mkdir -p $(PRIVATE_DIR)/tools
104 $(hide) mkdir -p $(PRIVATE_DIR)/repository/testcases
105 $(hide) mkdir -p $(PRIVATE_DIR)/repository/plans
Brian Muramatsu45a971d2010-09-02 12:36:59 -0700106# Copy executable and JARs to CTS directory
Stuart Scott5139ce42015-01-27 10:49:25 -0800107 $(hide) $(ACP) -fp $(VMTESTSTF_JAR) $(CTS_TESTCASES_OUT)
Tsu Chiang Chuang557bada2015-02-10 17:47:22 -0800108 $(hide) $(ACP) -fp $(HOSTTESTLIB_JAR) $(CTS_HOST_LIBRARY_JARS) $(TF_JAR) $(CTS_TF_JAR) $(CTS_TF_EXEC_PATH) $(ADDITIONAL_TF_JARS) $(CTS_TF_README_PATH) $(PRIVATE_DIR)/tools
dcashman17412c82015-04-21 11:25:28 -0700109 $(hide) $(call copy-files-with-structure, $(CTS_SHARED_LIBS),$(HOST_OUT)/,$(PRIVATE_DIR))
The Android Open Source Project88b60792009-03-03 19:28:42 -0800110 $(hide) touch $@
111
Urs Grobb3c6b2d2009-04-17 11:27:08 -0700112# Generate the test descriptions for the core-tests
Phil Dubachc539dbe2009-08-07 10:59:04 -0700113# Parameters:
114# $1 : The output file where the description should be written (without the '.xml' extension)
115# $2 : The AndroidManifest.xml corresponding to the test package
Brian Carlstrombb7c6d82011-04-01 15:45:58 -0700116# $3 : The jar file name on PRIVATE_CLASSPATH containing junit tests to search for
Brian Carlstromaf850002011-05-27 00:04:57 -0700117# $4 : The package prefix of classes to include, possible empty
Stuart Scottf06c6ef2014-10-08 19:01:37 -0700118# $5 : The architecture of the current build
119# $6 : The directory containing vogar expectations files
120# $7 : The Android.mk corresponding to the test package (required for host-side tests only)
Urs Grobb3c6b2d2009-04-17 11:27:08 -0700121define generate-core-test-description
122@echo "Generate core-test description ("$(notdir $(1))")"
Brian Carlstrombb7c6d82011-04-01 15:45:58 -0700123$(hide) java -Xmx256M \
Neil Fuller4fdf6742014-05-29 13:18:35 +0100124 -Xbootclasspath/a:$(PRIVATE_CLASSPATH):$(JUNIT_HOST_JAR) \
125 -classpath $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar:$(HOST_JDK_TOOLS_JAR) \
Stuart Scottf06c6ef2014-10-08 19:01:37 -0700126 $(PRIVATE_PARAMS) CollectAllTests $(1) $(2) $(3) "$(4)" $(5) $(6) $(7)
Urs Grobb3c6b2d2009-04-17 11:27:08 -0700127endef
The Android Open Source Project6a5f7f02009-03-05 14:34:30 -0800128
Brian Carlstromb1dafb12014-06-18 15:11:01 -0700129CORE_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core-libart,,COMMON)
Kenny Rootdfaf3842013-04-29 13:25:29 -0700130CONSCRYPT_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,conscrypt,,COMMON)
Brian Carlstrombb7c6d82011-04-01 15:45:58 -0700131BOUNCYCASTLE_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,bouncycastle,,COMMON)
132APACHEXML_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,apache-xml,,COMMON)
Neil Fuller4fdf6742014-05-29 13:18:35 +0100133OKHTTP_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,okhttp-nojarjar,,COMMON)
134OKHTTPTESTS_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,okhttp-tests-nojarjar,,COMMON)
135OKHTTP_REPACKAGED_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,okhttp,,COMMON)
136APACHEHARMONYTESTS_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,apache-harmony-tests,,COMMON)
Brian Carlstrombb7c6d82011-04-01 15:45:58 -0700137SQLITEJDBC_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,sqlite-jdbc,,COMMON)
Brian Carlstromd05d74b2010-05-28 18:47:17 -0700138JUNIT_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core-junit,,COMMON)
Brian Carlstrombb7c6d82011-04-01 15:45:58 -0700139CORETESTS_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core-tests,,COMMON)
Tsu Chiang Chuangd1f75012013-08-21 11:46:03 -0700140JSR166TESTS_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,jsr166-tests,,COMMON)
Kenny Root69c00c92013-09-05 15:10:44 -0700141CONSCRYPTTESTS_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,conscrypt-tests,,COMMON)
Neil Fuller56128c52015-03-13 14:22:11 +0000142TZDATAUPDATETESTS_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,tzdata_update-tests,,COMMON)
Brian Carlstrombb7c6d82011-04-01 15:45:58 -0700143
Neil Fuller56128c52015-03-13 14:22:11 +0000144GEN_CLASSPATH := \
145 $(CORE_INTERMEDIATES)/classes.jar:$(CONSCRYPT_INTERMEDIATES)/classes.jar:$(BOUNCYCASTLE_INTERMEDIATES)/classes.jar:$(APACHEXML_INTERMEDIATES)/classes.jar:$(APACHEHARMONYTESTS_INTERMEDIATES)/classes.jar:$(OKHTTP_INTERMEDIATES)/classes.jar:$(OKHTTPTESTS_INTERMEDIATES)/classes.jar:$(OKHTTP_REPACKAGED_INTERMEDIATES)/classes.jar:$(JUNIT_INTERMEDIATES)/classes.jar:$(SQLITEJDBC_INTERMEDIATES)/javalib.jar:$(CORETESTS_INTERMEDIATES)/javalib.jar:$(JSR166TESTS_INTERMEDIATES)/javalib.jar:$(CONSCRYPTTESTS_INTERMEDIATES)/javalib.jar:$(TZDATAUPDATETESTS_INTERMEDIATES)/javalib.jar
The Android Open Source Project6a5f7f02009-03-05 14:34:30 -0800146
Brian Muramatsuc0a69242012-01-05 18:24:43 -0800147CTS_CORE_XMLS := \
148 $(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.dalvik.xml \
149 $(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.com.xml \
Kenny Root69c00c92013-09-05 15:10:44 -0700150 $(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.conscrypt.xml \
Brian Muramatsuc0a69242012-01-05 18:24:43 -0800151 $(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.sun.xml \
152 $(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.tests.xml \
153 $(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.org.xml \
Tsu Chiang Chuangd1f75012013-08-21 11:46:03 -0700154 $(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.libcore.xml \
Tsu Chiang Chuang6b874c92012-10-24 16:47:49 -0700155 $(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.jsr166.xml \
156 $(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_annotation.xml \
Narayan Kamath13a3fe82013-12-31 15:15:41 +0000157 $(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_io.xml \
158 $(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_lang.xml \
159 $(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_math.xml \
160 $(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_net.xml \
161 $(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_nio.xml \
162 $(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_text.xml \
163 $(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_util.xml \
164 $(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_javax_security.xml \
Tsu Chiang Chuang6b874c92012-10-24 16:47:49 -0700165 $(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_beans.xml \
166 $(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_logging.xml \
Tsu Chiang Chuang6b874c92012-10-24 16:47:49 -0700167 $(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_prefs.xml \
Tsu Chiang Chuang6b874c92012-10-24 16:47:49 -0700168 $(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_sql.xml \
Neil Fuller4fdf6742014-05-29 13:18:35 +0100169 $(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.okhttp.xml \
Neil Fuller56128c52015-03-13 14:22:11 +0000170 $(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.tzdata.xml \
Brian Muramatsuc0a69242012-01-05 18:24:43 -0800171
172$(CTS_CORE_XMLS): PRIVATE_CLASSPATH:=$(GEN_CLASSPATH)
The Android Open Source Project6a5f7f02009-03-05 14:34:30 -0800173# Why does this depend on javalib.jar instead of classes.jar? Because
174# even though the tool will operate on the classes.jar files, the
175# build system requires that dependencies use javalib.jar. If
176# javalib.jar is up-to-date, then classes.jar is as well. Depending
177# on classes.jar will build the files incorrectly.
Neil Fuller391d4e92015-04-01 18:02:46 +0100178CTS_CORE_XMLS_DEPS := $(CTS_CORE_CASES) $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar $(JUNIT_HOST_JAR) $(CORE_INTERMEDIATES)/javalib.jar $(BOUNCYCASTLE_INTERMEDIATES)/javalib.jar $(APACHEXML_INTERMEDIATES)/javalib.jar $(APACHEHARMONYTESTS_INTERMEDIATES)/javalib.jar $(OKHTTP_INTERMEDIATES)/javalib.jar $(OKHTTPTESTS_INTERMEDIATES)/javalib.jar $(OKHTTP_REPACKAGED_INTERMEDIATES)/javalib.jar $(SQLITEJDBC_INTERMEDIATES)/javalib.jar $(JUNIT_INTERMEDIATES)/javalib.jar $(CORETESTS_INTERMEDIATES)/javalib.jar $(JSR166TESTS_INTERMEDIATES)/javalib.jar $(CONSCRYPTTESTS_INTERMEDIATES)/javalib.jar $(TZDATAUPDATETESTS_INTERMEDIATES)/javalib.jar build/core/tasks/cts.mk | $(ACP)
Ying Wang6238cd92013-07-10 16:58:52 -0700179
180$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.dalvik.xml: $(CTS_CORE_XMLS_DEPS)
Brian Muramatsuc0a69242012-01-05 18:24:43 -0800181 $(hide) mkdir -p $(CTS_TESTCASES_OUT)
182 $(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.dalvik,\
Brian Carlstromaf850002011-05-27 00:04:57 -0700183 cts/tests/core/libcore/dalvik/AndroidManifest.xml,\
184 $(CORETESTS_INTERMEDIATES)/javalib.jar,dalvik,\
Stuart Scottf06c6ef2014-10-08 19:01:37 -0700185 $(TARGET_ARCH),libcore/expectations)
Ying Wang6238cd92013-07-10 16:58:52 -0700186
187$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.com.xml: $(CTS_CORE_XMLS_DEPS)
188 $(hide) mkdir -p $(CTS_TESTCASES_OUT)
Brian Muramatsuc0a69242012-01-05 18:24:43 -0800189 $(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.com,\
Brian Carlstromaf850002011-05-27 00:04:57 -0700190 cts/tests/core/libcore/com/AndroidManifest.xml,\
191 $(CORETESTS_INTERMEDIATES)/javalib.jar,com,\
Stuart Scottf06c6ef2014-10-08 19:01:37 -0700192 $(TARGET_ARCH),libcore/expectations)
Ying Wang6238cd92013-07-10 16:58:52 -0700193
Kenny Root69c00c92013-09-05 15:10:44 -0700194$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.conscrypt.xml: $(CTS_CORE_XMLS_DEPS)
195 $(hide) mkdir -p $(CTS_TESTCASES_OUT)
196 $(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.conscrypt,\
197 cts/tests/core/libcore/conscrypt/AndroidManifest.xml,\
198 $(CONSCRYPTTESTS_INTERMEDIATES)/javalib.jar,,\
Stuart Scottf06c6ef2014-10-08 19:01:37 -0700199 $(TARGET_ARCH),libcore/expectations)
Kenny Root69c00c92013-09-05 15:10:44 -0700200
Ying Wang6238cd92013-07-10 16:58:52 -0700201$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.sun.xml: $(CTS_CORE_XMLS_DEPS)
202 $(hide) mkdir -p $(CTS_TESTCASES_OUT)
Brian Muramatsuc0a69242012-01-05 18:24:43 -0800203 $(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.sun,\
Brian Carlstromaf850002011-05-27 00:04:57 -0700204 cts/tests/core/libcore/sun/AndroidManifest.xml,\
205 $(CORETESTS_INTERMEDIATES)/javalib.jar,sun,\
Stuart Scottf06c6ef2014-10-08 19:01:37 -0700206 $(TARGET_ARCH),libcore/expectations)
Ying Wang6238cd92013-07-10 16:58:52 -0700207
208$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.tests.xml: $(CTS_CORE_XMLS_DEPS)
209 $(hide) mkdir -p $(CTS_TESTCASES_OUT)
Brian Muramatsuc0a69242012-01-05 18:24:43 -0800210 $(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.tests,\
Brian Carlstromaf850002011-05-27 00:04:57 -0700211 cts/tests/core/libcore/tests/AndroidManifest.xml,\
212 $(CORETESTS_INTERMEDIATES)/javalib.jar,tests,\
Stuart Scottf06c6ef2014-10-08 19:01:37 -0700213 $(TARGET_ARCH),libcore/expectations)
Ying Wang6238cd92013-07-10 16:58:52 -0700214
215$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.org.xml: $(CTS_CORE_XMLS_DEPS)
216 $(hide) mkdir -p $(CTS_TESTCASES_OUT)
Brian Muramatsuc0a69242012-01-05 18:24:43 -0800217 $(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.org,\
Brian Carlstromaf850002011-05-27 00:04:57 -0700218 cts/tests/core/libcore/org/AndroidManifest.xml,\
Narayan Kamathcf7fbcd2015-06-01 14:45:55 +0100219 $(CORETESTS_INTERMEDIATES)/javalib.jar,\
220 org.w3c.domts:\
221 org.apache.harmony.security.tests:\
222 org.apache.harmony.nio.tests:\
223 org.apache.harmony.crypto.tests:\
224 org.apache.harmony.regex.tests:\
225 org.apache.harmony.luni.tests:\
226 org.apache.harmony.tests.internal.net.www.protocol:\
227 org.apache.harmony.tests.javax.net:\
228 org.json,\
Stuart Scottf06c6ef2014-10-08 19:01:37 -0700229 $(TARGET_ARCH),libcore/expectations)
Ying Wang6238cd92013-07-10 16:58:52 -0700230
231$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.libcore.xml: $(CTS_CORE_XMLS_DEPS)
232 $(hide) mkdir -p $(CTS_TESTCASES_OUT)
Brian Muramatsuc0a69242012-01-05 18:24:43 -0800233 $(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.libcore,\
Brian Carlstromaf850002011-05-27 00:04:57 -0700234 cts/tests/core/libcore/libcore/AndroidManifest.xml,\
235 $(CORETESTS_INTERMEDIATES)/javalib.jar,libcore,\
Stuart Scottf06c6ef2014-10-08 19:01:37 -0700236 $(TARGET_ARCH),libcore/expectations)
The Android Open Source Project6a5f7f02009-03-05 14:34:30 -0800237
Tsu Chiang Chuangd1f75012013-08-21 11:46:03 -0700238$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.jsr166.xml: $(CTS_CORE_XMLS_DEPS)
239 $(hide) mkdir -p $(CTS_TESTCASES_OUT)
240 $(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.jsr166,\
241 cts/tests/core/libcore/jsr166/AndroidManifest.xml,\
242 $(JSR166TESTS_INTERMEDIATES)/javalib.jar,jsr166,\
Stuart Scottf06c6ef2014-10-08 19:01:37 -0700243 $(TARGET_ARCH),libcore/expectations)
Tsu Chiang Chuangd1f75012013-08-21 11:46:03 -0700244
Tsu Chiang Chuang6b874c92012-10-24 16:47:49 -0700245$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_annotation.xml: $(CTS_CORE_XMLS_DEPS)
246 $(hide) mkdir -p $(CTS_TESTCASES_OUT)
247 $(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_annotation,\
248 cts/tests/core/libcore/harmony_annotation/AndroidManifest.xml,\
Narayan Kamath13a3fe82013-12-31 15:15:41 +0000249 $(CORETESTS_INTERMEDIATES)/javalib.jar,org.apache.harmony.annotation.tests,\
Stuart Scottf06c6ef2014-10-08 19:01:37 -0700250 $(TARGET_ARCH),libcore/expectations)
Tsu Chiang Chuang6b874c92012-10-24 16:47:49 -0700251
Narayan Kamath13a3fe82013-12-31 15:15:41 +0000252$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_io.xml: $(CTS_CORE_XMLS_DEPS)
Tsu Chiang Chuang6b874c92012-10-24 16:47:49 -0700253 $(hide) mkdir -p $(CTS_TESTCASES_OUT)
Narayan Kamath13a3fe82013-12-31 15:15:41 +0000254 $(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_io,\
255 cts/tests/core/libcore/harmony_java_io/AndroidManifest.xml,\
256 $(CORETESTS_INTERMEDIATES)/javalib.jar,org.apache.harmony.tests.java.io,\
Stuart Scottf06c6ef2014-10-08 19:01:37 -0700257 $(TARGET_ARCH),libcore/expectations)
Narayan Kamath13a3fe82013-12-31 15:15:41 +0000258
259$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_lang.xml: $(CTS_CORE_XMLS_DEPS)
260 $(hide) mkdir -p $(CTS_TESTCASES_OUT)
261 $(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_lang,\
262 cts/tests/core/libcore/harmony_java_lang/AndroidManifest.xml,\
263 $(CORETESTS_INTERMEDIATES)/javalib.jar,org.apache.harmony.tests.java.lang,\
Stuart Scottf06c6ef2014-10-08 19:01:37 -0700264 $(TARGET_ARCH),libcore/expectations)
Narayan Kamath13a3fe82013-12-31 15:15:41 +0000265
266$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_math.xml: $(CTS_CORE_XMLS_DEPS)
267 $(hide) mkdir -p $(CTS_TESTCASES_OUT)
268 $(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_math,\
269 cts/tests/core/libcore/harmony_java_math/AndroidManifest.xml,\
270 $(CORETESTS_INTERMEDIATES)/javalib.jar,org.apache.harmony.tests.java.math,\
Stuart Scottf06c6ef2014-10-08 19:01:37 -0700271 $(TARGET_ARCH),libcore/expectations)
Narayan Kamath13a3fe82013-12-31 15:15:41 +0000272
273$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_net.xml: $(CTS_CORE_XMLS_DEPS)
274 $(hide) mkdir -p $(CTS_TESTCASES_OUT)
275 $(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_net,\
276 cts/tests/core/libcore/harmony_java_net/AndroidManifest.xml,\
277 $(CORETESTS_INTERMEDIATES)/javalib.jar,org.apache.harmony.tests.java.net,\
Stuart Scottf06c6ef2014-10-08 19:01:37 -0700278 $(TARGET_ARCH),libcore/expectations)
Narayan Kamath13a3fe82013-12-31 15:15:41 +0000279
280$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_nio.xml: $(CTS_CORE_XMLS_DEPS)
281 $(hide) mkdir -p $(CTS_TESTCASES_OUT)
282 $(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_nio,\
283 cts/tests/core/libcore/harmony_java_nio/AndroidManifest.xml,\
284 $(CORETESTS_INTERMEDIATES)/javalib.jar,org.apache.harmony.tests.java.nio,\
Stuart Scottf06c6ef2014-10-08 19:01:37 -0700285 $(TARGET_ARCH),libcore/expectations)
Narayan Kamath13a3fe82013-12-31 15:15:41 +0000286
287$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_text.xml: $(CTS_CORE_XMLS_DEPS)
288 $(hide) mkdir -p $(CTS_TESTCASES_OUT)
289 $(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_text,\
290 cts/tests/core/libcore/harmony_java_text/AndroidManifest.xml,\
291 $(CORETESTS_INTERMEDIATES)/javalib.jar,org.apache.harmony.tests.java.text,\
Stuart Scottf06c6ef2014-10-08 19:01:37 -0700292 $(TARGET_ARCH),libcore/expectations)
Narayan Kamath13a3fe82013-12-31 15:15:41 +0000293
294$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_util.xml: $(CTS_CORE_XMLS_DEPS)
295 $(hide) mkdir -p $(CTS_TESTCASES_OUT)
296 $(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_util,\
297 cts/tests/core/libcore/harmony_java_util/AndroidManifest.xml,\
298 $(CORETESTS_INTERMEDIATES)/javalib.jar,org.apache.harmony.tests.java.util,\
Stuart Scottf06c6ef2014-10-08 19:01:37 -0700299 $(TARGET_ARCH),libcore/expectations)
Narayan Kamath13a3fe82013-12-31 15:15:41 +0000300
301$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_javax_security.xml: $(CTS_CORE_XMLS_DEPS)
302 $(hide) mkdir -p $(CTS_TESTCASES_OUT)
303 $(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_javax_security,\
304 cts/tests/core/libcore/harmony_javax_security/AndroidManifest.xml,\
305 $(CORETESTS_INTERMEDIATES)/javalib.jar,org.apache.harmony.tests.javax.security,\
Stuart Scottf06c6ef2014-10-08 19:01:37 -0700306 $(TARGET_ARCH),libcore/expectations)
Tsu Chiang Chuang6b874c92012-10-24 16:47:49 -0700307
308$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_beans.xml: $(CTS_CORE_XMLS_DEPS)
309 $(hide) mkdir -p $(CTS_TESTCASES_OUT)
310 $(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_beans,\
311 cts/tests/core/libcore/harmony_beans/AndroidManifest.xml,\
Neil Fuller4fdf6742014-05-29 13:18:35 +0100312 $(APACHEHARMONYTESTS_INTERMEDIATES)/javalib.jar,com.android.org.apache.harmony.beans,\
Stuart Scottf06c6ef2014-10-08 19:01:37 -0700313 $(TARGET_ARCH),libcore/expectations external/apache-harmony/Android.mk)
Tsu Chiang Chuang6b874c92012-10-24 16:47:49 -0700314
315$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_logging.xml: $(CTS_CORE_XMLS_DEPS)
316 $(hide) mkdir -p $(CTS_TESTCASES_OUT)
317 $(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_logging,\
318 cts/tests/core/libcore/harmony_logging/AndroidManifest.xml,\
Neil Fuller4fdf6742014-05-29 13:18:35 +0100319 $(APACHEHARMONYTESTS_INTERMEDIATES)/javalib.jar,com.android.org.apache.harmony.logging,\
Stuart Scottf06c6ef2014-10-08 19:01:37 -0700320 $(TARGET_ARCH),libcore/expectations external/apache-harmony/Android.mk)
Tsu Chiang Chuang6b874c92012-10-24 16:47:49 -0700321
Tsu Chiang Chuang6b874c92012-10-24 16:47:49 -0700322$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_prefs.xml: $(CTS_CORE_XMLS_DEPS)
323 $(hide) mkdir -p $(CTS_TESTCASES_OUT)
324 $(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_prefs,\
325 cts/tests/core/libcore/harmony_prefs/AndroidManifest.xml,\
Neil Fuller4fdf6742014-05-29 13:18:35 +0100326 $(APACHEHARMONYTESTS_INTERMEDIATES)/javalib.jar,com.android.org.apache.harmony.prefs,\
Stuart Scottf06c6ef2014-10-08 19:01:37 -0700327 $(TARGET_ARCH),libcore/expectations external/apache-harmony/Android.mk)
Tsu Chiang Chuang6b874c92012-10-24 16:47:49 -0700328
Tsu Chiang Chuang6b874c92012-10-24 16:47:49 -0700329$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_sql.xml: $(CTS_CORE_XMLS_DEPS)
330 $(hide) mkdir -p $(CTS_TESTCASES_OUT)
331 $(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_sql,\
332 cts/tests/core/libcore/harmony_sql/AndroidManifest.xml,\
Neil Fuller4fdf6742014-05-29 13:18:35 +0100333 $(APACHEHARMONYTESTS_INTERMEDIATES)/javalib.jar,com.android.org.apache.harmony.sql,\
Stuart Scottf06c6ef2014-10-08 19:01:37 -0700334 $(TARGET_ARCH),libcore/expectations external/apache-harmony/Android.mk)
Tsu Chiang Chuang6b874c92012-10-24 16:47:49 -0700335
Neil Fuller4fdf6742014-05-29 13:18:35 +0100336$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.okhttp.xml: $(CTS_CORE_XMLS_DEPS)
337 $(hide) mkdir -p $(CTS_TESTCASES_OUT)
338 $(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.okhttp,\
339 cts/tests/core/libcore/okhttp/AndroidManifest.xml,\
340 $(OKHTTPTESTS_INTERMEDIATES)/javalib.jar,,\
Stuart Scottf06c6ef2014-10-08 19:01:37 -0700341 $(TARGET_ARCH),libcore/expectations)
Neil Fuller4fdf6742014-05-29 13:18:35 +0100342
Neil Fuller56128c52015-03-13 14:22:11 +0000343$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.tzdata.xml: $(CTS_CORE_XMLS_DEPS)
344 $(hide) mkdir -p $(CTS_TESTCASES_OUT)
345 $(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.tzdata,\
346 cts/tests/core/libcore/tzdata/AndroidManifest.xml,\
347 $(TZDATAUPDATETESTS_INTERMEDIATES)/javalib.jar,,\
348 $(TARGET_ARCH),libcore/expectations)
349
Tsu Chiang Chuang9d047ac2011-04-27 17:01:32 -0700350# ----- Generate the test descriptions for the vm-tests-tf -----
351#
Brian Muramatsuc0a69242012-01-05 18:24:43 -0800352CORE_VM_TEST_TF_DESC := $(CTS_TESTCASES_OUT)/android.core.vm-tests-tf.xml
Tsu Chiang Chuang9d047ac2011-04-27 17:01:32 -0700353
Tsu Chiang Chuang9d047ac2011-04-27 17:01:32 -0700354# core tests only needed to get hold of junit-framework-classes
Neil Fullerc61caf12014-06-19 11:21:08 +0100355CORE_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core-libart,,COMMON)
Tsu Chiang Chuang9d047ac2011-04-27 17:01:32 -0700356JUNIT_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core-junit,,COMMON)
357
Brett Chabotcf1d2b12014-09-25 12:38:36 -0700358GEN_CLASSPATH := $(CORE_INTERMEDIATES)/classes.jar:$(JUNIT_INTERMEDIATES)/classes.jar:$(VMTESTSTF_JAR):$(TF_JAR)
Tsu Chiang Chuang9d047ac2011-04-27 17:01:32 -0700359
360$(CORE_VM_TEST_TF_DESC): PRIVATE_CLASSPATH:=$(GEN_CLASSPATH)
361# Please see big comment above on why this line depends on javalib.jar instead of classes.jar
Brett Chabotcf1d2b12014-09-25 12:38:36 -0700362$(CORE_VM_TEST_TF_DESC): $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar $(JUNIT_HOST_JAR) $(CORE_INTERMEDIATES)/javalib.jar $(JUNIT_INTERMEDIATES)/javalib.jar $(VMTESTSTF_JAR) | $(ACP)
Brian Muramatsuc0a69242012-01-05 18:24:43 -0800363 $(hide) mkdir -p $(CTS_TESTCASES_OUT)
364 $(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.vm-tests-tf,\
Tsu Chiang Chuang9d047ac2011-04-27 17:01:32 -0700365 cts/tests/vm-tests-tf/AndroidManifest.xml,\
Brian Muramatsuc0a69242012-01-05 18:24:43 -0800366 $(VMTESTSTF_JAR),"",\
Stuart Scottf06c6ef2014-10-08 19:01:37 -0700367 $(TARGET_ARCH),\
Tsu Chiang Chuang9d047ac2011-04-27 17:01:32 -0700368 libcore/expectations,\
369 cts/tools/vm-tests-tf/Android.mk)
Brian Muramatsu237fa072011-12-12 23:54:49 -0800370
The Android Open Source Project88b60792009-03-03 19:28:42 -0800371# Generate the default test plan for User.
Phil Dubach5e3ab042009-08-14 13:48:34 -0700372# Usage: buildCts.py <testRoot> <ctsOutputDir> <tempDir> <androidRootDir> <docletPath>
Brian Muramatsu237fa072011-12-12 23:54:49 -0800373
Stuart Scott5139ce42015-01-27 10:49:25 -0800374$(DEFAULT_TEST_PLAN): $(cts_dir)/all_cts_files_stamp $(cts_tools_src_dir)/utils/buildCts.py $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar $(CTS_CORE_XMLS) $(CTS_TEST_XMLS) $(CORE_VM_TEST_TF_DESC)
Phil Dubach5e3ab042009-08-14 13:48:34 -0700375 $(hide) $(cts_tools_src_dir)/utils/buildCts.py cts/tests/tests/ $(PRIVATE_DIR) $(TMP_DIR) \
376 $(TOP) $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar
Ying Wang51a1ae12013-07-10 11:33:27 -0700377 $(hide) mkdir -p $(dir $@) && touch $@
The Android Open Source Project88b60792009-03-03 19:28:42 -0800378
379# Package CTS and clean up.
380#
381# TODO:
382# Pack cts.bat into the same zip file as well. See http://buganizer/issue?id=1656821 for more details
383INTERNAL_CTS_TARGET := $(cts_dir)/$(cts_name).zip
384$(INTERNAL_CTS_TARGET): PRIVATE_NAME := $(cts_name)
385$(INTERNAL_CTS_TARGET): PRIVATE_CTS_DIR := $(cts_dir)
386$(INTERNAL_CTS_TARGET): PRIVATE_DIR := $(cts_dir)/$(cts_name)
387$(INTERNAL_CTS_TARGET): TMP_DIR := $(cts_dir)/temp
Brian Muramatsu5fc00572011-12-16 13:07:15 -0800388$(INTERNAL_CTS_TARGET): $(cts_dir)/all_cts_files_stamp $(DEFAULT_TEST_PLAN)
Brian Muramatsu1cf9e0e2010-12-06 12:49:13 -0800389 $(hide) echo "Package CTS: $@"
The Android Open Source Project88b60792009-03-03 19:28:42 -0800390 $(hide) cd $(dir $@) && zip -rq $(notdir $@) $(PRIVATE_NAME)
391
392.PHONY: cts
393cts: $(INTERNAL_CTS_TARGET) adb
394$(call dist-for-goals,cts,$(INTERNAL_CTS_TARGET))
395