Fix up android.core CTS tests.

Fix several wrongly configured tests that were either
looking for tests in the wrong jar (apache-harmony-tests
instead of core-tests) or using the wrong prefix.

Also, this change creates subsets of the harmony tests based
on subpackage names (java.net, java.io, java.nio etc.) instead
of the earlier harmony groupings.

Change-Id: Iea0e20d23512611d1aac92b2f8219031b6396c77
This commit is contained in:
Narayan Kamath 2013-12-31 15:15:41 +00:00
parent 7d42d0f251
commit ba0b0e71ae
1 changed files with 81 additions and 75 deletions

View File

@ -28,6 +28,8 @@ CTS_TF_README_PATH := $(cts_tools_src_dir)/tradefed-host/README
VMTESTSTF_INTERMEDIATES :=$(call intermediates-dir-for,JAVA_LIBRARIES,vm-tests-tf,HOST)
VMTESTSTF_JAR := $(VMTESTSTF_INTERMEDIATES)/android.core.vm-tests-tf.jar
# The list of test packages that core-tests (libcore/Android.mk)
# is split into.
CTS_CORE_CASE_LIST := \
android.core.tests.libcore.package.dalvik \
android.core.tests.libcore.package.com \
@ -38,19 +40,23 @@ CTS_CORE_CASE_LIST := \
android.core.tests.libcore.package.libcore \
android.core.tests.libcore.package.jsr166 \
android.core.tests.libcore.package.harmony_annotation \
android.core.tests.libcore.package.harmony_archive \
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 \
android.core.tests.runner
# The list of test packages that apache-harmony-tests (external/apache-harmony/Android.mk)
# is split into.
CTS_CORE_CASE_LIST += \
android.core.tests.libcore.package.harmony_beans \
android.core.tests.libcore.package.harmony_logging \
android.core.tests.libcore.package.harmony_luni \
android.core.tests.libcore.package.harmony_math \
android.core.tests.libcore.package.harmony_nio \
android.core.tests.libcore.package.harmony_nio_char \
android.core.tests.libcore.package.harmony_prefs \
android.core.tests.libcore.package.harmony_regex \
android.core.tests.libcore.package.harmony_sql \
android.core.tests.libcore.package.harmony_support \
android.core.tests.libcore.package.harmony_text \
android.core.tests.runner
android.core.tests.libcore.package.harmony_sql
# Depend on the full package paths rather than the phony targets to avoid
# rebuilding the packages every time.
@ -118,19 +124,18 @@ CTS_CORE_XMLS := \
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.libcore.xml \
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.jsr166.xml \
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_annotation.xml \
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_archive.xml \
$(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 \
$(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_luni.xml \
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_math.xml \
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_nio.xml \
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_nio_char.xml \
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_prefs.xml \
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_regex.xml \
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_sql.xml \
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_support.xml \
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_text.xml \
#
$(CTS_CORE_XMLS): PRIVATE_CLASSPATH:=$(GEN_CLASSPATH)
# Why does this depend on javalib.jar instead of classes.jar? Because
@ -138,7 +143,7 @@ $(CTS_CORE_XMLS): PRIVATE_CLASSPATH:=$(GEN_CLASSPATH)
# 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.
CTS_CORE_XMLS_DEPS := $(CTS_CORE_CASES) $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar $(HOST_OUT_JAVA_LIBRARIES)/junit.jar $(CORE_INTERMEDIATES)/javalib.jar $(BOUNCYCASTLE_INTERMEDIATES)/javalib.jar $(APACHEXML_INTERMEDIATES)/javalib.jar $(APACHEHARMONY_INTERMEDIATES)/javalib.jar $(OKHTTP_INTERMEDIATES)/javalib.jar $(SQLITEJDBC_INTERMEDIATES)/javalib.jar $(JUNIT_INTERMEDIATES)/javalib.jar $(CORETESTS_INTERMEDIATES)/javalib.jar $(JSR166TESTS_INTERMEDIATES)/javalib.jar $(CONSCRYPTTESTS_INTERMEDIATES)/javalib.jar | $(ACP)
CTS_CORE_XMLS_DEPS := $(CTS_CORE_CASES) $(HOST_OUT_JAVA_LIBRARIES)/descGen.jar $(HOST_OUT_JAVA_LIBRARIES)/junit.jar $(CORE_INTERMEDIATES)/javalib.jar $(BOUNCYCASTLE_INTERMEDIATES)/javalib.jar $(APACHEXML_INTERMEDIATES)/javalib.jar $(APACHEHARMONY_INTERMEDIATES)/javalib.jar $(OKHTTP_INTERMEDIATES)/javalib.jar $(SQLITEJDBC_INTERMEDIATES)/javalib.jar $(JUNIT_INTERMEDIATES)/javalib.jar $(CORETESTS_INTERMEDIATES)/javalib.jar $(JSR166TESTS_INTERMEDIATES)/javalib.jar $(CONSCRYPTTESTS_INTERMEDIATES)/javalib.jar build/core/tasks/cts.mk | $(ACP)
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.dalvik.xml: $(CTS_CORE_XMLS_DEPS)
$(hide) mkdir -p $(CTS_TESTCASES_OUT)
@ -200,15 +205,64 @@ $(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_annotation.xml:
$(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,\
$(APACHEHARMONY_INTERMEDIATES)/javalib.jar,com.android.org.apache.harmony.annotation,\
libcore/expectations external/apache-harmony/Android.mk)
$(CORETESTS_INTERMEDIATES)/javalib.jar,org.apache.harmony.annotation.tests,\
libcore/expectations)
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_archive.xml: $(CTS_CORE_XMLS_DEPS)
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_java_io.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_archive,\
cts/tests/core/libcore/harmony_archive/AndroidManifest.xml,\
$(APACHEHARMONY_INTERMEDIATES)/javalib.jar,com.android.org.apache.harmony.archive,\
libcore/expectations external/apache-harmony/Android.mk)
$(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,\
libcore/expectations)
$(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,\
libcore/expectations)
$(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,\
libcore/expectations)
$(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,\
libcore/expectations)
$(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,\
libcore/expectations)
$(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,\
libcore/expectations)
$(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,\
libcore/expectations)
$(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,\
libcore/expectations)
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_beans.xml: $(CTS_CORE_XMLS_DEPS)
$(hide) mkdir -p $(CTS_TESTCASES_OUT)
@ -224,33 +278,6 @@ $(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_logging.xml: $(C
$(APACHEHARMONY_INTERMEDIATES)/javalib.jar,com.android.org.apache.harmony.logging,\
libcore/expectations external/apache-harmony/Android.mk)
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_luni.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_luni,\
cts/tests/core/libcore/harmony_luni/AndroidManifest.xml,\
$(APACHEHARMONY_INTERMEDIATES)/javalib.jar,com.android.org.apache.harmony.luni,\
libcore/expectations external/apache-harmony/Android.mk)
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_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_math,\
cts/tests/core/libcore/harmony_math/AndroidManifest.xml,\
$(APACHEHARMONY_INTERMEDIATES)/javalib.jar,com.android.org.apache.harmony.math,\
libcore/expectations external/apache-harmony/Android.mk)
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_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_nio,\
cts/tests/core/libcore/harmony_nio/AndroidManifest.xml,\
$(APACHEHARMONY_INTERMEDIATES)/javalib.jar,com.android.org.apache.harmony.nio,\
libcore/expectations external/apache-harmony/Android.mk)
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_nio_char.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_nio_char,\
cts/tests/core/libcore/harmony_nio_char/AndroidManifest.xml,\
$(APACHEHARMONY_INTERMEDIATES)/javalib.jar,com.android.org.apache.harmony.nio_char,\
libcore/expectations external/apache-harmony/Android.mk)
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_prefs.xml: $(CTS_CORE_XMLS_DEPS)
$(hide) mkdir -p $(CTS_TESTCASES_OUT)
@ -259,13 +286,6 @@ $(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_prefs.xml: $(CTS
$(APACHEHARMONY_INTERMEDIATES)/javalib.jar,com.android.org.apache.harmony.prefs,\
libcore/expectations external/apache-harmony/Android.mk)
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_regex.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_regex,\
cts/tests/core/libcore/harmony_regex/AndroidManifest.xml,\
$(APACHEHARMONY_INTERMEDIATES)/javalib.jar,com.android.org.apache.harmony.regex,\
libcore/expectations external/apache-harmony/Android.mk)
$(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,\
@ -273,20 +293,6 @@ $(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_sql.xml: $(CTS_C
$(APACHEHARMONY_INTERMEDIATES)/javalib.jar,com.android.org.apache.harmony.sql,\
libcore/expectations external/apache-harmony/Android.mk)
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_support.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_support,\
cts/tests/core/libcore/harmony_support/AndroidManifest.xml,\
$(APACHEHARMONY_INTERMEDIATES)/javalib.jar,com.android.org.apache.harmony.support,\
libcore/expectations external/apache-harmony/Android.mk)
$(CTS_TESTCASES_OUT)/android.core.tests.libcore.package.harmony_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_text,\
cts/tests/core/libcore/harmony_text/AndroidManifest.xml,\
$(APACHEHARMONY_INTERMEDIATES)/javalib.jar,com.android.org.apache.harmony.text,\
libcore/expectations external/apache-harmony/Android.mk)
# ----- Generate the test descriptions for the vm-tests-tf -----
#
CORE_VM_TEST_TF_DESC := $(CTS_TESTCASES_OUT)/android.core.vm-tests-tf.xml