1e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes# -*- mode: makefile -*- 2e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes 3e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott HughesLOCAL_PATH := $(call my-dir) 4e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes 5e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughesdefine all-harmony-test-java-files-under 6e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes $(foreach dir,$(1),$(patsubst ./%,%,$(shell cd $(LOCAL_PATH) && find $(dir)/$(2) -name "*.java" 2> /dev/null))) 7e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughesendef 8e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes 9b5ef8434979368b7f637c12bef92ced60afcfe26Elliott Hughesharmony_test_dirs := \ 10b5ef8434979368b7f637c12bef92ced60afcfe26Elliott Hughes beans \ 11b5ef8434979368b7f637c12bef92ced60afcfe26Elliott Hughes logging \ 12b5ef8434979368b7f637c12bef92ced60afcfe26Elliott Hughes luni \ 13916c0517aad98441bcdd6cec90bbba730a437d8bElliott Hughes sql \ 14b5ef8434979368b7f637c12bef92ced60afcfe26Elliott Hughes support \ 15b5ef8434979368b7f637c12bef92ced60afcfe26Elliott Hughes 16b5ef8434979368b7f637c12bef92ced60afcfe26Elliott Hughes# TODO: get these working too! 17b5ef8434979368b7f637c12bef92ced60afcfe26Elliott Hughes# crypto \ 18b5ef8434979368b7f637c12bef92ced60afcfe26Elliott Hughes# security \ 19b5ef8434979368b7f637c12bef92ced60afcfe26Elliott Hughes# x-net 20b5ef8434979368b7f637c12bef92ced60afcfe26Elliott Hughes 21e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughesharmony_test_src_files := \ 22e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes $(call all-harmony-test-java-files-under,$(harmony_test_dirs),src/test/java) \ 23b5ef8434979368b7f637c12bef92ced60afcfe26Elliott Hughes $(call all-harmony-test-java-files-under,$(harmony_test_dirs),src/test/support/java) \ 24fc95c99cfa4921fef424f3f411d013b821589e69Elliott Hughes $(call all-harmony-test-java-files-under,luni,src/test/api/common) \ 25fc95c99cfa4921fef424f3f411d013b821589e69Elliott Hughes $(call all-harmony-test-java-files-under,luni,src/test/api/unix) \ 26fc95c99cfa4921fef424f3f411d013b821589e69Elliott Hughes $(call all-harmony-test-java-files-under,luni,src/test/impl/common) \ 27fc95c99cfa4921fef424f3f411d013b821589e69Elliott Hughes $(call all-harmony-test-java-files-under,luni,src/test/impl/unix) 28e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes 295a4ecd15a879353ab17c7910a445ab25c6462484Elliott Hughes# We need to use -maxdepth 4 because there's a non-resource directory called "resources" deeper in the tree. 30e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughesdefine harmony-test-resource-dirs 3141217d3ed0b1782ea36b36d3a74b710b9f507342Tsu Chiang Chuang $(foreach dir,$(1),$(patsubst %,./%,$(shell cd $(LOCAL_PATH) && find $(dir) -maxdepth 4 -name resources 2> /dev/null))) 32e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughesendef 3341217d3ed0b1782ea36b36d3a74b710b9f507342Tsu Chiang Chuang 3441217d3ed0b1782ea36b36d3a74b710b9f507342Tsu Chiang Chuangharmony_test_resource_dirs := $(call harmony-test-resource-dirs,$(harmony_test_dirs)) 35e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes 3629c4fe175ae43c08f2a872caf07e051a22cf87b5Colin Crossharmony_test_javac_flags:=-Xmaxwarns 9999999 37e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes 38e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughesinclude $(CLEAR_VARS) 39e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott HughesLOCAL_SRC_FILES := $(harmony_test_src_files) 40e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott HughesLOCAL_JAVA_RESOURCE_DIRS := $(harmony_test_resource_dirs) 41e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott HughesLOCAL_NO_STANDARD_LIBRARIES := true 4295815341f23eb037bda9d7f160ab9c194808f004Ying WangLOCAL_JAVA_LIBRARIES := core-oj core-libart core-junit 43e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott HughesLOCAL_JAVACFLAGS := $(harmony_test_javac_flags) 44e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott HughesLOCAL_MODULE := apache-harmony-tests 45b03c78a21f8be724d88630217b194f03733b753bTsu Chiang ChuangLOCAL_JARJAR_RULES := $(LOCAL_PATH)/jarjar-rules.txt 46cfc230a1756495b51e8f75edbe47823c90d1a647Elliott HughesLOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk 47e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughesinclude $(BUILD_STATIC_JAVA_LIBRARY) 48e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes 495a379ab49ef2ac5009419408490ec494617fd233Narayan Kamathifeq ($(HOST_OS),linux) 503c75f3706cca16cbffad6fc3183e14ad892b40baIan Rogersinclude $(CLEAR_VARS) 513c75f3706cca16cbffad6fc3183e14ad892b40baIan RogersLOCAL_SRC_FILES := $(harmony_test_src_files) 523c75f3706cca16cbffad6fc3183e14ad892b40baIan RogersLOCAL_JAVA_RESOURCE_DIRS := $(harmony_test_resource_dirs) 538161f687dd51d9dcf3613474e9ec27b6ac5cf36cBrian CarlstromLOCAL_NO_STANDARD_LIBRARIES := true 5495815341f23eb037bda9d7f160ab9c194808f004Ying WangLOCAL_JAVA_LIBRARIES := core-oj-hostdex core-libart-hostdex core-junit-hostdex 553c75f3706cca16cbffad6fc3183e14ad892b40baIan RogersLOCAL_JAVACFLAGS := $(harmony_test_javac_flags) 563c75f3706cca16cbffad6fc3183e14ad892b40baIan RogersLOCAL_MODULE := apache-harmony-tests-hostdex 573c75f3706cca16cbffad6fc3183e14ad892b40baIan RogersLOCAL_JARJAR_RULES := $(LOCAL_PATH)/jarjar-rules.txt 583c75f3706cca16cbffad6fc3183e14ad892b40baIan Rogersinclude $(BUILD_HOST_DALVIK_JAVA_LIBRARY) 595a379ab49ef2ac5009419408490ec494617fd233Narayan Kamathendif # HOST_OS == linux 605f0a23683aa603d8c50b6dd071a565821b76067bElliott Hughes 615f0a23683aa603d8c50b6dd071a565821b76067bElliott Hughesinclude $(call all-makefiles-under,$(LOCAL_PATH)) 62