Yifan Hong | 98a61dd | 2019-02-08 12:34:48 -0800 | [diff] [blame] | 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 | |
| 15 | prebuilt_etc { |
| 16 | name: "cgroups.json", |
| 17 | src: "cgroups.json", |
Suren Baghdasaryan | 35221b5 | 2020-11-20 17:08:51 -0800 | [diff] [blame] | 18 | required: [ |
| 19 | "cgroups_28.json", |
| 20 | "cgroups_29.json", |
| 21 | "cgroups_30.json", |
| 22 | ], |
Yifan Hong | 98a61dd | 2019-02-08 12:34:48 -0800 | [diff] [blame] | 23 | } |
| 24 | |
| 25 | prebuilt_etc { |
| 26 | name: "cgroups.recovery.json", |
| 27 | filename: "cgroups.json", |
| 28 | recovery: true, |
| 29 | src: "cgroups.recovery.json", |
| 30 | } |
| 31 | |
| 32 | prebuilt_etc { |
Suren Baghdasaryan | 35221b5 | 2020-11-20 17:08:51 -0800 | [diff] [blame] | 33 | name: "cgroups_28.json", |
| 34 | src: "cgroups_28.json", |
| 35 | sub_dir: "task_profiles", |
| 36 | } |
| 37 | |
| 38 | prebuilt_etc { |
| 39 | name: "cgroups_29.json", |
| 40 | src: "cgroups_29.json", |
| 41 | sub_dir: "task_profiles", |
| 42 | } |
| 43 | |
| 44 | prebuilt_etc { |
| 45 | name: "cgroups_30.json", |
| 46 | src: "cgroups_30.json", |
| 47 | sub_dir: "task_profiles", |
| 48 | } |
| 49 | |
| 50 | prebuilt_etc { |
Yifan Hong | 98a61dd | 2019-02-08 12:34:48 -0800 | [diff] [blame] | 51 | name: "task_profiles.json", |
| 52 | src: "task_profiles.json", |
Suren Baghdasaryan | 35221b5 | 2020-11-20 17:08:51 -0800 | [diff] [blame] | 53 | required: [ |
| 54 | "task_profiles_28.json", |
| 55 | "task_profiles_29.json", |
| 56 | "task_profiles_30.json", |
| 57 | ], |
| 58 | } |
| 59 | |
| 60 | prebuilt_etc { |
| 61 | name: "task_profiles_28.json", |
| 62 | src: "task_profiles_28.json", |
| 63 | sub_dir: "task_profiles", |
| 64 | } |
| 65 | |
| 66 | prebuilt_etc { |
| 67 | name: "task_profiles_29.json", |
| 68 | src: "task_profiles_29.json", |
| 69 | sub_dir: "task_profiles", |
| 70 | } |
| 71 | |
| 72 | prebuilt_etc { |
| 73 | name: "task_profiles_30.json", |
| 74 | src: "task_profiles_30.json", |
| 75 | sub_dir: "task_profiles", |
Yifan Hong | 98a61dd | 2019-02-08 12:34:48 -0800 | [diff] [blame] | 76 | } |
Yifan Hong | 72ff585 | 2019-02-13 14:32:34 -0800 | [diff] [blame] | 77 | |
Yifan Hong | e8e2756 | 2019-03-04 15:23:34 -0800 | [diff] [blame] | 78 | cc_defaults { |
| 79 | name: "libprocessgroup_test_defaults", |
| 80 | cflags: [ |
| 81 | "-Wall", |
| 82 | "-Werror", |
| 83 | |
| 84 | // Needed for headers from libprotobuf. |
| 85 | "-Wno-unused-parameter", |
| 86 | ], |
| 87 | } |
| 88 | |
Yifan Hong | 72ff585 | 2019-02-13 14:32:34 -0800 | [diff] [blame] | 89 | cc_library_static { |
| 90 | name: "libprocessgroup_proto", |
| 91 | host_supported: true, |
Yifan Hong | e8e2756 | 2019-03-04 15:23:34 -0800 | [diff] [blame] | 92 | defaults: ["libprocessgroup_test_defaults"], |
Yifan Hong | 72ff585 | 2019-02-13 14:32:34 -0800 | [diff] [blame] | 93 | srcs: [ |
| 94 | "cgroups.proto", |
| 95 | "task_profiles.proto", |
| 96 | ], |
| 97 | proto: { |
| 98 | type: "full", |
| 99 | export_proto_headers: true, |
| 100 | }, |
Yifan Hong | 72ff585 | 2019-02-13 14:32:34 -0800 | [diff] [blame] | 101 | } |
| 102 | |
| 103 | cc_test_host { |
| 104 | name: "libprocessgroup_proto_test", |
Yifan Hong | e8e2756 | 2019-03-04 15:23:34 -0800 | [diff] [blame] | 105 | defaults: ["libprocessgroup_test_defaults"], |
Yifan Hong | 72ff585 | 2019-02-13 14:32:34 -0800 | [diff] [blame] | 106 | srcs: [ |
| 107 | "test.cpp", |
| 108 | ], |
| 109 | static_libs: [ |
| 110 | "libbase", |
| 111 | "libgmock", |
| 112 | "liblog", |
| 113 | "libjsoncpp", |
| 114 | "libjsonpbverify", |
| 115 | "libjsonpbparse", |
| 116 | "libprocessgroup_proto", |
| 117 | ], |
| 118 | shared_libs: [ |
| 119 | "libprotobuf-cpp-full", |
| 120 | ], |
Yifan Hong | 72ff585 | 2019-02-13 14:32:34 -0800 | [diff] [blame] | 121 | data: [ |
| 122 | "cgroups.json", |
| 123 | "cgroups.recovery.json", |
| 124 | "task_profiles.json", |
| 125 | ], |
Yifan Hong | 72ff585 | 2019-02-13 14:32:34 -0800 | [diff] [blame] | 126 | } |
Yifan Hong | e8e2756 | 2019-03-04 15:23:34 -0800 | [diff] [blame] | 127 | |
| 128 | cc_test { |
| 129 | name: "vts_processgroup_validate_test", |
| 130 | defaults: ["libprocessgroup_test_defaults"], |
| 131 | srcs: [ |
| 132 | "test_vendor.cpp", |
| 133 | ], |
| 134 | static_libs: [ |
Yifan Hong | 2572f23 | 2020-05-07 12:41:45 -0700 | [diff] [blame] | 135 | "libbase", |
Yifan Hong | e8e2756 | 2019-03-04 15:23:34 -0800 | [diff] [blame] | 136 | "libgmock", |
Yifan Hong | 2572f23 | 2020-05-07 12:41:45 -0700 | [diff] [blame] | 137 | "liblog", |
| 138 | "libjsoncpp", |
Yifan Hong | e8e2756 | 2019-03-04 15:23:34 -0800 | [diff] [blame] | 139 | "libjsonpbverify", |
| 140 | "libjsonpbparse", |
| 141 | "libprocessgroup_proto", |
| 142 | ], |
| 143 | shared_libs: [ |
Yifan Hong | e8e2756 | 2019-03-04 15:23:34 -0800 | [diff] [blame] | 144 | "libprotobuf-cpp-full", |
| 145 | ], |
Dan Shi | 63a07aa | 2020-04-27 13:32:48 -0700 | [diff] [blame] | 146 | test_suites: [ |
| 147 | "vts", |
| 148 | ], |
Yifan Hong | e8e2756 | 2019-03-04 15:23:34 -0800 | [diff] [blame] | 149 | } |