Android.mk revision 916c0517aad98441bcdd6cec90bbba730a437d8b
1# -*- mode: makefile -*- 2 3LOCAL_PATH := $(call my-dir) 4 5define all-harmony-test-java-files-under 6 $(foreach dir,$(1),$(patsubst ./%,%,$(shell cd $(LOCAL_PATH) && find $(dir)/$(2) -name "*.java" 2> /dev/null))) 7endef 8 9harmony_test_dirs := \ 10 annotation \ 11 archive \ 12 beans \ 13 logging \ 14 luni \ 15 math \ 16 nio \ 17 nio_char \ 18 prefs \ 19 regex \ 20 sql \ 21 support \ 22 text \ 23 24# TODO: get these working too! 25# auth \ 26# crypto \ 27# security \ 28# x-net 29 30harmony_test_src_files := \ 31 $(call all-harmony-test-java-files-under,$(harmony_test_dirs),src/test/java) \ 32 $(call all-harmony-test-java-files-under,$(harmony_test_dirs),src/test/support/java) \ 33 $(call all-harmony-test-java-files-under,luni,src/test/api/common) \ 34 $(call all-harmony-test-java-files-under,luni,src/test/api/unix) \ 35 $(call all-harmony-test-java-files-under,luni,src/test/impl/common) \ 36 $(call all-harmony-test-java-files-under,luni,src/test/impl/unix) 37 38define harmony-test-resource-dirs 39 $(shell cd $(LOCAL_PATH) && ls -d $(1)/src/test/{java,resources} 2> /dev/null) 40endef 41harmony_test_resource_dirs := \ 42 $(call harmony-test-resource-dirs,$(harmony_test_dirs)) \ 43 $(call harmony-test-resource-dirs,luni) 44 45harmony_test_javac_flags=-encoding UTF-8 46harmony_test_javac_flags+=-Xmaxwarns 9999999 47 48include $(CLEAR_VARS) 49LOCAL_SRC_FILES := $(harmony_test_src_files) 50LOCAL_JAVA_RESOURCE_DIRS := $(harmony_test_resource_dirs) 51LOCAL_NO_STANDARD_LIBRARIES := true 52LOCAL_JAVA_LIBRARIES := core core-junit 53LOCAL_JAVACFLAGS := $(harmony_test_javac_flags) 54LOCAL_MODULE_TAGS := tests 55LOCAL_MODULE := apache-harmony-tests 56LOCAL_NO_EMMA_INSTRUMENT := true 57LOCAL_NO_EMMA_COMPILE := true 58include $(BUILD_STATIC_JAVA_LIBRARY) 59 60ifeq ($(WITH_HOST_DALVIK),true) 61 include $(CLEAR_VARS) 62 LOCAL_SRC_FILES := $(harmony_test_src_files) 63 LOCAL_JAVA_RESOURCE_DIRS := $(harmony_test_resource_dirs) 64 LOCAL_NO_STANDARD_LIBRARIES := true 65 LOCAL_JAVA_LIBRARIES := core-hostdex core-junit-hostdex 66 LOCAL_JAVACFLAGS := $(harmony_test_javac_flags) 67 LOCAL_MODULE_TAGS := tests 68 LOCAL_MODULE := apache-harmony-tests-hostdex 69 LOCAL_NO_EMMA_INSTRUMENT := true 70 LOCAL_NO_EMMA_COMPILE := true 71 LOCAL_BUILD_HOST_DEX := true 72 include $(BUILD_HOST_JAVA_LIBRARY) 73endif 74