David Brazdil | 49f8a4d | 2021-03-04 09:57:33 +0000 | [diff] [blame] | 1 | // 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 | |
| 15 | package { |
| 16 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 17 | } |
| 18 | |
| 19 | kernel_version = "5.10" |
| 20 | |
| 21 | kernel_stem = "kernel_prebuilts-" + kernel_version |
David Brazdil | 49f8a4d | 2021-03-04 09:57:33 +0000 | [diff] [blame] | 22 | |
| 23 | cc_test { |
Jiyong Park | 29de517 | 2022-02-08 00:37:05 +0900 | [diff] [blame] | 24 | // ".64" suffix is to work around cts-unit-test which is demanding that all |
| 25 | // executables in CTS should have both 32 and 64 ABIs. |
| 26 | name: "VirtualizationTestCases.64", |
| 27 | test_suites: [ |
| 28 | "cts", |
| 29 | "general-tests", |
| 30 | ], |
David Brazdil | 49f8a4d | 2021-03-04 09:57:33 +0000 | [diff] [blame] | 31 | srcs: [ |
| 32 | "common.cc", |
| 33 | "vsock_test.cc", |
| 34 | ], |
| 35 | local_include_dirs: ["include"], |
Andrew Walbran | 3e73a09 | 2021-06-25 11:32:23 +0000 | [diff] [blame] | 36 | compile_multilib: "64", |
David Brazdil | 49f8a4d | 2021-03-04 09:57:33 +0000 | [diff] [blame] | 37 | data: [ |
| 38 | ":virt_test_kernel", |
| 39 | ":virt_test_initramfs", |
David Brazdil | 49f8a4d | 2021-03-04 09:57:33 +0000 | [diff] [blame] | 40 | ], |
| 41 | static_libs: [ |
| 42 | // The existence of the library in the system partition is not guaranteed. |
| 43 | // Let's have our own copy of it. |
Andrew Walbran | f6bf686 | 2021-05-21 12:41:13 +0000 | [diff] [blame] | 44 | "android.system.virtualizationservice-cpp", |
Andrew Walbran | 9d39f30 | 2022-02-02 17:51:43 +0000 | [diff] [blame] | 45 | "PlatformProperties", |
David Brazdil | 49f8a4d | 2021-03-04 09:57:33 +0000 | [diff] [blame] | 46 | ], |
| 47 | shared_libs: [ |
| 48 | "libbase", |
| 49 | "libbinder", |
| 50 | "liblog", |
| 51 | "libutils", |
| 52 | ], |
| 53 | } |
| 54 | |
| 55 | cc_defaults { |
| 56 | name: "virt_test_guest_binary", |
| 57 | static_libs: [ |
| 58 | "libbase", |
| 59 | "liblog", |
| 60 | ], |
| 61 | static_executable: true, |
| 62 | installable: false, |
| 63 | } |
| 64 | |
| 65 | cc_binary { |
| 66 | name: "virt_test_vsock_guest", |
| 67 | srcs: ["vsock_guest.cc"], |
| 68 | stem: "vsock_client", |
| 69 | defaults: ["virt_test_guest_binary"], |
| 70 | } |
| 71 | |
| 72 | prebuilt_etc { |
| 73 | name: "virt_test_kernel", |
| 74 | src: "nofile", |
| 75 | arch: { |
| 76 | arm64: { |
| 77 | src: ":" + kernel_stem + "-arm64", |
| 78 | }, |
| 79 | x86_64: { |
| 80 | src: ":" + kernel_stem + "-x86_64", |
| 81 | }, |
| 82 | }, |
| 83 | } |
| 84 | |
| 85 | android_filesystem { |
| 86 | name: "virt_test_initramfs", |
David Brazdil | 49f8a4d | 2021-03-04 09:57:33 +0000 | [diff] [blame] | 87 | deps: [ |
Jiyong Park | b54646f | 2022-02-07 11:13:56 +0900 | [diff] [blame] | 88 | "microdroid_kernel_modules", |
David Brazdil | 49f8a4d | 2021-03-04 09:57:33 +0000 | [diff] [blame] | 89 | "virt_test_guest_init", |
| 90 | "virt_test_vsock_guest", |
| 91 | ], |
| 92 | type: "cpio", |
| 93 | } |