blob: 794608014ff340c153c4b2e281d8559777a01ba8 [file] [log] [blame]
David Brazdilc53ea952020-10-15 12:41:26 +00001// Copyright (C) 2020 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
Bob Badour2efc4762021-02-03 18:36:27 -080015package {
16 default_applicable_licenses: ["Android-Apache-2.0"],
17}
18
David Brazdilacb178d2021-01-18 19:37:50 +000019kernel_version = "5.10"
David Brazdild8d6e1d2020-10-15 14:02:03 +000020
Jiyong Park978b1e32021-02-04 20:23:40 +090021kernel_stem = "kernel_prebuilts-" + kernel_version
22kernel_modules_stem = "virt_device_prebuilts_kernel_modules-" + kernel_version
David Brazdild8d6e1d2020-10-15 14:02:03 +000023
David Brazdil1267a282020-10-15 12:33:20 +000024// JAR containing all virtualization host-side tests.
25java_test_host {
26 name: "VirtualizationHostTestCases",
27 srcs: ["java/**/*.java"],
28 test_suites: ["device-tests"],
29 libs: ["tradefed"],
30 data: [
31 ":virt_hostside_tests_kernel",
Jiyong Park978b1e32021-02-04 20:23:40 +090032 ":virt_hostside_tests_initramfs",
33 ":virt_hostside_tests_vm_config",
David Brazdil1267a282020-10-15 12:33:20 +000034 ],
David Brazdil735b2cd2020-10-15 12:19:25 +000035 required: [
36 "virt_hostside_tests_vsock_server",
37 ],
David Brazdil1267a282020-10-15 12:33:20 +000038}
39
Jiyong Park978b1e32021-02-04 20:23:40 +090040prebuilt_etc {
David Brazdil1267a282020-10-15 12:33:20 +000041 name: "virt_hostside_tests_kernel",
Jiyong Park978b1e32021-02-04 20:23:40 +090042 src: "nofile",
43 arch: {
44 arm64: {
45 src: ":" + kernel_stem + "-arm64",
46 },
47 x86_64: {
48 src: ":" + kernel_stem + "-x86_64",
49 },
50 },
David Brazdil1267a282020-10-15 12:33:20 +000051}
52
Andrew Walbran3049fdf2020-12-23 12:46:30 +000053// Copy config files to output directory so that AndroidTest.xml can copy them to the device.
54filegroup {
Jiyong Park978b1e32021-02-04 20:23:40 +090055 name: "virt_hostside_tests_vm_config",
56 srcs: ["vm_config.json"],
Andrew Walbran3049fdf2020-12-23 12:46:30 +000057}
58
Jiyong Park978b1e32021-02-04 20:23:40 +090059android_filesystem {
60 name: "virt_hostside_tests_initramfs",
61 arch: {
62 arm64: {
63 deps: [kernel_modules_stem + "-arm64"],
64 },
65 x86_64: {
66 deps: [kernel_modules_stem + "-x86_64"],
67 },
68 },
69 deps: [
70 "virt_hostside_tests_guest_init",
71 "virt_hostside_tests_vsock_client",
David Brazdilc53ea952020-10-15 12:41:26 +000072 ],
Jiyong Park978b1e32021-02-04 20:23:40 +090073 type: "cpio",
David Brazdild8d6e1d2020-10-15 14:02:03 +000074}