1# Copyright (C) 2019 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#      http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15-include external/linux-kselftest/android/kselftest_test_list.mk
16-include external/ltp/android/ltp_package_list.mk
17
18include $(BUILD_SYSTEM)/tasks/tools/vts_package_utils.mk
19
20test_suite_name := vts
21test_suite_tradefed := vts-tradefed
22test_suite_readme := test/vts/tools/vts-core-tradefed/README
23
24# Copy kernel test modules to testcases directories
25kernel_test_host_out := $(HOST_OUT_TESTCASES)/vts_kernel_tests
26kernel_test_vts_out := $(HOST_OUT)/$(test_suite_name)/android-$(test_suite_name)/testcases/vts_kernel_tests
27kernel_test_modules := \
28    $(kselftest_modules) \
29    ltp \
30    $(ltp_packages)
31
32kernel_test_copy_pairs := \
33  $(call target-native-copy-pairs,$(kernel_test_modules),$(kernel_test_vts_out)) \
34  $(call target-native-copy-pairs,$(kernel_test_modules),$(kernel_test_host_out))
35
36copy_kernel_tests := $(call copy-many-files,$(kernel_test_copy_pairs))
37
38# PHONY target to be used to build and test `vts_kernel_tests` without building full vts
39.PHONY: vts_kernel_tests
40vts_kernel_tests: $(copy_kernel_tests)
41
42include $(BUILD_SYSTEM)/tasks/tools/compatibility.mk
43
44$(compatibility_zip): $(copy_kernel_tests)
45
46.PHONY: vts
47vts: $(compatibility_zip) $(compatibility_tests_list_zip)
48$(call dist-for-goals, vts, $(compatibility_zip) $(compatibility_tests_list_zip))
49
50tests: vts
51