1// 2// Copyright (C) 2018 The Android Open Source Project 3// 4// Licensed under the Apache License, Version 2.0 (the "License"); 5// you may not use this file except in compliance with the License. 6// You may obtain a copy of the License at 7// 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// See the License for the specific language governing permissions and 14// limitations under the License. 15// 16 17package { 18 default_applicable_licenses: ["Android-Apache-2.0"], 19} 20 21cc_defaults { 22 name: "binary_bpf_defaults", 23 srcs: ["BpfTest.cpp"], 24 shared_libs: [ 25 "libcgrouprc", 26 "libcutils", 27 "libutils", 28 "liblog", 29 "libbase", 30 ], 31 static_libs: [ 32 "libbpf_bcc", 33 "libbpf_android", 34 "libbpf_minimal", 35 "libnetdutils", 36 "libtestUtil", 37 ], 38 cflags: [ 39 "-fno-strict-aliasing", 40 "-Wall", 41 "-Werror", 42 "-Wno-unused-variable", 43 ], 44 data: [ 45 ":kern.o", 46 ], 47 48} 49 50bpf { 51 name: "kern.o", 52 include_dirs: ["packages/modules/Connectivity/bpf_progs"], 53 srcs: ["kern.c"], 54 cflags: [ 55 "-Wall", 56 "-Werror", 57 ], 58} 59 60cc_test { 61 name: "bpf_module_test", 62 defaults: ["binary_bpf_defaults"], 63 test_config: "bpf_module_test.xml", 64 test_suites: [ 65 "device-tests", 66 "vts", 67 ], 68} 69 70cc_test { 71 name: "vts_test_binary_bpf_module", 72 defaults: ["binary_bpf_defaults"], 73} 74