diff --git a/Deprecation.md b/Deprecation.md index 0cf3a0193..74b54fadd 100644 --- a/Deprecation.md +++ b/Deprecation.md @@ -18,17 +18,17 @@ have any problems converting, please contact us via: | `BUILD_AUX_STATIC_LIBRARY` | Obsolete | | `BUILD_COPY_HEADERS` | Error | | `BUILD_HOST_EXECUTABLE` | Error | -| `BUILD_HOST_FUZZ_TEST` | Error | -| `BUILD_HOST_NATIVE_TEST` | Error | +| `BUILD_HOST_FUZZ_TEST` | Obsolete | +| `BUILD_HOST_NATIVE_TEST` | Obsolete | | `BUILD_HOST_SHARED_LIBRARY` | Error | | `BUILD_HOST_SHARED_TEST_LIBRARY` | Obsolete | | `BUILD_HOST_STATIC_LIBRARY` | Error | -| `BUILD_HOST_STATIC_TEST_LIBRARY` | Error | -| `BUILD_HOST_TEST_CONFIG` | Error | -| `BUILD_NATIVE_BENCHMARK` | Error | +| `BUILD_HOST_STATIC_TEST_LIBRARY` | Obsolete | +| `BUILD_HOST_TEST_CONFIG` | Obsolete | +| `BUILD_NATIVE_BENCHMARK` | Obsolete | | `BUILD_SHARED_TEST_LIBRARY` | Obsolete | -| `BUILD_STATIC_TEST_LIBRARY` | Error | -| `BUILD_TARGET_TEST_CONFIG` | Error | +| `BUILD_STATIC_TEST_LIBRARY` | Obsolete | +| `BUILD_TARGET_TEST_CONFIG` | Obsolete | | `BUILD_*` | Available | ## Module Type Deprecation Process diff --git a/core/clear_vars.mk b/core/clear_vars.mk index 90bef1b77..e2bdb37dc 100644 --- a/core/clear_vars.mk +++ b/core/clear_vars.mk @@ -293,7 +293,6 @@ LOCAL_STRIP_MODULE:= LOCAL_SYSTEM_SHARED_LIBRARIES:=none LOCAL_TARGET_REQUIRED_MODULES:= LOCAL_TEST_CONFIG:= -LOCAL_TEST_CONFIG_OPTIONS:= LOCAL_TEST_DATA:= LOCAL_TEST_MODULE_TO_PROGUARD_WITH:= LOCAL_TIDY:= diff --git a/core/config.mk b/core/config.mk index 90bc8e70c..18562844b 100644 --- a/core/config.mk +++ b/core/config.mk @@ -134,6 +134,7 @@ $(KATI_obsolete_var \ LOCAL_CUSTOM_BUILD_STEP_OUTPUT \ LOCAL_IS_AUX_MODULE \ ,AUX support has been removed) +$(KATI_obsolete_var HOST_OUT_TEST_CONFIG TARGET_OUT_TEST_CONFIG LOCAL_TEST_CONFIG_OPTIONS) # Used to force goals to build. Only use for conditionally defined goals. .PHONY: FORCE @@ -196,23 +197,12 @@ BUILD_STATIC_JAVA_LIBRARY :=$= $(BUILD_SYSTEM)/static_java_library.mk BUILD_HOST_JAVA_LIBRARY :=$= $(BUILD_SYSTEM)/host_java_library.mk BUILD_COPY_HEADERS :=$= $(BUILD_SYSTEM)/copy_headers.mk BUILD_NATIVE_TEST :=$= $(BUILD_SYSTEM)/native_test.mk -BUILD_NATIVE_BENCHMARK :=$= $(BUILD_SYSTEM)/native_benchmark.mk -BUILD_HOST_NATIVE_TEST :=$= $(BUILD_SYSTEM)/host_native_test.mk BUILD_FUZZ_TEST :=$= $(BUILD_SYSTEM)/fuzz_test.mk -BUILD_HOST_FUZZ_TEST :=$= $(BUILD_SYSTEM)/host_fuzz_test.mk - -BUILD_SHARED_TEST_LIBRARY :=$= $(BUILD_SYSTEM)/shared_test_lib.mk -BUILD_HOST_SHARED_TEST_LIBRARY :=$= $(BUILD_SYSTEM)/host_shared_test_lib.mk -BUILD_STATIC_TEST_LIBRARY :=$= $(BUILD_SYSTEM)/static_test_lib.mk -BUILD_HOST_STATIC_TEST_LIBRARY :=$= $(BUILD_SYSTEM)/host_static_test_lib.mk BUILD_NOTICE_FILE :=$= $(BUILD_SYSTEM)/notice_files.mk BUILD_HOST_DALVIK_JAVA_LIBRARY :=$= $(BUILD_SYSTEM)/host_dalvik_java_library.mk BUILD_HOST_DALVIK_STATIC_JAVA_LIBRARY :=$= $(BUILD_SYSTEM)/host_dalvik_static_java_library.mk -BUILD_HOST_TEST_CONFIG :=$= $(BUILD_SYSTEM)/host_test_config.mk -BUILD_TARGET_TEST_CONFIG :=$= $(BUILD_SYSTEM)/target_test_config.mk - include $(BUILD_SYSTEM)/deprecation.mk # ############################################################### diff --git a/core/deprecation.mk b/core/deprecation.mk index 879505b37..2b7a86991 100644 --- a/core/deprecation.mk +++ b/core/deprecation.mk @@ -31,23 +31,23 @@ DEFAULT_WARNING_BUILD_MODULE_TYPES :=$= \ DEFAULT_ERROR_BUILD_MODULE_TYPES :=$= \ BUILD_COPY_HEADERS \ BUILD_HOST_EXECUTABLE \ - BUILD_HOST_FUZZ_TEST \ - BUILD_HOST_NATIVE_TEST \ BUILD_HOST_SHARED_LIBRARY \ BUILD_HOST_STATIC_LIBRARY \ - BUILD_HOST_STATIC_TEST_LIBRARY \ - BUILD_HOST_TEST_CONFIG \ - BUILD_NATIVE_BENCHMARK \ - BUILD_STATIC_TEST_LIBRARY \ - BUILD_TARGET_TEST_CONFIG \ # These are BUILD_* variables that are always errors to reference. # Setting the BUILD_BROKEN_USES_BUILD_* variables is also an error. OBSOLETE_BUILD_MODULE_TYPES :=$= \ BUILD_AUX_EXECUTABLE \ BUILD_AUX_STATIC_LIBRARY \ + BUILD_HOST_FUZZ_TEST \ + BUILD_HOST_NATIVE_TEST \ BUILD_HOST_SHARED_TEST_LIBRARY \ + BUILD_HOST_STATIC_TEST_LIBRARY \ + BUILD_HOST_TEST_CONFIG \ + BUILD_NATIVE_BENCHMARK \ BUILD_SHARED_TEST_LIBRARY \ + BUILD_STATIC_TEST_LIBRARY \ + BUILD_TARGET_TEST_CONFIG \ $(foreach m,$(OBSOLETE_BUILD_MODULE_TYPES),\ $(KATI_obsolete_var $(m),Please convert to Soong) \ diff --git a/core/envsetup.mk b/core/envsetup.mk index 109385684..6e75a18e8 100644 --- a/core/envsetup.mk +++ b/core/envsetup.mk @@ -375,9 +375,6 @@ HOST_OUT_COMMON_GEN := $(HOST_COMMON_OUT_ROOT)/gen HOST_CROSS_OUT_GEN := $(HOST_CROSS_OUT)/gen .KATI_READONLY := HOST_CROSS_OUT_GEN -HOST_OUT_TEST_CONFIG := $(HOST_OUT)/test_config -.KATI_READONLY := HOST_OUT_TEST_CONFIG - # Out for HOST_2ND_ARCH $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_INTERMEDIATES := $(HOST_OUT)/obj32 $(HOST_2ND_ARCH_VAR_PREFIX)HOST_OUT_SHARED_LIBRARIES := $(HOST_OUT)/lib @@ -463,7 +460,6 @@ TARGET_OUT_ETC := $(TARGET_OUT)/etc TARGET_OUT_NOTICE_FILES := $(TARGET_OUT_INTERMEDIATES)/NOTICE_FILES TARGET_OUT_FAKE := $(PRODUCT_OUT)/fake_packages TARGET_OUT_TESTCASES := $(PRODUCT_OUT)/testcases -TARGET_OUT_TEST_CONFIG := $(PRODUCT_OUT)/test_config .KATI_READONLY := \ TARGET_OUT_EXECUTABLES \ TARGET_OUT_OPTIONAL_EXECUTABLES \ @@ -477,8 +473,7 @@ TARGET_OUT_TEST_CONFIG := $(PRODUCT_OUT)/test_config TARGET_OUT_ETC \ TARGET_OUT_NOTICE_FILES \ TARGET_OUT_FAKE \ - TARGET_OUT_TESTCASES \ - TARGET_OUT_TEST_CONFIG + TARGET_OUT_TESTCASES ifeq ($(SANITIZE_LITE),true) # When using SANITIZE_LITE, APKs must not be packaged with sanitized libraries, as they will not diff --git a/core/host_fuzz_test.mk b/core/host_fuzz_test.mk deleted file mode 100644 index 54c6577fd..000000000 --- a/core/host_fuzz_test.mk +++ /dev/null @@ -1,10 +0,0 @@ -################################################ -## A thin wrapper around BUILD_HOST_EXECUTABLE -## Common flags for host fuzz tests are added. -################################################ -$(call record-module-type,HOST_FUZZ_TEST) - -LOCAL_SANITIZE += fuzzer -LOCAL_STATIC_LIBRARIES += libLLVMFuzzer - -include $(BUILD_HOST_EXECUTABLE) diff --git a/core/host_native_test.mk b/core/host_native_test.mk deleted file mode 100644 index aa05bb315..000000000 --- a/core/host_native_test.mk +++ /dev/null @@ -1,23 +0,0 @@ -################################################ -## A thin wrapper around BUILD_HOST_EXECUTABLE -## Common flags for host native tests are added. -################################################ -$(call record-module-type,HOST_NATIVE_TEST) - -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)/host_test_internal.mk - -ifndef LOCAL_MULTILIB -ifndef LOCAL_32_BIT_ONLY -LOCAL_MULTILIB := both -endif -endif - -include $(BUILD_HOST_EXECUTABLE) diff --git a/core/host_shared_test_lib.mk b/core/host_shared_test_lib.mk deleted file mode 100644 index ed7e23abc..000000000 --- a/core/host_shared_test_lib.mk +++ /dev/null @@ -1 +0,0 @@ -$(error BUILD_HOST_SHARED_TEST_LIBRARY is obsolete) diff --git a/core/host_static_test_lib.mk b/core/host_static_test_lib.mk deleted file mode 100644 index a9e39b1ba..000000000 --- a/core/host_static_test_lib.mk +++ /dev/null @@ -1,9 +0,0 @@ -################################################## -## A thin wrapper around BUILD_HOST_STATIC_LIBRARY -## Common flags for host native tests are added. -################################################## -$(call record-module-type,HOST_STATIC_TEST_LIBRARY) - -include $(BUILD_SYSTEM)/host_test_internal.mk - -include $(BUILD_SYSTEM)/host_static_library.mk diff --git a/core/host_test_config.mk b/core/host_test_config.mk deleted file mode 100644 index b9975e54e..000000000 --- a/core/host_test_config.mk +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright (C) 2017 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# -# Common rules for building a TradeFed test XML file for host side tests. -# - -$(call record-module-type,HOST_TEST_CONFIG) - -LOCAL_IS_HOST_MODULE := true - -include $(BUILD_SYSTEM)/test_config_common.mk diff --git a/core/host_test_internal.mk b/core/host_test_internal.mk deleted file mode 100644 index dfe8cf150..000000000 --- a/core/host_test_internal.mk +++ /dev/null @@ -1,28 +0,0 @@ -##################################################### -## Shared definitions for all host test compilations. -##################################################### - -ifeq ($(LOCAL_GTEST),true) - LOCAL_CFLAGS_linux += -DGTEST_OS_LINUX - LOCAL_CFLAGS_darwin += -DGTEST_OS_MAC - - LOCAL_CFLAGS += -DGTEST_HAS_STD_STRING -O0 -g - - LOCAL_STATIC_LIBRARIES += libgtest_main_host libgtest_host -endif - -ifdef LOCAL_MODULE_PATH -$(error $(LOCAL_PATH): Do not set LOCAL_MODULE_PATH when building test $(LOCAL_MODULE)) -endif - -ifdef LOCAL_MODULE_PATH_32 -$(error $(LOCAL_PATH): Do not set LOCAL_MODULE_PATH_32 when building test $(LOCAL_MODULE)) -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_benchmark.mk b/core/native_benchmark.mk deleted file mode 100644 index 073d8dd2e..000000000 --- a/core/native_benchmark.mk +++ /dev/null @@ -1,15 +0,0 @@ -########################################### -## A thin wrapper around BUILD_EXECUTABLE -## Common flags for native benchmarks are added. -########################################### -$(call record-module-type,NATIVE_BENCHMARK) - -LOCAL_STATIC_LIBRARIES += libgoogle-benchmark - -ifndef LOCAL_MULTILIB -ifndef LOCAL_32_BIT_ONLY -LOCAL_MULTILIB := both -endif -endif - -include $(BUILD_EXECUTABLE) diff --git a/core/shared_test_lib.mk b/core/shared_test_lib.mk deleted file mode 100644 index 1ea9fe790..000000000 --- a/core/shared_test_lib.mk +++ /dev/null @@ -1 +0,0 @@ -$(error BUILD_SHARED_TEST_LIBRARY is obsolete) diff --git a/core/static_test_lib.mk b/core/static_test_lib.mk deleted file mode 100644 index a0e297069..000000000 --- a/core/static_test_lib.mk +++ /dev/null @@ -1,9 +0,0 @@ -############################################# -## A thin wrapper around BUILD_STATIC_LIBRARY -## Common flags for native tests are added. -############################################# -$(call record-module-type,STATIC_TEST_LIBRARY) - -include $(BUILD_SYSTEM)/target_test_internal.mk - -include $(BUILD_STATIC_LIBRARY) diff --git a/core/target_test_config.mk b/core/target_test_config.mk deleted file mode 100644 index 61f5d2b2e..000000000 --- a/core/target_test_config.mk +++ /dev/null @@ -1,23 +0,0 @@ -# -# Copyright (C) 2017 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# -# Common rules for building a TradeFed test XML file for target side tests. -# - -$(call record-module-type,TARGET_TEST_CONFIG) - -include $(BUILD_SYSTEM)/test_config_common.mk diff --git a/core/test_config_common.mk b/core/test_config_common.mk deleted file mode 100644 index 487f9f227..000000000 --- a/core/test_config_common.mk +++ /dev/null @@ -1,56 +0,0 @@ -# -# Copyright (C) 2017 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -LOCAL_MODULE_CLASS := TEST_CONFIG - -# Output test config files to testcases directory. -ifeq (,$(filter general-tests, $(LOCAL_COMPATIBILITY_SUITE))) - LOCAL_COMPATIBILITY_SUITE += general-tests -endif - -LOCAL_MODULE_SUFFIX := .config - -my_test_config_file := $(wildcard $(LOCAL_PATH)/$(LOCAL_MODULE).xml) -LOCAL_SRC_FILES := - -include $(BUILD_SYSTEM)/base_rules.mk - -# The test config is not in a standalone XML file. -ifndef my_test_config_file - -ifndef LOCAL_TEST_CONFIG_OPTIONS - $(call pretty-error,LOCAL_TEST_CONFIG_OPTIONS must be set if the test XML file is not provided.) -endif - -my_base_test_config_file := $(LOCAL_PATH)/AndroidTest.xml -my_test_config_file := $(dir $(LOCAL_BUILT_MODULE))AndroidTest.xml - -$(my_test_config_file) : PRIVATE_test_config_options := $(LOCAL_TEST_CONFIG_OPTIONS) -$(my_test_config_file) : $(my_base_test_config_file) - @echo "Create $(notdir $@) with options: $(PRIVATE_test_config_options)." - $(eval _option_xml := \ - $(foreach option,$(PRIVATE_test_config_options), \ - $(eval p := $(subst :,$(space),$(option))) \ -