xref: /aosp_15_r20/system/core/libprocessgroup/profiles/Android.bp (revision 00c7fec1bb09f3284aad6a6f96d2f63dfc3650ad)
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
15package {
16    default_team: "trendy_team_android_kernel",
17    default_applicable_licenses: ["Android-Apache-2.0"],
18}
19
20prebuilt_etc {
21    name: "cgroups.json",
22    src: "cgroups.json",
23}
24
25prebuilt_etc {
26    name: "cgroups.recovery.json",
27    filename: "cgroups.json",
28    recovery: true,
29    src: "cgroups.recovery.json",
30}
31
32prebuilt_etc {
33    name: "task_profiles.json",
34    src: "task_profiles.json",
35}
36
37cc_defaults {
38    name: "libprocessgroup_test_defaults",
39    cflags: [
40        "-Wall",
41        "-Werror",
42
43        // Needed for headers from libprotobuf.
44        "-Wno-unused-parameter",
45    ],
46}
47
48cc_library_static {
49    name: "libprocessgroup_proto",
50    host_supported: true,
51    defaults: ["libprocessgroup_test_defaults"],
52    srcs: [
53        "cgroups.proto",
54        "task_profiles.proto",
55    ],
56    proto: {
57        type: "full",
58        export_proto_headers: true,
59    },
60}
61
62cc_test_host {
63    name: "libprocessgroup_proto_test",
64    defaults: ["libprocessgroup_test_defaults"],
65    srcs: [
66        "test.cpp",
67    ],
68    static_libs: [
69        "libbase",
70        "libgmock",
71        "liblog",
72        "libjsoncpp",
73        "libjsonpbverify",
74        "libjsonpbparse",
75        "libprocessgroup_proto",
76    ],
77    shared_libs: [
78        "libprotobuf-cpp-full",
79    ],
80    data: [
81        "cgroups.json",
82        "cgroups.recovery.json",
83        "task_profiles.json",
84    ],
85}
86
87cc_test {
88    name: "vts_processgroup_validate_test",
89    defaults: ["libprocessgroup_test_defaults"],
90    srcs: [
91        "test_vendor.cpp",
92    ],
93    static_libs: [
94        "libbase",
95        "libgmock",
96        "liblog",
97        "libjsoncpp",
98        "libjsonpbverify",
99        "libjsonpbparse",
100        "libprocessgroup_proto",
101    ],
102    shared_libs: [
103        "libprotobuf-cpp-full",
104    ],
105    test_suites: [
106        "vts",
107    ],
108}
109