2009-03-04 04:28:42 +01:00
|
|
|
# Copyright (C) 2008 The Android Open Source Project
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
cts_dir := $(HOST_OUT)/cts
|
|
|
|
cts_tools_src_dir := cts/tools
|
|
|
|
|
|
|
|
cts_name := android-cts
|
|
|
|
|
2014-05-29 14:18:35 +02:00
|
|
|
JUNIT_HOST_JAR := $(HOST_OUT_JAVA_LIBRARIES)/junit.jar
|
2009-08-20 01:26:40 +02:00
|
|
|
HOSTTESTLIB_JAR := $(HOST_OUT_JAVA_LIBRARIES)/hosttestlib.jar
|
2011-01-31 00:07:21 +01:00
|
|
|
TF_JAR := $(HOST_OUT_JAVA_LIBRARIES)/tradefed-prebuilt.jar
|
|
|
|
CTS_TF_JAR := $(HOST_OUT_JAVA_LIBRARIES)/cts-tradefed.jar
|
|
|
|
CTS_TF_EXEC_PATH := $(HOST_OUT_EXECUTABLES)/cts-tradefed
|
2011-02-19 00:13:50 +01:00
|
|
|
CTS_TF_README_PATH := $(cts_tools_src_dir)/tradefed-host/README
|
2009-06-26 23:41:30 +02:00
|
|
|
|
2012-08-21 20:54:49 +02:00
|
|
|
VMTESTSTF_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,vm-tests-tf,HOST)
|
2012-01-06 03:24:43 +01:00
|
|
|
VMTESTSTF_JAR := $(VMTESTSTF_INTERMEDIATES)/android.core.vm-tests-tf.jar
|
|
|
|
|
2013-12-31 16:15:41 +01:00
|
|
|
# The list of test packages that core-tests (libcore/Android.mk)
|
|
|
|
# is split into.
|
2010-05-29 02:02:57 +02:00
|
|
|
CTS_CORE_CASE_LIST := \
|
2011-05-27 09:04:57 +02:00
|
|
|
android.core.tests.libcore.package.dalvik \
|
|
|
|
android.core.tests.libcore.package.com \
|
2013-09-06 00:10:44 +02:00
|
|
|
android.core.tests.libcore.package.conscrypt \
|
2011-05-27 09:04:57 +02:00
|
|
|
android.core.tests.libcore.package.sun \
|
|
|
|
android.core.tests.libcore.package.tests \
|
|
|
|
android.core.tests.libcore.package.org \
|
|
|
|
android.core.tests.libcore.package.libcore \
|
2013-08-21 20:46:03 +02:00
|
|
|
android.core.tests.libcore.package.jsr166 \
|
2012-10-25 01:47:49 +02:00
|
|
|
android.core.tests.libcore.package.harmony_annotation \
|
2013-12-31 16:15:41 +01:00
|
|
|
android.core.tests.libcore.package.harmony_java_io \
|
|
|
|
android.core.tests.libcore.package.harmony_java_lang \
|
|
|
|
android.core.tests.libcore.package.harmony_java_math \
|
|
|
|
android.core.tests.libcore.package.harmony_java_net \
|
|
|
|
android.core.tests.libcore.package.harmony_java_nio \
|
|
|
|
android.core.tests.libcore.package.harmony_java_text \
|
|
|
|
android.core.tests.libcore.package.harmony_java_util \
|
|
|
|
android.core.tests.libcore.package.harmony_javax_security \
|
2014-05-29 14:18:35 +02:00
|
|
|
android.core.tests.libcore.package.okhttp \
|
2013-12-31 16:15:41 +01:00
|
|
|
android.core.tests.runner
|
|
|
|
|
2015-03-13 15:22:11 +01:00
|
|
|
# Additional CTS packages for code under libcore
|
|
|
|
CTS_CORE_CASE_LIST += \
|
|
|
|
android.core.tests.libcore.package.tzdata
|
|
|
|
|
2013-12-31 16:15:41 +01:00
|
|
|
# The list of test packages that apache-harmony-tests (external/apache-harmony/Android.mk)
|
|
|
|
# is split into.
|
|
|
|
CTS_CORE_CASE_LIST += \
|
2012-10-25 01:47:49 +02:00
|
|
|
android.core.tests.libcore.package.harmony_beans \
|
|
|
|
android.core.tests.libcore.package.harmony_logging \
|
|
|
|
android.core.tests.libcore.package.harmony_prefs \
|
2013-12-31 16:15:41 +01:00
|
|
|
android.core.tests.libcore.package.harmony_sql
|
2009-04-17 20:27:08 +02:00
|
|
|
|
2014-06-18 18:59:49 +02:00
|
|
|
|
|
|
|
CTS_TEST_JAR_LIST := \
|
2014-06-26 20:40:02 +02:00
|
|
|
cts-junit \
|
2015-04-21 20:25:28 +02:00
|
|
|
CtsJdwp
|
2014-06-18 18:59:49 +02:00
|
|
|
|
2012-01-06 03:24:43 +01:00
|
|
|
# Depend on the full package paths rather than the phony targets to avoid
|
|
|
|
# rebuilding the packages every time.
|
|
|
|
CTS_CORE_CASES := $(foreach pkg,$(CTS_CORE_CASE_LIST),$(call intermediates-dir-for,APPS,$(pkg))/package.apk)
|
2014-06-18 18:59:49 +02:00
|
|
|
CTS_TEST_JAR_FILES := $(foreach c,$(CTS_TEST_JAR_LIST),$(call intermediates-dir-for,JAVA_LIBRARIES,$(c))/javalib.jar)
|
2012-01-06 03:24:43 +01:00
|
|
|
|
2010-07-22 23:46:53 +02:00
|
|
|
-include cts/CtsTestCaseList.mk
|
|
|
|
CTS_CASE_LIST := $(CTS_CORE_CASE_LIST) $(CTS_TEST_CASE_LIST)
|
2009-03-04 04:28:42 +01:00
|
|
|
|
2014-10-01 20:46:30 +02:00
|
|
|
# A module may have mutliple installed files (e.g. split apks)
|
|
|
|
CTS_CASE_LIST_APKS :=
|
|
|
|
CTS_CASE_LIST_APKS_DIR := $(cts_dir)/$(cts_name)/repository/testcases/
|
|
|
|
$(foreach m, $(CTS_CASE_LIST),\
|
|
|
|
$(foreach fp, $(ALL_MODULES.$(m).BUILT_INSTALLED),\
|
|
|
|
$(eval pair := $(subst :,$(space),$(fp)))\
|
|
|
|
$(eval built := $(word 1,$(pair)))\
|
|
|
|
$(eval installed := $(CTS_CASE_LIST_APKS_DIR)/$(notdir $(word 2,$(pair))))\
|
|
|
|
$(eval $(call copy-one-file, $(built), $(installed)))\
|
|
|
|
$(eval CTS_CASE_LIST_APKS += $(installed))))
|
|
|
|
|
2015-04-21 20:25:28 +02:00
|
|
|
CTS_SHARED_LIBS := \
|
|
|
|
$(HOST_LIBRARY_PATH)/libc++$(HOST_SHLIB_SUFFIX)
|
|
|
|
|
2010-06-15 23:29:19 +02:00
|
|
|
DEFAULT_TEST_PLAN := $(cts_dir)/$(cts_name)/resource/plans
|
2015-04-21 20:25:28 +02:00
|
|
|
$(cts_dir)/all_cts_files_stamp: $(CTS_CORE_CASES) $(CTS_TEST_CASES) $(CTS_CASE_LIST_APKS) $(JUNIT_HOST_JAR) $(HOSTTESTLIB_JAR) $(CTS_HOST_LIBRARY_JARS) $(TF_JAR) $(VMTESTSTF_JAR) $(CTS_TF_JAR) $(CTS_TF_EXEC_PATH) $(CTS_TF_README_PATH) $(ACP) $(CTS_TEST_JAR_FILES) $(CTS_SHARED_LIBS)
|
2009-03-04 04:28:42 +01:00
|
|
|
# Make necessary directory for CTS
|
2010-12-06 21:49:13 +01:00
|
|
|
$(hide) mkdir -p $(TMP_DIR)
|
|
|
|
$(hide) mkdir -p $(PRIVATE_DIR)/docs
|
|
|
|
$(hide) mkdir -p $(PRIVATE_DIR)/tools
|
|
|
|
$(hide) mkdir -p $(PRIVATE_DIR)/repository/testcases
|
|
|
|
$(hide) mkdir -p $(PRIVATE_DIR)/repository/plans
|
2010-09-02 21:36:59 +02:00
|
|
|
# Copy executable and JARs to CTS directory
|
2012-01-06 03:24:43 +01:00
|
|
|
$(hide) $(ACP) -fp $(VMTESTSTF_JAR) $(PRIVATE_DIR)/repository/testcases
|
2014-09-25 21:38:36 +02:00
|
|
|
$(hide) $(ACP) -fp $(HOSTTESTLIB_JAR) $(CTS_HOST_LIBRARY_JARS) $(TF_JAR) $(CTS_TF_JAR) $(CTS_TF_EXEC_PATH) $(CTS_TF_README_PATH) $(PRIVATE_DIR)/tools
|
2015-04-21 20:25:28 +02:00
|
|
|
$(hide) $(call copy-files-with-structure, $(CTS_SHARED_LIBS),$(HOST_OUT)/,$(PRIVATE_DIR))
|
2009-03-04 04:28:42 +01:00
|
|
|
# Change mode of the executables
|
2014-06-18 18:59:49 +02:00
|
|
|
$(foreach jar,$(CTS_TEST_JAR_LIST),$(call copy-testcase-jar,$(jar)))
|
2011-12-13 08:54:49 +01:00
|
|
|
$(foreach testcase,$(CTS_TEST_CASES),$(call copy-testcase,$(testcase)))
|
2009-03-04 04:28:42 +01:00
|
|
|
$(hide) touch $@
|
|
|
|
|
2009-04-17 20:27:08 +02:00
|
|
|
# Generate the test descriptions for the core-tests
|
2009-08-07 19:59:04 +02:00
|
|
|
# Parameters:
|
|
|
|
# $1 : The output file where the description should be written (without the '.xml' extension)
|
|
|
|
# $2 : The AndroidManifest.xml corresponding to the test package
|
2011-04-02 00:45:58 +02:00
|
|
|
# $3 : The jar file name on PRIVATE_CLASSPATH containing junit tests to search for
|
2011-05-27 09:04:57 +02:00
|
|
|
# $4 : The package prefix of classes to include, possible empty
|
2014-10-09 04:01:37 +02:00
|
|
|
# $5 : The architecture of the current build
|
|
|
|
# $6 : The directory containing vogar expectations files
|
|
|
|
# $7 : The Android.mk corresponding to the test package (required for host-side tests only)
|
2009-04-17 20:27:08 +02:00
|
|
|
define generate-core-test-description
|
|
|
|
@echo "Generate core-test description ("$(notdir $(1))")"
|
2011-04-02 00:45:58 +02:00
|
|
|
$(hide) java -Xmx256M \
|
2014-05-29 14:18:35 +02:00
|
|
|
-Xbootclasspath/a:$(PRIVATE_CLASSPATH):$(JUNIT_HOST_JAR) \
|
|
|
|
-classpath $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar:$(HOST_JDK_TOOLS_JAR) \
|
2014-10-09 04:01:37 +02:00
|
|
|
$(PRIVATE_PARAMS) CollectAllTests $(1) $(2) $(3) "$(4)" $(5) $(6) $(7)
|
2009-04-17 20:27:08 +02:00
|
|
|
endef
|
2009-03-05 23:34:30 +01:00
|
|
|
|
2014-06-19 00:11:01 +02:00
|
|
|
CORE_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core-libart,,COMMON)
|
2013-04-29 22:25:29 +02:00
|
|
|
CONSCRYPT_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,conscrypt,,COMMON)
|
2011-04-02 00:45:58 +02:00
|
|
|
BOUNCYCASTLE_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,bouncycastle,,COMMON)
|
|
|
|
APACHEXML_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,apache-xml,,COMMON)
|
2014-05-29 14:18:35 +02:00
|
|
|
OKHTTP_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,okhttp-nojarjar,,COMMON)
|
|
|
|
OKHTTPTESTS_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,okhttp-tests-nojarjar,,COMMON)
|
|
|
|
OKHTTP_REPACKAGED_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,okhttp,,COMMON)
|
|
|
|
APACHEHARMONYTESTS_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,apache-harmony-tests,,COMMON)
|
2011-04-02 00:45:58 +02:00
|
|
|
SQLITEJDBC_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,sqlite-jdbc,,COMMON)
|
2010-05-29 03:47:17 +02:00
|
|
|
JUNIT_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core-junit,,COMMON)
|
2011-04-02 00:45:58 +02:00
|
|
|
CORETESTS_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core-tests,,COMMON)
|
2013-08-21 20:46:03 +02:00
|
|
|
JSR166TESTS_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,jsr166-tests,,COMMON)
|
2013-09-06 00:10:44 +02:00
|
|
|
CONSCRYPTTESTS_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,conscrypt-tests,,COMMON)
|
2015-03-13 15:22:11 +01:00
|
|
|
TZDATAUPDATETESTS_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,tzdata_update-tests,,COMMON)
|
2011-04-02 00:45:58 +02:00
|
|
|
|
2015-03-13 15:22:11 +01:00
|
|
|
GEN_CLASSPATH := \
|
|
|
|
$(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
|
2009-03-05 23:34:30 +01:00
|
|
|
|
2012-01-06 03:24:43 +01:00
|
|
|
CTS_CORE_XMLS := \
|
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.dalvik.xml \
|
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.com.xml \
|
2013-09-06 00:10:44 +02:00
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.conscrypt.xml \
|
2012-01-06 03:24:43 +01:00
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.sun.xml \
|
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.tests.xml \
|
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.org.xml \
|
2013-08-21 20:46:03 +02:00
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.libcore.xml \
|
2012-10-25 01:47:49 +02:00
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.jsr166.xml \
|
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_annotation.xml \
|
2013-12-31 16:15:41 +01:00
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_io.xml \
|
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_lang.xml \
|
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_math.xml \
|
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_net.xml \
|
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_nio.xml \
|
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_text.xml \
|
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_util.xml \
|
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_javax_security.xml \
|
2012-10-25 01:47:49 +02:00
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_beans.xml \
|
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_logging.xml \
|
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_prefs.xml \
|
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_sql.xml \
|
2014-05-29 14:18:35 +02:00
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.okhttp.xml \
|
2015-03-13 15:22:11 +01:00
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.tzdata.xml \
|
2012-01-06 03:24:43 +01:00
|
|
|
|
|
|
|
$(CTS_CORE_XMLS): PRIVATE_CLASSPATH:=$(GEN_CLASSPATH)
|
2009-03-05 23:34:30 +01:00
|
|
|
# Why does this depend on javalib.jar instead of classes.jar? Because
|
|
|
|
# even though the tool will operate on the classes.jar files, the
|
|
|
|
# build system requires that dependencies use javalib.jar. If
|
|
|
|
# javalib.jar is up-to-date, then classes.jar is as well. Depending
|
|
|
|
# on classes.jar will build the files incorrectly.
|
2015-04-01 19:02:46 +02:00
|
|
|
CTS_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)
|
2013-07-11 01:58:52 +02:00
|
|
|
|
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.dalvik.xml: $(CTS_CORE_XMLS_DEPS)
|
2012-01-06 03:24:43 +01:00
|
|
|
$(hide) mkdir -p $(CTS_TESTCASES_OUT)
|
|
|
|
$(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.dalvik,\
|
2011-05-27 09:04:57 +02:00
|
|
|
cts/tests/core/libcore/dalvik/AndroidManifest.xml,\
|
|
|
|
$(CORETESTS_INTERMEDIATES)/javalib.jar,dalvik,\
|
2014-10-09 04:01:37 +02:00
|
|
|
$(TARGET_ARCH),libcore/expectations)
|
2013-07-11 01:58:52 +02:00
|
|
|
|
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.com.xml: $(CTS_CORE_XMLS_DEPS)
|
|
|
|
$(hide) mkdir -p $(CTS_TESTCASES_OUT)
|
2012-01-06 03:24:43 +01:00
|
|
|
$(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.com,\
|
2011-05-27 09:04:57 +02:00
|
|
|
cts/tests/core/libcore/com/AndroidManifest.xml,\
|
|
|
|
$(CORETESTS_INTERMEDIATES)/javalib.jar,com,\
|
2014-10-09 04:01:37 +02:00
|
|
|
$(TARGET_ARCH),libcore/expectations)
|
2013-07-11 01:58:52 +02:00
|
|
|
|
2013-09-06 00:10:44 +02:00
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.conscrypt.xml: $(CTS_CORE_XMLS_DEPS)
|
|
|
|
$(hide) mkdir -p $(CTS_TESTCASES_OUT)
|
|
|
|
$(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.conscrypt,\
|
|
|
|
cts/tests/core/libcore/conscrypt/AndroidManifest.xml,\
|
|
|
|
$(CONSCRYPTTESTS_INTERMEDIATES)/javalib.jar,,\
|
2014-10-09 04:01:37 +02:00
|
|
|
$(TARGET_ARCH),libcore/expectations)
|
2013-09-06 00:10:44 +02:00
|
|
|
|
2013-07-11 01:58:52 +02:00
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.sun.xml: $(CTS_CORE_XMLS_DEPS)
|
|
|
|
$(hide) mkdir -p $(CTS_TESTCASES_OUT)
|
2012-01-06 03:24:43 +01:00
|
|
|
$(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.sun,\
|
2011-05-27 09:04:57 +02:00
|
|
|
cts/tests/core/libcore/sun/AndroidManifest.xml,\
|
|
|
|
$(CORETESTS_INTERMEDIATES)/javalib.jar,sun,\
|
2014-10-09 04:01:37 +02:00
|
|
|
$(TARGET_ARCH),libcore/expectations)
|
2013-07-11 01:58:52 +02:00
|
|
|
|
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.tests.xml: $(CTS_CORE_XMLS_DEPS)
|
|
|
|
$(hide) mkdir -p $(CTS_TESTCASES_OUT)
|
2012-01-06 03:24:43 +01:00
|
|
|
$(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.tests,\
|
2011-05-27 09:04:57 +02:00
|
|
|
cts/tests/core/libcore/tests/AndroidManifest.xml,\
|
|
|
|
$(CORETESTS_INTERMEDIATES)/javalib.jar,tests,\
|
2014-10-09 04:01:37 +02:00
|
|
|
$(TARGET_ARCH),libcore/expectations)
|
2013-07-11 01:58:52 +02:00
|
|
|
|
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.org.xml: $(CTS_CORE_XMLS_DEPS)
|
|
|
|
$(hide) mkdir -p $(CTS_TESTCASES_OUT)
|
2012-01-06 03:24:43 +01:00
|
|
|
$(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.org,\
|
2011-05-27 09:04:57 +02:00
|
|
|
cts/tests/core/libcore/org/AndroidManifest.xml,\
|
|
|
|
$(CORETESTS_INTERMEDIATES)/javalib.jar,org,\
|
2014-10-09 04:01:37 +02:00
|
|
|
$(TARGET_ARCH),libcore/expectations)
|
2013-07-11 01:58:52 +02:00
|
|
|
|
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.libcore.xml: $(CTS_CORE_XMLS_DEPS)
|
|
|
|
$(hide) mkdir -p $(CTS_TESTCASES_OUT)
|
2012-01-06 03:24:43 +01:00
|
|
|
$(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.libcore,\
|
2011-05-27 09:04:57 +02:00
|
|
|
cts/tests/core/libcore/libcore/AndroidManifest.xml,\
|
|
|
|
$(CORETESTS_INTERMEDIATES)/javalib.jar,libcore,\
|
2014-10-09 04:01:37 +02:00
|
|
|
$(TARGET_ARCH),libcore/expectations)
|
2009-03-05 23:34:30 +01:00
|
|
|
|
2013-08-21 20:46:03 +02:00
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.jsr166.xml: $(CTS_CORE_XMLS_DEPS)
|
|
|
|
$(hide) mkdir -p $(CTS_TESTCASES_OUT)
|
|
|
|
$(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.jsr166,\
|
|
|
|
cts/tests/core/libcore/jsr166/AndroidManifest.xml,\
|
|
|
|
$(JSR166TESTS_INTERMEDIATES)/javalib.jar,jsr166,\
|
2014-10-09 04:01:37 +02:00
|
|
|
$(TARGET_ARCH),libcore/expectations)
|
2013-08-21 20:46:03 +02:00
|
|
|
|
2012-10-25 01:47:49 +02:00
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_annotation.xml: $(CTS_CORE_XMLS_DEPS)
|
|
|
|
$(hide) mkdir -p $(CTS_TESTCASES_OUT)
|
|
|
|
$(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_annotation,\
|
|
|
|
cts/tests/core/libcore/harmony_annotation/AndroidManifest.xml,\
|
2013-12-31 16:15:41 +01:00
|
|
|
$(CORETESTS_INTERMEDIATES)/javalib.jar,org.apache.harmony.annotation.tests,\
|
2014-10-09 04:01:37 +02:00
|
|
|
$(TARGET_ARCH),libcore/expectations)
|
2012-10-25 01:47:49 +02:00
|
|
|
|
2013-12-31 16:15:41 +01:00
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_io.xml: $(CTS_CORE_XMLS_DEPS)
|
2012-10-25 01:47:49 +02:00
|
|
|
$(hide) mkdir -p $(CTS_TESTCASES_OUT)
|
2013-12-31 16:15:41 +01:00
|
|
|
$(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_io,\
|
|
|
|
cts/tests/core/libcore/harmony_java_io/AndroidManifest.xml,\
|
|
|
|
$(CORETESTS_INTERMEDIATES)/javalib.jar,org.apache.harmony.tests.java.io,\
|
2014-10-09 04:01:37 +02:00
|
|
|
$(TARGET_ARCH),libcore/expectations)
|
2013-12-31 16:15:41 +01:00
|
|
|
|
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_lang.xml: $(CTS_CORE_XMLS_DEPS)
|
|
|
|
$(hide) mkdir -p $(CTS_TESTCASES_OUT)
|
|
|
|
$(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_lang,\
|
|
|
|
cts/tests/core/libcore/harmony_java_lang/AndroidManifest.xml,\
|
|
|
|
$(CORETESTS_INTERMEDIATES)/javalib.jar,org.apache.harmony.tests.java.lang,\
|
2014-10-09 04:01:37 +02:00
|
|
|
$(TARGET_ARCH),libcore/expectations)
|
2013-12-31 16:15:41 +01:00
|
|
|
|
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_math.xml: $(CTS_CORE_XMLS_DEPS)
|
|
|
|
$(hide) mkdir -p $(CTS_TESTCASES_OUT)
|
|
|
|
$(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_math,\
|
|
|
|
cts/tests/core/libcore/harmony_java_math/AndroidManifest.xml,\
|
|
|
|
$(CORETESTS_INTERMEDIATES)/javalib.jar,org.apache.harmony.tests.java.math,\
|
2014-10-09 04:01:37 +02:00
|
|
|
$(TARGET_ARCH),libcore/expectations)
|
2013-12-31 16:15:41 +01:00
|
|
|
|
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_net.xml: $(CTS_CORE_XMLS_DEPS)
|
|
|
|
$(hide) mkdir -p $(CTS_TESTCASES_OUT)
|
|
|
|
$(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_net,\
|
|
|
|
cts/tests/core/libcore/harmony_java_net/AndroidManifest.xml,\
|
|
|
|
$(CORETESTS_INTERMEDIATES)/javalib.jar,org.apache.harmony.tests.java.net,\
|
2014-10-09 04:01:37 +02:00
|
|
|
$(TARGET_ARCH),libcore/expectations)
|
2013-12-31 16:15:41 +01:00
|
|
|
|
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_nio.xml: $(CTS_CORE_XMLS_DEPS)
|
|
|
|
$(hide) mkdir -p $(CTS_TESTCASES_OUT)
|
|
|
|
$(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_nio,\
|
|
|
|
cts/tests/core/libcore/harmony_java_nio/AndroidManifest.xml,\
|
|
|
|
$(CORETESTS_INTERMEDIATES)/javalib.jar,org.apache.harmony.tests.java.nio,\
|
2014-10-09 04:01:37 +02:00
|
|
|
$(TARGET_ARCH),libcore/expectations)
|
2013-12-31 16:15:41 +01:00
|
|
|
|
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_text.xml: $(CTS_CORE_XMLS_DEPS)
|
|
|
|
$(hide) mkdir -p $(CTS_TESTCASES_OUT)
|
|
|
|
$(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_text,\
|
|
|
|
cts/tests/core/libcore/harmony_java_text/AndroidManifest.xml,\
|
|
|
|
$(CORETESTS_INTERMEDIATES)/javalib.jar,org.apache.harmony.tests.java.text,\
|
2014-10-09 04:01:37 +02:00
|
|
|
$(TARGET_ARCH),libcore/expectations)
|
2013-12-31 16:15:41 +01:00
|
|
|
|
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_util.xml: $(CTS_CORE_XMLS_DEPS)
|
|
|
|
$(hide) mkdir -p $(CTS_TESTCASES_OUT)
|
|
|
|
$(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_util,\
|
|
|
|
cts/tests/core/libcore/harmony_java_util/AndroidManifest.xml,\
|
|
|
|
$(CORETESTS_INTERMEDIATES)/javalib.jar,org.apache.harmony.tests.java.util,\
|
2014-10-09 04:01:37 +02:00
|
|
|
$(TARGET_ARCH),libcore/expectations)
|
2013-12-31 16:15:41 +01:00
|
|
|
|
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_javax_security.xml: $(CTS_CORE_XMLS_DEPS)
|
|
|
|
$(hide) mkdir -p $(CTS_TESTCASES_OUT)
|
|
|
|
$(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_javax_security,\
|
|
|
|
cts/tests/core/libcore/harmony_javax_security/AndroidManifest.xml,\
|
|
|
|
$(CORETESTS_INTERMEDIATES)/javalib.jar,org.apache.harmony.tests.javax.security,\
|
2014-10-09 04:01:37 +02:00
|
|
|
$(TARGET_ARCH),libcore/expectations)
|
2012-10-25 01:47:49 +02:00
|
|
|
|
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_beans.xml: $(CTS_CORE_XMLS_DEPS)
|
|
|
|
$(hide) mkdir -p $(CTS_TESTCASES_OUT)
|
|
|
|
$(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_beans,\
|
|
|
|
cts/tests/core/libcore/harmony_beans/AndroidManifest.xml,\
|
2014-05-29 14:18:35 +02:00
|
|
|
$(APACHEHARMONYTESTS_INTERMEDIATES)/javalib.jar,com.android.org.apache.harmony.beans,\
|
2014-10-09 04:01:37 +02:00
|
|
|
$(TARGET_ARCH),libcore/expectations external/apache-harmony/Android.mk)
|
2012-10-25 01:47:49 +02:00
|
|
|
|
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_logging.xml: $(CTS_CORE_XMLS_DEPS)
|
|
|
|
$(hide) mkdir -p $(CTS_TESTCASES_OUT)
|
|
|
|
$(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_logging,\
|
|
|
|
cts/tests/core/libcore/harmony_logging/AndroidManifest.xml,\
|
2014-05-29 14:18:35 +02:00
|
|
|
$(APACHEHARMONYTESTS_INTERMEDIATES)/javalib.jar,com.android.org.apache.harmony.logging,\
|
2014-10-09 04:01:37 +02:00
|
|
|
$(TARGET_ARCH),libcore/expectations external/apache-harmony/Android.mk)
|
2012-10-25 01:47:49 +02:00
|
|
|
|
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_prefs.xml: $(CTS_CORE_XMLS_DEPS)
|
|
|
|
$(hide) mkdir -p $(CTS_TESTCASES_OUT)
|
|
|
|
$(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_prefs,\
|
|
|
|
cts/tests/core/libcore/harmony_prefs/AndroidManifest.xml,\
|
2014-05-29 14:18:35 +02:00
|
|
|
$(APACHEHARMONYTESTS_INTERMEDIATES)/javalib.jar,com.android.org.apache.harmony.prefs,\
|
2014-10-09 04:01:37 +02:00
|
|
|
$(TARGET_ARCH),libcore/expectations external/apache-harmony/Android.mk)
|
2012-10-25 01:47:49 +02:00
|
|
|
|
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_sql.xml: $(CTS_CORE_XMLS_DEPS)
|
|
|
|
$(hide) mkdir -p $(CTS_TESTCASES_OUT)
|
|
|
|
$(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_sql,\
|
|
|
|
cts/tests/core/libcore/harmony_sql/AndroidManifest.xml,\
|
2014-05-29 14:18:35 +02:00
|
|
|
$(APACHEHARMONYTESTS_INTERMEDIATES)/javalib.jar,com.android.org.apache.harmony.sql,\
|
2014-10-09 04:01:37 +02:00
|
|
|
$(TARGET_ARCH),libcore/expectations external/apache-harmony/Android.mk)
|
2012-10-25 01:47:49 +02:00
|
|
|
|
2014-05-29 14:18:35 +02:00
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.okhttp.xml: $(CTS_CORE_XMLS_DEPS)
|
|
|
|
$(hide) mkdir -p $(CTS_TESTCASES_OUT)
|
|
|
|
$(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.okhttp,\
|
|
|
|
cts/tests/core/libcore/okhttp/AndroidManifest.xml,\
|
|
|
|
$(OKHTTPTESTS_INTERMEDIATES)/javalib.jar,,\
|
2014-10-09 04:01:37 +02:00
|
|
|
$(TARGET_ARCH),libcore/expectations)
|
2014-05-29 14:18:35 +02:00
|
|
|
|
2015-03-13 15:22:11 +01:00
|
|
|
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.tzdata.xml: $(CTS_CORE_XMLS_DEPS)
|
|
|
|
$(hide) mkdir -p $(CTS_TESTCASES_OUT)
|
|
|
|
$(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.tzdata,\
|
|
|
|
cts/tests/core/libcore/tzdata/AndroidManifest.xml,\
|
|
|
|
$(TZDATAUPDATETESTS_INTERMEDIATES)/javalib.jar,,\
|
|
|
|
$(TARGET_ARCH),libcore/expectations)
|
|
|
|
|
2011-04-28 02:01:32 +02:00
|
|
|
# ----- Generate the test descriptions for the vm-tests-tf -----
|
|
|
|
#
|
2012-01-06 03:24:43 +01:00
|
|
|
CORE_VM_TEST_TF_DESC := $(CTS_TESTCASES_OUT)/android.core.vm-tests-tf.xml
|
2011-04-28 02:01:32 +02:00
|
|
|
|
|
|
|
# core tests only needed to get hold of junit-framework-classes
|
2014-06-19 12:21:08 +02:00
|
|
|
CORE_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core-libart,,COMMON)
|
2011-04-28 02:01:32 +02:00
|
|
|
JUNIT_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,core-junit,,COMMON)
|
|
|
|
|
2014-09-25 21:38:36 +02:00
|
|
|
GEN_CLASSPATH := $(CORE_INTERMEDIATES)/classes.jar:$(JUNIT_INTERMEDIATES)/classes.jar:$(VMTESTSTF_JAR):$(TF_JAR)
|
2011-04-28 02:01:32 +02:00
|
|
|
|
|
|
|
$(CORE_VM_TEST_TF_DESC): PRIVATE_CLASSPATH:=$(GEN_CLASSPATH)
|
|
|
|
# Please see big comment above on why this line depends on javalib.jar instead of classes.jar
|
2014-09-25 21:38:36 +02:00
|
|
|
$(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)
|
2012-01-06 03:24:43 +01:00
|
|
|
$(hide) mkdir -p $(CTS_TESTCASES_OUT)
|
|
|
|
$(call generate-core-test-description,$(CTS_TESTCASES_OUT)/android.core.vm-tests-tf,\
|
2011-04-28 02:01:32 +02:00
|
|
|
cts/tests/vm-tests-tf/AndroidManifest.xml,\
|
2012-01-06 03:24:43 +01:00
|
|
|
$(VMTESTSTF_JAR),"",\
|
2014-10-09 04:01:37 +02:00
|
|
|
$(TARGET_ARCH),\
|
2011-04-28 02:01:32 +02:00
|
|
|
libcore/expectations,\
|
|
|
|
cts/tools/vm-tests-tf/Android.mk)
|
2011-12-13 08:54:49 +01:00
|
|
|
|
2009-03-04 04:28:42 +01:00
|
|
|
# Generate the default test plan for User.
|
2009-08-14 22:48:34 +02:00
|
|
|
# Usage: buildCts.py <testRoot> <ctsOutputDir> <tempDir> <androidRootDir> <docletPath>
|
2011-12-13 08:54:49 +01:00
|
|
|
|
2012-01-06 03:24:43 +01:00
|
|
|
$(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) | $(ACP)
|
|
|
|
$(hide) $(ACP) -fp $(CTS_CORE_XMLS) $(CTS_TEST_XMLS) $(CORE_VM_TEST_TF_DESC) $(PRIVATE_DIR)/repository/testcases
|
2009-08-14 22:48:34 +02:00
|
|
|
$(hide) $(cts_tools_src_dir)/utils/buildCts.py cts/tests/tests/ $(PRIVATE_DIR) $(TMP_DIR) \
|
|
|
|
$(TOP) $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar
|
2013-07-10 20:33:27 +02:00
|
|
|
$(hide) mkdir -p $(dir $@) && touch $@
|
2009-03-04 04:28:42 +01:00
|
|
|
|
|
|
|
# Package CTS and clean up.
|
|
|
|
#
|
|
|
|
# TODO:
|
|
|
|
# Pack cts.bat into the same zip file as well. See http://buganizer/issue?id=1656821 for more details
|
|
|
|
INTERNAL_CTS_TARGET := $(cts_dir)/$(cts_name).zip
|
|
|
|
$(INTERNAL_CTS_TARGET): PRIVATE_NAME := $(cts_name)
|
|
|
|
$(INTERNAL_CTS_TARGET): PRIVATE_CTS_DIR := $(cts_dir)
|
|
|
|
$(INTERNAL_CTS_TARGET): PRIVATE_DIR := $(cts_dir)/$(cts_name)
|
|
|
|
$(INTERNAL_CTS_TARGET): TMP_DIR := $(cts_dir)/temp
|
2011-12-16 22:07:15 +01:00
|
|
|
$(INTERNAL_CTS_TARGET): $(cts_dir)/all_cts_files_stamp $(DEFAULT_TEST_PLAN)
|
2010-12-06 21:49:13 +01:00
|
|
|
$(hide) echo "Package CTS: $@"
|
2009-03-04 04:28:42 +01:00
|
|
|
$(hide) cd $(dir $@) && zip -rq $(notdir $@) $(PRIVATE_NAME)
|
|
|
|
|
|
|
|
.PHONY: cts
|
|
|
|
cts: $(INTERNAL_CTS_TARGET) adb
|
|
|
|
$(call dist-for-goals,cts,$(INTERNAL_CTS_TARGET))
|
|
|
|
|
2011-12-13 08:54:49 +01:00
|
|
|
|
|
|
|
define copy-testcase
|
|
|
|
|
|
|
|
$(hide) $(ACP) -fp $(1) $(PRIVATE_DIR)/repository/testcases/$(notdir $1)
|
|
|
|
|
|
|
|
endef
|
2014-06-18 18:59:49 +02:00
|
|
|
|
|
|
|
define copy-testcase-jar
|
|
|
|
|
|
|
|
$(hide) $(ACP) -fp $(call intermediates-dir-for,JAVA_LIBRARIES,$(1))/javalib.jar \
|
|
|
|
$(PRIVATE_DIR)/repository/testcases/$(1).jar
|
|
|
|
|
|
|
|
endef
|