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