diff options
author | Colin Cross <ccross@android.com> | 2018-09-13 17:23:18 -0700 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-09-13 17:23:18 -0700 |
commit | 88d5daaf4acf23883c4d2769c2001e3a675ddbbf (patch) | |
tree | 538a8304c6b5cec5d2375e91274222908661c151 | |
parent | b20100e60c71d61ddbb1364650ce5b199442e66f (diff) | |
parent | 41e65bc9a88b6eef522705fe68247a2f0ed11993 (diff) | |
download | apache-harmony-88d5daaf4acf23883c4d2769c2001e3a675ddbbf.tar.gz |
Merge "Convert external/apache-harmony to Android.bp"
am: 41e65bc9a8
Change-Id: Ib8497fe2cb20dd55ec51f5e350575d5b9313d674
-rw-r--r-- | Android.bp | 41 | ||||
-rw-r--r-- | Android.mk | 64 | ||||
-rw-r--r-- | jdwp/Android.bp | 38 | ||||
-rw-r--r-- | jdwp/Android.mk | 74 |
4 files changed, 79 insertions, 138 deletions
diff --git a/Android.bp b/Android.bp new file mode 100644 index 0000000..c368936 --- /dev/null +++ b/Android.bp @@ -0,0 +1,41 @@ +java_test { + name: "apache-harmony-tests", + hostdex: true, + srcs: [ + "beans/src/test/java/**/*.java", + "logging/src/test/java/**/*.java", + "luni/src/test/java/**/*.java", + "sql/src/test/java/**/*.java", + "support/src/test/java/**/*.java", + + "beans/src/test/support/java/**/*.java", + "logging/src/test/support/java/**/*.java", + "luni/src/test/support/java/**/*.java", + "sql/src/test/support/java/**/*.java", + "support/src/test/support/java/**/*.java", + + "luni/src/test/api/common/**/*.java", + "luni/src/test/api/unix/**/*.java", + "luni/src/test/impl/common/**/*.java", + "luni/src/test/impl/unix/**/*.java", + ], + java_resource_dirs: [ + "beans/src/test/resources", + "logging/src/test/resources", + "sql/src/test/resources", + "support/src/test/resources", + ], + no_framework_libs: true, + libs: [ + "junit", + ], + javacflags: ["-Xmaxwarns 9999999"], + jarjar_rules: "jarjar-rules.txt", + // Pin java_version until jarjar is certified to support later versions. http://b/72703434 + java_version: "1.8", + + // b/73499927 + errorprone: { + javacflags: ["-Xep:MissingOverride:OFF"], + }, +} diff --git a/Android.mk b/Android.mk deleted file mode 100644 index 5797bd7..0000000 --- a/Android.mk +++ /dev/null @@ -1,64 +0,0 @@ -# -*- mode: makefile -*- - -LOCAL_PATH := $(call my-dir) - -define all-harmony-test-java-files-under - $(foreach dir,$(1),$(patsubst ./%,%,$(shell cd $(LOCAL_PATH) && find $(dir)/$(2) -name "*.java" 2> /dev/null))) -endef - -harmony_test_dirs := \ - beans \ - logging \ - luni \ - sql \ - support \ - -harmony_test_src_files := \ - $(call all-harmony-test-java-files-under,$(harmony_test_dirs),src/test/java) \ - $(call all-harmony-test-java-files-under,$(harmony_test_dirs),src/test/support/java) \ - $(call all-harmony-test-java-files-under,luni,src/test/api/common) \ - $(call all-harmony-test-java-files-under,luni,src/test/api/unix) \ - $(call all-harmony-test-java-files-under,luni,src/test/impl/common) \ - $(call all-harmony-test-java-files-under,luni,src/test/impl/unix) - -# We need to use -maxdepth 4 because there's a non-resource directory called "resources" deeper in the tree. -define harmony-test-resource-dirs - $(foreach dir,$(1),$(patsubst %,./%,$(shell cd $(LOCAL_PATH) && find $(dir) -maxdepth 4 -name resources 2> /dev/null))) -endef - -harmony_test_resource_dirs := $(call harmony-test-resource-dirs,$(harmony_test_dirs)) - -harmony_test_javac_flags:=-Xmaxwarns 9999999 - -include $(CLEAR_VARS) -LOCAL_SRC_FILES := $(harmony_test_src_files) -LOCAL_JAVA_RESOURCE_DIRS := $(harmony_test_resource_dirs) -LOCAL_NO_STANDARD_LIBRARIES := true -LOCAL_JAVA_LIBRARIES := core-oj core-libart junit -LOCAL_JAVACFLAGS := $(harmony_test_javac_flags) -LOCAL_MODULE := apache-harmony-tests -LOCAL_JARJAR_RULES := $(LOCAL_PATH)/jarjar-rules.txt -# Pin java_version until jarjar is certified to support later versions. http://b/72703434 -LOCAL_JAVA_LANGUAGE_VERSION := 1.8 -LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk -# b/73499927 -LOCAL_ERROR_PRONE_FLAGS := -Xep:MissingOverride:OFF -include $(BUILD_STATIC_JAVA_LIBRARY) - -ifeq ($(HOST_OS),linux) -include $(CLEAR_VARS) -LOCAL_SRC_FILES := $(harmony_test_src_files) -LOCAL_JAVA_RESOURCE_DIRS := $(harmony_test_resource_dirs) -LOCAL_NO_STANDARD_LIBRARIES := true -LOCAL_JAVA_LIBRARIES := core-oj-hostdex core-libart-hostdex junit-hostdex -LOCAL_JAVACFLAGS := $(harmony_test_javac_flags) -LOCAL_MODULE := apache-harmony-tests-hostdex -# Pin java_version until jarjar is certified to support later versions. http://b/72703434 -LOCAL_JAVA_LANGUAGE_VERSION := 1.8 -LOCAL_JARJAR_RULES := $(LOCAL_PATH)/jarjar-rules.txt -# b/73499927 -LOCAL_ERROR_PRONE_FLAGS := -Xep:MissingOverride:OFF -include $(BUILD_HOST_DALVIK_JAVA_LIBRARY) -endif # HOST_OS == linux - -include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/jdwp/Android.bp b/jdwp/Android.bp new file mode 100644 index 0000000..a795e1b --- /dev/null +++ b/jdwp/Android.bp @@ -0,0 +1,38 @@ +java_test { + name: "CtsJdwp", + srcs: ["src/test/java/**/*.java"], + exclude_srcs: ["src/test/java/org/apache/harmony/jpda/tests/jdwp/DDM/**/*.java"], + libs: ["junit"], + + errorprone: { + javacflags: [ + "-Xep:ArrayToString:ERROR", + // b/73499927 + "-Xep:MissingOverride:OFF", + ], + }, +} + +java_test { + name: "apache-harmony-jdwp-tests", + hostdex: true, + host_supported: true, + srcs: ["src/test/java/**/*.java"], + libs: ["junit"], + + // b/73499927 + errorprone: { + javacflags: ["-Xep:MissingOverride:OFF"], + }, + + target: { + host: { + exclude_srcs: ["src/test/java/org/apache/harmony/jpda/tests/jdwp/DDM/**/*.java"], + }, + }, +} + +java_library_host { + name: "apache-harmony-jdwp-tests-host", + static_libs: ["apache-harmony-jdwp-tests"], +} diff --git a/jdwp/Android.mk b/jdwp/Android.mk deleted file mode 100644 index 0a20fc8..0000000 --- a/jdwp/Android.mk +++ /dev/null @@ -1,74 +0,0 @@ -# -*- mode: makefile -*- - -LOCAL_PATH := $(call my-dir) - -define all-harmony-test-java-files-under - $(patsubst ./%,%,$(shell cd $(LOCAL_PATH) && find $(2) -name "*.java" 2> /dev/null)) -endef - -harmony_jdwp_test_src_files := \ - $(call all-harmony-test-java-files-under,,src/test/java/) - -harmony_public_jdwp_test_src_files := \ - $(filter-out $(call all-harmony-test-java-files-under,,src/test/java/org/apache/harmony/jpda/tests/jdwp/DDM/),$(harmony_jdwp_test_src_files)) - -# Common JDWP settings -jdwp_test_timeout_ms := 10000 # 10s. -jdwp_test_target_runtime_common_args := \ - -Djpda.settings.verbose=true \ - -Djpda.settings.timeout=$(jdwp_test_timeout_ms) \ - -Djpda.settings.waitingTime=$(jdwp_test_timeout_ms) - -# CTS configuration -# -# We run in non-debug mode and support running with a forced abi. We must pass -# -Xcompiler-option --debuggable to ART so the tests are compiled with full -# debugging capability. -cts_jdwp_test_runtime_target := dalvikvm|\#ABI\#| -XXlib:libart.so -Xcompiler-option --debuggable -cts_jdwp_test_target_runtime_args := -Xcompiler-option --debuggable -cts_jdwp_test_target_runtime_args += $(jdwp_test_target_runtime_common_args) -cts_jdwp_test_target_runtime_args += -Djpda.settings.debuggeeJavaPath='$(cts_jdwp_test_runtime_target)' - -include $(CLEAR_VARS) -LOCAL_SRC_FILES := $(harmony_public_jdwp_test_src_files) -LOCAL_JAVA_LIBRARIES := junit -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE := CtsJdwp -LOCAL_NO_EMMA_INSTRUMENT := true -LOCAL_NO_EMMA_COMPILE := true -LOCAL_CTS_TEST_PACKAGE := android.jdwp -LOCAL_CTS_TARGET_RUNTIME_ARGS := $(cts_jdwp_test_target_runtime_args) -LOCAL_ERROR_PRONE_FLAGS := -Xep:ArrayToString:ERROR -# b/73499927 -LOCAL_ERROR_PRONE_FLAGS += -Xep:MissingOverride:OFF -include $(BUILD_CTS_TARGET_JAVA_LIBRARY) - -include $(CLEAR_VARS) -LOCAL_SRC_FILES := $(harmony_jdwp_test_src_files) -LOCAL_JAVA_LIBRARIES := junit -LOCAL_MODULE_TAGS := tests -LOCAL_MODULE := apache-harmony-jdwp-tests -LOCAL_NO_EMMA_INSTRUMENT := true -LOCAL_NO_EMMA_COMPILE := true -LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/jdwp -# b/73499927 -LOCAL_ERROR_PRONE_FLAGS := -Xep:MissingOverride:OFF -include $(BUILD_JAVA_LIBRARY) - -include $(CLEAR_VARS) -LOCAL_SRC_FILES := $(harmony_public_jdwp_test_src_files) -LOCAL_JAVA_LIBRARIES := junit-host -LOCAL_MODULE := apache-harmony-jdwp-tests-host -# b/73499927 -LOCAL_ERROR_PRONE_FLAGS := -Xep:MissingOverride:OFF -include $(BUILD_HOST_JAVA_LIBRARY) - -ifeq ($(HOST_OS),linux) -include $(CLEAR_VARS) -LOCAL_SRC_FILES := $(harmony_jdwp_test_src_files) -LOCAL_JAVA_LIBRARIES := junit-hostdex -LOCAL_MODULE := apache-harmony-jdwp-tests-hostdex -# b/73499927 -LOCAL_ERROR_PRONE_FLAGS := -Xep:MissingOverride:OFF -include $(BUILD_HOST_DALVIK_JAVA_LIBRARY) -endif # HOST_OS == linux |