blob: c371ef7ab8b6a4b4d646c27de2f6b21d1abe4e46 [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
15prebuilt_etc {
16 name: "cgroups.json",
17 src: "cgroups.json",
18}
19
20prebuilt_etc {
21 name: "cgroups.recovery.json",
22 filename: "cgroups.json",
23 recovery: true,
24 src: "cgroups.recovery.json",
25}
26
27prebuilt_etc {
28 name: "task_profiles.json",
29 src: "task_profiles.json",
30}
Yifan Hong72ff5852019-02-13 14:32:34 -080031
Yifan Honge8e27562019-03-04 15:23:34 -080032cc_defaults {
33 name: "libprocessgroup_test_defaults",
34 cflags: [
35 "-Wall",
36 "-Werror",
37
38 // Needed for headers from libprotobuf.
39 "-Wno-unused-parameter",
40 ],
41}
42
Yifan Hong72ff5852019-02-13 14:32:34 -080043cc_library_static {
44 name: "libprocessgroup_proto",
45 host_supported: true,
Yifan Honge8e27562019-03-04 15:23:34 -080046 defaults: ["libprocessgroup_test_defaults"],
Yifan Hong72ff5852019-02-13 14:32:34 -080047 srcs: [
48 "cgroups.proto",
49 "task_profiles.proto",
50 ],
51 proto: {
52 type: "full",
53 export_proto_headers: true,
54 },
Yifan Hong72ff5852019-02-13 14:32:34 -080055}
56
57cc_test_host {
58 name: "libprocessgroup_proto_test",
Yifan Honge8e27562019-03-04 15:23:34 -080059 defaults: ["libprocessgroup_test_defaults"],
Yifan Hong72ff5852019-02-13 14:32:34 -080060 srcs: [
61 "test.cpp",
62 ],
63 static_libs: [
64 "libbase",
65 "libgmock",
66 "liblog",
67 "libjsoncpp",
68 "libjsonpbverify",
69 "libjsonpbparse",
70 "libprocessgroup_proto",
71 ],
72 shared_libs: [
73 "libprotobuf-cpp-full",
74 ],
Yifan Hong72ff5852019-02-13 14:32:34 -080075 data: [
76 "cgroups.json",
77 "cgroups.recovery.json",
78 "task_profiles.json",
79 ],
80 test_suites: [
81 "general-tests",
82 ],
83}
Yifan Honge8e27562019-03-04 15:23:34 -080084
85cc_test {
86 name: "vts_processgroup_validate_test",
87 defaults: ["libprocessgroup_test_defaults"],
88 srcs: [
89 "test_vendor.cpp",
90 ],
91 static_libs: [
Yifan Hong2572f232020-05-07 12:41:45 -070092 "libbase",
Yifan Honge8e27562019-03-04 15:23:34 -080093 "libgmock",
Yifan Hong2572f232020-05-07 12:41:45 -070094 "liblog",
95 "libjsoncpp",
Yifan Honge8e27562019-03-04 15:23:34 -080096 "libjsonpbverify",
97 "libjsonpbparse",
98 "libprocessgroup_proto",
99 ],
100 shared_libs: [
Yifan Honge8e27562019-03-04 15:23:34 -0800101 "libprotobuf-cpp-full",
102 ],
Dan Shi63a07aa2020-04-27 13:32:48 -0700103 test_suites: [
104 "vts",
105 ],
Yifan Honge8e27562019-03-04 15:23:34 -0800106}