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 15package { 16 default_applicable_licenses: ["Android-Apache-2.0"], 17} 18 19prebuilt_etc { 20 name: "cgroups.json", 21 src: "cgroups.json", 22 required: [ 23 "cgroups_28.json", 24 "cgroups_29.json", 25 "cgroups_30.json", 26 ], 27} 28 29prebuilt_etc { 30 name: "cgroups.recovery.json", 31 filename: "cgroups.json", 32 recovery: true, 33 src: "cgroups.recovery.json", 34} 35 36prebuilt_etc { 37 name: "cgroups_28.json", 38 src: "cgroups_28.json", 39 sub_dir: "task_profiles", 40} 41 42prebuilt_etc { 43 name: "cgroups_29.json", 44 src: "cgroups_29.json", 45 sub_dir: "task_profiles", 46} 47 48prebuilt_etc { 49 name: "cgroups_30.json", 50 src: "cgroups_30.json", 51 sub_dir: "task_profiles", 52} 53 54prebuilt_etc { 55 name: "task_profiles.json", 56 src: "task_profiles.json", 57 required: [ 58 "task_profiles_28.json", 59 "task_profiles_29.json", 60 "task_profiles_30.json", 61 ], 62} 63 64prebuilt_etc { 65 name: "task_profiles_28.json", 66 src: "task_profiles_28.json", 67 sub_dir: "task_profiles", 68} 69 70prebuilt_etc { 71 name: "task_profiles_29.json", 72 src: "task_profiles_29.json", 73 sub_dir: "task_profiles", 74} 75 76prebuilt_etc { 77 name: "task_profiles_30.json", 78 src: "task_profiles_30.json", 79 sub_dir: "task_profiles", 80} 81 82cc_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 93cc_library_static { 94 name: "libprocessgroup_proto", 95 host_supported: true, 96 defaults: ["libprocessgroup_test_defaults"], 97 srcs: [ 98 "cgroups.proto", 99 "task_profiles.proto", 100 ], 101 proto: { 102 type: "full", 103 export_proto_headers: true, 104 }, 105} 106 107cc_test_host { 108 name: "libprocessgroup_proto_test", 109 defaults: ["libprocessgroup_test_defaults"], 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 ], 125 data: [ 126 "cgroups.json", 127 "cgroups.recovery.json", 128 "task_profiles.json", 129 ], 130} 131 132cc_test { 133 name: "vts_processgroup_validate_test", 134 defaults: ["libprocessgroup_test_defaults"], 135 srcs: [ 136 "test_vendor.cpp", 137 ], 138 static_libs: [ 139 "libbase", 140 "libgmock", 141 "liblog", 142 "libjsoncpp", 143 "libjsonpbverify", 144 "libjsonpbparse", 145 "libprocessgroup_proto", 146 ], 147 shared_libs: [ 148 "libprotobuf-cpp-full", 149 ], 150 test_suites: [ 151 "vts", 152 ], 153} 154