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
18test_suite_name := vts
19test_suite_tradefed := vts-tradefed
20test_suite_readme := test/vts/tools/vts-core-tradefed/README
21
22# Copy kernel test modules to testcases directories
23kernel_test_host_out := $(HOST_OUT_TESTCASES)/vts_kernel_tests
24kernel_test_vts_out := $(HOST_OUT)/$(test_suite_name)/android-$(test_suite_name)/testcases/vts_kernel_tests
25kernel_test_modules := \
26    $(kselftest_modules) \
27    ltp \
28    $(ltp_packages)
29
30kernel_test_copy_pairs := \
31  $(call target-native-copy-pairs,$(kernel_test_modules),$(kernel_test_vts_out)) \
32  $(call target-native-copy-pairs,$(kernel_test_modules),$(kernel_test_host_out))
33
34copy_kernel_tests := $(call copy-many-files,$(kernel_test_copy_pairs))
35
36# PHONY target to be used to build and test `vts_kernel_tests` without building full vts
37.PHONY: vts_kernel_tests
38vts_kernel_tests: $(copy_kernel_tests)
39
40include $(BUILD_SYSTEM)/tasks/tools/compatibility.mk
41
42$(compatibility_zip): $(copy_kernel_tests)
43
44.PHONY: vts
45vts: $(compatibility_zip)
46$(call dist-for-goals, vts, $(compatibility_zip))
47
48tests: vts
49