From: Dan Willemsen Date: Wed, 22 Jun 2016 07:27:54 +0000 (-0700) Subject: Finish refactoring tests to NATIVE_TESTS X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=e1c6deab102020c3212be38210759cc42b77f9da;p=android-x86%2Fbuild.git Finish refactoring tests to NATIVE_TESTS Now that the source trees all use NATIVE_TESTS for intermediate files and generated sources, make it a requirement. Change-Id: Id5718fabe63f6e8dde7981a6f0f5bd89e0ec7ee5 --- diff --git a/core/host_native_test.mk b/core/host_native_test.mk index c6d6f521e..2a6097df3 100644 --- a/core/host_native_test.mk +++ b/core/host_native_test.mk @@ -19,8 +19,4 @@ LOCAL_MULTILIB := both endif endif -ifndef LOCAL_MODULE_RELATIVE_PATH -LOCAL_MODULE_RELATIVE_PATH := $(LOCAL_MODULE) -endif - include $(BUILD_HOST_EXECUTABLE) diff --git a/core/host_shared_test_lib.mk b/core/host_shared_test_lib.mk index 2c2063d57..ed7e23abc 100644 --- a/core/host_shared_test_lib.mk +++ b/core/host_shared_test_lib.mk @@ -1,10 +1 @@ -################################################## -## A thin wrapper around BUILD_HOST_SHARED_LIBRARY -## Common flags for host native tests are added. -################################################## - $(error BUILD_HOST_SHARED_TEST_LIBRARY is obsolete) - -include $(BUILD_SYSTEM)/host_test_internal.mk - -include $(BUILD_HOST_SHARED_LIBRARY) diff --git a/core/host_test_internal.mk b/core/host_test_internal.mk index 70f011b60..473815b0e 100644 --- a/core/host_test_internal.mk +++ b/core/host_test_internal.mk @@ -23,3 +23,7 @@ endif ifdef LOCAL_MODULE_PATH_64 $(error $(LOCAL_PATH): Do not set LOCAL_MODULE_PATH_64 when building test $(LOCAL_MODULE)) endif + +ifndef LOCAL_MODULE_RELATIVE_PATH +LOCAL_MODULE_RELATIVE_PATH := $(LOCAL_MODULE) +endif diff --git a/core/native_test.mk b/core/native_test.mk index d4b2a5b2e..bb93eb08e 100644 --- a/core/native_test.mk +++ b/core/native_test.mk @@ -3,10 +3,13 @@ ## Common flags for native tests are added. ########################################### -# TODO: enforce NATIVE_TESTS once current users are gone -ifndef LOCAL_MODULE_CLASS -LOCAL_MODULE_CLASS := NATIVE_TESTS +ifdef LOCAL_MODULE_CLASS +ifneq ($(LOCAL_MODULE_CLASS),NATIVE_TESTS) +$(error $(LOCAL_PATH): LOCAL_MODULE_CLASS must be NATIVE_TESTS with BUILD_HOST_NATIVE_TEST) endif +endif + +LOCAL_MODULE_CLASS := NATIVE_TESTS include $(BUILD_SYSTEM)/target_test_internal.mk @@ -16,10 +19,4 @@ LOCAL_MULTILIB := both endif endif -ifneq ($(LOCAL_MODULE_CLASS),NATIVE_TESTS) -$(warning $(LOCAL_PATH): $(LOCAL_MODULE): LOCAL_MODULE_CLASS should be NATIVE_TESTS with BUILD_NATIVE_TEST) -LOCAL_MODULE_PATH_64 := $(TARGET_OUT_DATA_NATIVE_TESTS)/$(LOCAL_MODULE) -LOCAL_MODULE_PATH_32 := $($(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_OUT_DATA_NATIVE_TESTS)/$(LOCAL_MODULE) -endif - include $(BUILD_EXECUTABLE) diff --git a/core/shared_test_lib.mk b/core/shared_test_lib.mk index f3b880718..1ea9fe790 100644 --- a/core/shared_test_lib.mk +++ b/core/shared_test_lib.mk @@ -1,10 +1 @@ -############################################# -## A thin wrapper around BUILD_SHARED_LIBRARY -## Common flags for native tests are added. -############################################# - $(error BUILD_SHARED_TEST_LIBRARY is obsolete) - -include $(BUILD_SYSTEM)/target_test_internal.mk - -include $(BUILD_SHARED_LIBRARY) diff --git a/core/target_test_internal.mk b/core/target_test_internal.mk index d321aaadd..1a22510d5 100644 --- a/core/target_test_internal.mk +++ b/core/target_test_internal.mk @@ -33,8 +33,6 @@ ifdef LOCAL_MODULE_PATH_64 $(error $(LOCAL_PATH): Do not set LOCAL_MODULE_PATH_64 when building test $(LOCAL_MODULE)) endif -ifeq ($(LOCAL_MODULE_CLASS),NATIVE_TESTS) ifndef LOCAL_MODULE_RELATIVE_PATH LOCAL_MODULE_RELATIVE_PATH := $(LOCAL_MODULE) endif -endif