1//
2// Copyright (C) 2023 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8//      http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
17package {
18    default_team: "trendy_team_partner_eng",
19    default_applicable_licenses: ["Android-Apache-2.0"],
20}
21
22aconfig_declarations {
23    name: "flag_checker_tests",
24    package: "android.test.myflags",
25    container: "system",
26    srcs: ["android.test.myflags.aconfig"],
27}
28
29cc_aconfig_library {
30    name: "flags_checker_tests_cc",
31    aconfig_declarations: "flag_checker_tests",
32}
33
34cc_defaults {
35    name: "libflagtest_defaults",
36    export_include_dirs: ["include"],
37    cflags: [
38        "-Wall",
39        "-Werror",
40    ],
41}
42
43cc_defaults {
44    name: "libflagtest_host_defaults",
45    target: {
46        linux_bionic: {
47            enabled: true,
48        },
49        windows: {
50            enabled: true,
51        },
52    },
53}
54
55cc_library_static {
56    name: "libflagtest",
57    defaults: [
58        "libflagtest_defaults",
59        "libflagtest_host_defaults",
60    ],
61    vendor_available: true,
62    product_available: true,
63    host_supported: true,
64    native_bridge_supported: true,
65    srcs: ["flag_checker.cpp"],
66    static_libs: ["libgtest"],
67    shared_libs: ["libbase"],
68}
69
70cc_test {
71    name: "libflagtest_test",
72    compile_multilib: "both",
73    multilib: {
74        lib32: {
75            suffix: "32",
76        },
77        lib64: {
78            suffix: "64",
79        },
80    },
81    require_root: true,
82    srcs: ["flag_checker_test.cpp"],
83    cflags: [
84        "-Wall",
85        "-Werror",
86    ],
87    static_libs: [
88        "libflagtest",
89        "libgtest",
90        "flags_checker_tests_cc",
91    ],
92    shared_libs: [
93        "libbase",
94        "server_configurable_flags",
95        "libaconfig_storage_read_api_cc",
96    ],
97    test_suites: ["device-tests"],
98}
99