vts: split kselftests and ltp

Split the location of ltp and kselftest files so that they are not
uploaded together if running individually.  Should improve the
performance of kselftest.

Bug: 190800715
Test: atest vts_ltp_test_x86_64
Test: atest vts_linux_kselftest_x86_64
Signed-off-by: Edward Liaw <edliaw@google.com>
Change-Id: I121e6d5bab8edd185c8d73ad7849dff9e8b5f118
This commit is contained in:
Edward Liaw 2022-08-22 18:25:14 +00:00
parent eac1c8c616
commit f867471865
3 changed files with 33 additions and 18 deletions

View file

@ -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

View file

@ -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)
$(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)

View file

@ -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