diff --git a/core/tasks/general-tests.mk b/core/tasks/general-tests.mk index 525239422b..5726ee20b5 100644 --- a/core/tasks/general-tests.mk +++ b/core/tasks/general-tests.mk @@ -42,16 +42,24 @@ general_tests_host_shared_libs_zip := $(PRODUCT_OUT)/general-tests_host-shared-l # Copy kernel test modules to testcases directories include $(BUILD_SYSTEM)/tasks/tools/vts-kernel-tests.mk -kernel_test_copy_pairs := \ - $(call target-native-copy-pairs,$(kernel_test_modules),$(kernel_test_host_out)) -copy_kernel_tests := $(call copy-many-files,$(kernel_test_copy_pairs)) +ltp_copy_pairs := \ + $(call target-native-copy-pairs,$(kernel_ltp_modules),$(kernel_ltp_host_out)) +kselftest_copy_pairs := \ + $(call target-native-copy-pairs,$(kernel_kselftest_modules),$(kernel_kselftest_host_out)) +copy_ltp_tests := $(call copy-many-files,$(ltp_copy_pairs)) +copy_kselftest_tests := $(call copy-many-files,$(kselftest_copy_pairs)) -# PHONY target to be used to build and test `vts_kernel_tests` without building full vts -.PHONY: vts_kernel_tests -vts_kernel_tests: $(copy_kernel_tests) +# PHONY target to be used to build and test `vts_ltp_tests` and `vts_kselftest_tests` without building full vts +.PHONY: vts_kernel_ltp_tests +vts_kernel_ltp_tests: $(copy_ltp_tests) -$(general_tests_zip) : $(copy_kernel_tests) -$(general_tests_zip) : PRIVATE_KERNEL_TEST_HOST_OUT := $(kernel_test_host_out) +.PHONY: vts_kernel_kselftest_tests +vts_kernel_kselftest_tests: $(copy_kselftest_tests) + +$(general_tests_zip) : $(copy_ltp_tests) +$(general_tests_zip) : $(copy_kselftest_tests) +$(general_tests_zip) : PRIVATE_KERNEL_LTP_HOST_OUT := $(kernel_ltp_host_out) +$(general_tests_zip) : PRIVATE_KERNEL_KSELFTEST_HOST_OUT := $(kernel_kselftest_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_host_shared_libs_zip) $(general_tests_zip) : PRIVATE_TOOLS := $(general_tests_tools) @@ -64,7 +72,8 @@ $(general_tests_zip) : $(COMPATIBILITY.general-tests.FILES) $(general_tests_tool rm -f $@ $(PRIVATE_general_tests_list_zip) mkdir -p $(PRIVATE_INTERMEDIATES_DIR) $(PRIVATE_INTERMEDIATES_DIR)/tools echo $(sort $(COMPATIBILITY.general-tests.FILES)) | tr " " "\n" > $(PRIVATE_INTERMEDIATES_DIR)/list - find $(PRIVATE_KERNEL_TEST_HOST_OUT) >> $(PRIVATE_INTERMEDIATES_DIR)/list + find $(PRIVATE_KERNEL_LTP_HOST_OUT) >> $(PRIVATE_INTERMEDIATES_DIR)/list + find $(PRIVATE_KERNEL_KSELFTEST_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 diff --git a/core/tasks/tools/vts-kernel-tests.mk b/core/tasks/tools/vts-kernel-tests.mk index 5fbb589f60..bd115c9000 100644 --- a/core/tasks/tools/vts-kernel-tests.mk +++ b/core/tasks/tools/vts-kernel-tests.mk @@ -18,9 +18,12 @@ include $(BUILD_SYSTEM)/tasks/tools/vts_package_utils.mk # Copy kernel test modules to testcases directories -kernel_test_host_out := $(HOST_OUT_TESTCASES)/vts_kernel_tests -kernel_test_vts_out := $(HOST_OUT)/$(test_suite_name)/android-$(test_suite_name)/testcases/vts_kernel_tests -kernel_test_modules := \ - $(kselftest_modules) \ +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) \ No newline at end of file + $(ltp_packages) + +kernel_kselftest_host_out := $(HOST_OUT_TESTCASES)/vts_kernel_kselftest_tests +kernel_kselftest_vts_out := $(HOST_OUT)/$(test_suite_name)/android-$(test_suite_name)/testcases/vts_kernel_kselftest_tests +kernel_kselftest_modules := $(kselftest_modules) diff --git a/core/tasks/vts-core-tests.mk b/core/tasks/vts-core-tests.mk index 5e1b5d5291..bd7652bf40 100644 --- a/core/tasks/vts-core-tests.mk +++ b/core/tasks/vts-core-tests.mk @@ -18,12 +18,15 @@ test_suite_readme := test/vts/tools/vts-core-tradefed/README include $(BUILD_SYSTEM)/tasks/tools/vts-kernel-tests.mk -kernel_test_copy_pairs := \ - $(call target-native-copy-pairs,$(kernel_test_modules),$(kernel_test_vts_out)) +ltp_copy_pairs := \ + $(call target-native-copy-pairs,$(kernel_ltp_modules),$(kernel_ltp_vts_out)) +kselftest_copy_pairs := \ + $(call target-native-copy-pairs,$(kernel_kselftest_modules),$(kernel_kselftest_vts_out)) -copy_kernel_tests := $(call copy-many-files,$(kernel_test_copy_pairs)) +copy_ltp_tests := $(call copy-many-files,$(ltp_copy_pairs)) +copy_kselftest_tests := $(call copy-many-files,$(kselftest_copy_pairs)) -test_suite_extra_deps := $(copy_kernel_tests) +test_suite_extra_deps := $(copy_ltp_tests) $(copy_kselftest_tests) include $(BUILD_SYSTEM)/tasks/tools/compatibility.mk