1// Copyright (C) 2021 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
15package {
16    default_applicable_licenses: ["Android-Apache-2.0"],
17}
18
19cc_test {
20    name: "vts_generic_boot_image_test",
21    require_root: true,
22
23    // Even though 5.4-android11 also conforms with GKI release format,
24    // (often called "GKI 1.0"),
25    // skip the test on device launching with Android 11 (R) because:
26    // - We don't retroactively add requirements;
27    // - On those devices, VTS always flashes GKI before testing, making this
28    //   test meaningless.
29    // Therefore, the test is enforced on device launching with Android 12 (S)
30    // and above.
31    test_min_api_level: 31,
32
33    defaults: [
34        "libvintf_static_user_defaults",
35    ],
36    srcs: [
37        "cpio.cpp",
38        "generic_boot_image_test.cpp",
39        "lz4_legacy.cpp",
40        "ramdisk_utils.cpp",
41    ],
42    cflags: [
43        "-Wall",
44        "-Werror",
45    ],
46    test_suites: [
47        "general-tests",
48
49        // On 5.10+ kernel, the device should use the generic boot image as the
50        // shipping image. Hence, we can include this test in VTS.
51        "vts",
52    ],
53    static_libs: [
54        "libbase",
55        "libc++fs",
56        "libgmock",
57        "libkver",
58        "liblz4",
59        "libvintf",
60    ],
61    header_libs: [
62        "bootimg_headers",
63        "libstorage_literals_headers",
64    ],
65}
66