1 # -*- mode: makefile -*- 2 3 LOCAL_PATH := $(call my-dir) 4 5 define all-harmony-test-java-files-under 6 $(foreach dir,$(1),$(patsubst ./%,%,$(shell cd $(LOCAL_PATH) && find $(dir)/$(2) -name "*.java" 2> /dev/null))) 7 endef 8 9 harmony_test_dirs := \ 10 beans \ 11 logging \ 12 luni \ 13 sql \ 14 support \ 15 16 # TODO: get these working too! 17 # crypto \ 18 # security \ 19 # x-net 20 21 harmony_test_src_files := \ 22 $(call all-harmony-test-java-files-under,$(harmony_test_dirs),src/test/java) \ 23 $(call all-harmony-test-java-files-under,$(harmony_test_dirs),src/test/support/java) \ 24 $(call all-harmony-test-java-files-under,luni,src/test/api/common) \ 25 $(call all-harmony-test-java-files-under,luni,src/test/api/unix) \ 26 $(call all-harmony-test-java-files-under,luni,src/test/impl/common) \ 27 $(call all-harmony-test-java-files-under,luni,src/test/impl/unix) 28 29 # We need to use -maxdepth 4 because there's a non-resource directory called "resources" deeper in the tree. 30 define harmony-test-resource-dirs 31 $(foreach dir,$(1),$(patsubst %,./%,$(shell cd $(LOCAL_PATH) && find $(dir) -maxdepth 4 -name resources 2> /dev/null))) 32 endef 33 34 harmony_test_resource_dirs := $(call harmony-test-resource-dirs,$(harmony_test_dirs)) 35 36 harmony_test_javac_flags:=-Xmaxwarns 9999999 37 38 include $(CLEAR_VARS) 39 LOCAL_SRC_FILES := $(harmony_test_src_files) 40 LOCAL_JAVA_RESOURCE_DIRS := $(harmony_test_resource_dirs) 41 LOCAL_NO_STANDARD_LIBRARIES := true 42 LOCAL_JAVA_LIBRARIES := core-oj core-libart core-junit 43 LOCAL_JAVACFLAGS := $(harmony_test_javac_flags) 44 LOCAL_MODULE := apache-harmony-tests 45 LOCAL_JARJAR_RULES := $(LOCAL_PATH)/jarjar-rules.txt 46 LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk 47 include $(BUILD_STATIC_JAVA_LIBRARY) 48 49 ifeq ($(HOST_OS),linux) 50 include $(CLEAR_VARS) 51 LOCAL_SRC_FILES := $(harmony_test_src_files) 52 LOCAL_JAVA_RESOURCE_DIRS := $(harmony_test_resource_dirs) 53 LOCAL_NO_STANDARD_LIBRARIES := true 54 LOCAL_JAVA_LIBRARIES := core-oj-hostdex core-libart-hostdex core-junit-hostdex 55 LOCAL_JAVACFLAGS := $(harmony_test_javac_flags) 56 LOCAL_MODULE := apache-harmony-tests-hostdex 57 LOCAL_JARJAR_RULES := $(LOCAL_PATH)/jarjar-rules.txt 58 include $(BUILD_HOST_DALVIK_JAVA_LIBRARY) 59 endif # HOST_OS == linux 60 61 include $(call all-makefiles-under,$(LOCAL_PATH)) 62