blob: 1ec9f7f3b3c0da18fe130b191c7d51e2dd31c6de [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 {
16 default_applicable_licenses: ["Android-Apache-2.0"],
17}
18
Yifan Hong98a61dd2019-02-08 12:34:48 -080019prebuilt_etc {
20 name: "cgroups.json",
21 src: "cgroups.json",
22}
23
24prebuilt_etc {
25 name: "cgroups.recovery.json",
26 filename: "cgroups.json",
27 recovery: true,
28 src: "cgroups.recovery.json",
29}
30
31prebuilt_etc {
32 name: "task_profiles.json",
33 src: "task_profiles.json",
34}
Yifan Hong72ff5852019-02-13 14:32:34 -080035
Yifan Honge8e27562019-03-04 15:23:34 -080036cc_defaults {
37 name: "libprocessgroup_test_defaults",
38 cflags: [
39 "-Wall",
40 "-Werror",
41
42 // Needed for headers from libprotobuf.
43 "-Wno-unused-parameter",
44 ],
45}
46
Yifan Hong72ff5852019-02-13 14:32:34 -080047cc_library_static {
48 name: "libprocessgroup_proto",
49 host_supported: true,
Yifan Honge8e27562019-03-04 15:23:34 -080050 defaults: ["libprocessgroup_test_defaults"],
Yifan Hong72ff5852019-02-13 14:32:34 -080051 srcs: [
52 "cgroups.proto",
53 "task_profiles.proto",
54 ],
55 proto: {
56 type: "full",
57 export_proto_headers: true,
58 },
Yifan Hong72ff5852019-02-13 14:32:34 -080059}
60
61cc_test_host {
62 name: "libprocessgroup_proto_test",
Yifan Honge8e27562019-03-04 15:23:34 -080063 defaults: ["libprocessgroup_test_defaults"],
Yifan Hong72ff5852019-02-13 14:32:34 -080064 srcs: [
65 "test.cpp",
66 ],
67 static_libs: [
68 "libbase",
69 "libgmock",
70 "liblog",
71 "libjsoncpp",
72 "libjsonpbverify",
73 "libjsonpbparse",
74 "libprocessgroup_proto",
75 ],
76 shared_libs: [
77 "libprotobuf-cpp-full",
78 ],
Yifan Hong72ff5852019-02-13 14:32:34 -080079 data: [
80 "cgroups.json",
81 "cgroups.recovery.json",
82 "task_profiles.json",
83 ],
Yifan Hong72ff5852019-02-13 14:32:34 -080084}
Yifan Honge8e27562019-03-04 15:23:34 -080085
86cc_test {
87 name: "vts_processgroup_validate_test",
88 defaults: ["libprocessgroup_test_defaults"],
89 srcs: [
90 "test_vendor.cpp",
91 ],
92 static_libs: [
Yifan Hong2572f232020-05-07 12:41:45 -070093 "libbase",
Yifan Honge8e27562019-03-04 15:23:34 -080094 "libgmock",
Yifan Hong2572f232020-05-07 12:41:45 -070095 "liblog",
96 "libjsoncpp",
Yifan Honge8e27562019-03-04 15:23:34 -080097 "libjsonpbverify",
98 "libjsonpbparse",
99 "libprocessgroup_proto",
100 ],
101 shared_libs: [
Yifan Honge8e27562019-03-04 15:23:34 -0800102 "libprotobuf-cpp-full",
103 ],
Dan Shi63a07aa2020-04-27 13:32:48 -0700104 test_suites: [
105 "vts",
106 ],
Yifan Honge8e27562019-03-04 15:23:34 -0800107}