blob: baa4546464d4cae3e205cfdfab99d8221bea989c [file] [log] [blame]
Yifan Hong98a61dd2019-02-08 12:34:48 -08001// 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
Bob Badourd69ad692021-02-16 19:02:14 -080015package {
Yihan Dong900ef7b2024-10-12 08:52:31 +000016 default_team: "trendy_team_android_kernel",
Bob Badourd69ad692021-02-16 19:02:14 -080017 default_applicable_licenses: ["Android-Apache-2.0"],
18}
19
Yifan Hong98a61dd2019-02-08 12:34:48 -080020prebuilt_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}
Yifan Hong72ff5852019-02-13 14:32:34 -080036
Yifan Honge8e27562019-03-04 15:23:34 -080037cc_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
Yifan Hong72ff5852019-02-13 14:32:34 -080048cc_library_static {
49 name: "libprocessgroup_proto",
50 host_supported: true,
Yifan Honge8e27562019-03-04 15:23:34 -080051 defaults: ["libprocessgroup_test_defaults"],
Yifan Hong72ff5852019-02-13 14:32:34 -080052 srcs: [
53 "cgroups.proto",
54 "task_profiles.proto",
55 ],
56 proto: {
57 type: "full",
58 export_proto_headers: true,
59 },
Yifan Hong72ff5852019-02-13 14:32:34 -080060}
61
62cc_test_host {
63 name: "libprocessgroup_proto_test",
Yifan Honge8e27562019-03-04 15:23:34 -080064 defaults: ["libprocessgroup_test_defaults"],
Yifan Hong72ff5852019-02-13 14:32:34 -080065 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 ],
Yifan Hong72ff5852019-02-13 14:32:34 -080080 data: [
81 "cgroups.json",
82 "cgroups.recovery.json",
83 "task_profiles.json",
84 ],
Yifan Hong72ff5852019-02-13 14:32:34 -080085}
Yifan Honge8e27562019-03-04 15:23:34 -080086
87cc_test {
88 name: "vts_processgroup_validate_test",
89 defaults: ["libprocessgroup_test_defaults"],
90 srcs: [
91 "test_vendor.cpp",
92 ],
93 static_libs: [
Yifan Hong2572f232020-05-07 12:41:45 -070094 "libbase",
Yifan Honge8e27562019-03-04 15:23:34 -080095 "libgmock",
Yifan Hong2572f232020-05-07 12:41:45 -070096 "liblog",
97 "libjsoncpp",
Yifan Honge8e27562019-03-04 15:23:34 -080098 "libjsonpbverify",
99 "libjsonpbparse",
100 "libprocessgroup_proto",
101 ],
102 shared_libs: [
Yifan Honge8e27562019-03-04 15:23:34 -0800103 "libprotobuf-cpp-full",
104 ],
Dan Shi63a07aa2020-04-27 13:32:48 -0700105 test_suites: [
106 "vts",
107 ],
Yifan Honge8e27562019-03-04 15:23:34 -0800108}