Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 575ad677 authored by Edward Liaw's avatar Edward Liaw Committed by Gerrit Code Review
Browse files

Merge "Remove special case for ltp build rules" into main

parents f67351a9 95084b1e
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -1307,10 +1307,6 @@ endif
SOONG_VARIABLES :=
SOONG_EXTRA_VARIABLES :=

-include external/ltp/android/ltp_package_list.mk
DEFAULT_DATA_OUT_MODULES := ltp $(ltp_packages)
.KATI_READONLY := DEFAULT_DATA_OUT_MODULES

include $(BUILD_SYSTEM)/dumpvar.mk

ifdef BOARD_VNDK_VERSION
+0 −13
Original line number Diff line number Diff line
@@ -27,21 +27,9 @@ general_tests_list_zip := $(PRODUCT_OUT)/general-tests_list.zip
# Create an artifact to include all test config files in general-tests.
general_tests_configs_zip := $(PRODUCT_OUT)/general-tests_configs.zip

# Copy kernel test modules to testcases directories
include $(BUILD_SYSTEM)/tasks/tools/vts-kernel-tests.mk
ltp_copy_pairs := \
  $(call target-native-copy-pairs,$(kernel_ltp_modules),$(kernel_ltp_host_out))
copy_ltp_tests := $(call copy-many-files,$(ltp_copy_pairs))

# PHONY target to be used to build and test `vts_ltp_tests` without building full vts
.PHONY: vts_kernel_ltp_tests
vts_kernel_ltp_tests: $(copy_ltp_tests)

general_tests_shared_libs_zip := $(PRODUCT_OUT)/general-tests_host-shared-libs.zip

$(general_tests_zip) : $(general_tests_shared_libs_zip)
$(general_tests_zip) : $(copy_ltp_tests)
$(general_tests_zip) : PRIVATE_KERNEL_LTP_HOST_OUT := $(kernel_ltp_host_out)
$(general_tests_zip) : PRIVATE_general_tests_list_zip := $(general_tests_list_zip)
$(general_tests_zip) : .KATI_IMPLICIT_OUTPUTS := $(general_tests_list_zip) $(general_tests_configs_zip)
$(general_tests_zip) : PRIVATE_TOOLS := $(general_tests_tools)
@@ -52,7 +40,6 @@ $(general_tests_zip) : $(COMPATIBILITY.general-tests.FILES) $(COMPATIBILITY.gene
	rm -f $@ $(PRIVATE_general_tests_list_zip)
	mkdir -p $(PRIVATE_INTERMEDIATES_DIR) $(PRIVATE_INTERMEDIATES_DIR)/tools
	echo $(sort $(COMPATIBILITY.general-tests.FILES) $(COMPATIBILITY.general-tests.SOONG_INSTALLED_COMPATIBILITY_SUPPORT_FILES)) | tr " " "\n" > $(PRIVATE_INTERMEDIATES_DIR)/list
	find $(PRIVATE_KERNEL_LTP_HOST_OUT) >> $(PRIVATE_INTERMEDIATES_DIR)/list
	grep $(HOST_OUT_TESTCASES) $(PRIVATE_INTERMEDIATES_DIR)/list > $(PRIVATE_INTERMEDIATES_DIR)/host.list || true
	grep $(TARGET_OUT_TESTCASES) $(PRIVATE_INTERMEDIATES_DIR)/list > $(PRIVATE_INTERMEDIATES_DIR)/target.list || true
	grep -e .*\\.config$$ $(PRIVATE_INTERMEDIATES_DIR)/host.list > $(PRIVATE_INTERMEDIATES_DIR)/host-test-configs.list || true
+0 −24
Original line number Diff line number Diff line
# Copyright (C) 2022 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.

-include external/ltp/android/ltp_package_list.mk

include $(BUILD_SYSTEM)/tasks/tools/vts_package_utils.mk

# Copy kernel test modules to testcases directories
kernel_ltp_host_out := $(HOST_OUT_TESTCASES)/vts_kernel_ltp_tests
kernel_ltp_vts_out := $(HOST_OUT)/$(test_suite_name)/android-$(test_suite_name)/testcases/vts_kernel_ltp_tests
kernel_ltp_modules := \
    ltp \
    $(ltp_packages)
+0 −34
Original line number Diff line number Diff line
#
# Copyright (C) 2020 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.
#

# $(1): List of target native files to copy.
# $(2): Copy destination directory.
# Evaluates to a list of ":"-separated pairs src:dst.
define target-native-copy-pairs
$(foreach m,$(1),\
  $(eval _built_files := $(strip $(ALL_MODULES.$(m).BUILT_INSTALLED)\
  $(ALL_MODULES.$(m)$(TARGET_2ND_ARCH_MODULE_SUFFIX).BUILT_INSTALLED)))\
  $(foreach i, $(sort $(_built_files)),\
    $(eval bui_ins := $(subst :,$(space),$(i)))\
    $(eval ins := $(word 2,$(bui_ins)))\
    $(if $(filter $(TARGET_OUT_ROOT)/%,$(ins)),\
      $(eval bui := $(word 1,$(bui_ins)))\
      $(eval my_copy_dest := $(patsubst data/%,DATA/%,\
                               $(patsubst system/%,DATA/%,\
                                   $(patsubst $(PRODUCT_OUT)/%,%,$(ins)))))\
      $(call declare-copy-target-license-metadata,$(2)/$(my_copy_dest),$(bui))\
      $(bui):$(2)/$(my_copy_dest))))
endef
+0 −9
Original line number Diff line number Diff line
@@ -16,15 +16,6 @@ test_suite_name := vts
test_suite_tradefed := vts-tradefed
test_suite_readme := test/vts/tools/vts-core-tradefed/README

include $(BUILD_SYSTEM)/tasks/tools/vts-kernel-tests.mk

ltp_copy_pairs := \
  $(call target-native-copy-pairs,$(kernel_ltp_modules),$(kernel_ltp_vts_out))

copy_ltp_tests := $(call copy-many-files,$(ltp_copy_pairs))

test_suite_extra_deps := $(copy_ltp_tests)

include $(BUILD_SYSTEM)/tasks/tools/compatibility.mk

.PHONY: vts