1*288bf522SAndroid Build Coastguard Worker// Copyright (C) 2018 The Android Open Source Project 2*288bf522SAndroid Build Coastguard Worker// 3*288bf522SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License"); 4*288bf522SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License. 5*288bf522SAndroid Build Coastguard Worker// You may obtain a copy of the License at 6*288bf522SAndroid Build Coastguard Worker// 7*288bf522SAndroid Build Coastguard Worker// http://www.apache.org/licenses/LICENSE-2.0 8*288bf522SAndroid Build Coastguard Worker// 9*288bf522SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software 10*288bf522SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS, 11*288bf522SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12*288bf522SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and 13*288bf522SAndroid Build Coastguard Worker// limitations under the License. 14*288bf522SAndroid Build Coastguard Worker 15*288bf522SAndroid Build Coastguard Workerpackage { 16*288bf522SAndroid Build Coastguard Worker default_applicable_licenses: ["Android-Apache-2.0"], 17*288bf522SAndroid Build Coastguard Worker} 18*288bf522SAndroid Build Coastguard Worker 19*288bf522SAndroid Build Coastguard Workercc_test { 20*288bf522SAndroid Build Coastguard Worker name: "meminspect_tests", 21*288bf522SAndroid Build Coastguard Worker 22*288bf522SAndroid Build Coastguard Worker test_suites: ["device-tests"], 23*288bf522SAndroid Build Coastguard Worker 24*288bf522SAndroid Build Coastguard Worker // Required for reading-writing files which are part of the tests. 25*288bf522SAndroid Build Coastguard Worker require_root: true, 26*288bf522SAndroid Build Coastguard Worker 27*288bf522SAndroid Build Coastguard Worker shared_libs: [ 28*288bf522SAndroid Build Coastguard Worker "libbase", 29*288bf522SAndroid Build Coastguard Worker "libziparchive", 30*288bf522SAndroid Build Coastguard Worker ], 31*288bf522SAndroid Build Coastguard Worker 32*288bf522SAndroid Build Coastguard Worker cppflags: [ 33*288bf522SAndroid Build Coastguard Worker "-g", 34*288bf522SAndroid Build Coastguard Worker "-Wall", 35*288bf522SAndroid Build Coastguard Worker "-Werror", 36*288bf522SAndroid Build Coastguard Worker ], 37*288bf522SAndroid Build Coastguard Worker 38*288bf522SAndroid Build Coastguard Worker static_libs: [ 39*288bf522SAndroid Build Coastguard Worker "libmeminspect", 40*288bf522SAndroid Build Coastguard Worker ], 41*288bf522SAndroid Build Coastguard Worker 42*288bf522SAndroid Build Coastguard Worker target: { 43*288bf522SAndroid Build Coastguard Worker android: { 44*288bf522SAndroid Build Coastguard Worker srcs: ["meminspect_tests.cpp"], 45*288bf522SAndroid Build Coastguard Worker }, 46*288bf522SAndroid Build Coastguard Worker }, 47*288bf522SAndroid Build Coastguard Worker 48*288bf522SAndroid Build Coastguard Worker cflags: [ 49*288bf522SAndroid Build Coastguard Worker "-Wall", 50*288bf522SAndroid Build Coastguard Worker "-Wextra", 51*288bf522SAndroid Build Coastguard Worker "-Werror", 52*288bf522SAndroid Build Coastguard Worker "-O0", // as some tests rely on compiler keeping code as is 53*288bf522SAndroid Build Coastguard Worker ], 54*288bf522SAndroid Build Coastguard Worker 55*288bf522SAndroid Build Coastguard Worker compile_multilib: "first", 56*288bf522SAndroid Build Coastguard Worker} 57*288bf522SAndroid Build Coastguard Worker 58*288bf522SAndroid Build Coastguard Workercc_test { 59*288bf522SAndroid Build Coastguard Worker name: "pintool_tests", 60*288bf522SAndroid Build Coastguard Worker 61*288bf522SAndroid Build Coastguard Worker test_suites: ["device-tests"], 62*288bf522SAndroid Build Coastguard Worker 63*288bf522SAndroid Build Coastguard Worker // Required for reading-writing files which are part of the tests. 64*288bf522SAndroid Build Coastguard Worker require_root: true, 65*288bf522SAndroid Build Coastguard Worker 66*288bf522SAndroid Build Coastguard Worker shared_libs: [ 67*288bf522SAndroid Build Coastguard Worker "libbase", 68*288bf522SAndroid Build Coastguard Worker "libziparchive", 69*288bf522SAndroid Build Coastguard Worker ], 70*288bf522SAndroid Build Coastguard Worker 71*288bf522SAndroid Build Coastguard Worker cppflags: [ 72*288bf522SAndroid Build Coastguard Worker "-g", 73*288bf522SAndroid Build Coastguard Worker "-Wall", 74*288bf522SAndroid Build Coastguard Worker "-Werror", 75*288bf522SAndroid Build Coastguard Worker ], 76*288bf522SAndroid Build Coastguard Worker 77*288bf522SAndroid Build Coastguard Worker static_libs: [ 78*288bf522SAndroid Build Coastguard Worker "libmeminspect", 79*288bf522SAndroid Build Coastguard Worker ], 80*288bf522SAndroid Build Coastguard Worker 81*288bf522SAndroid Build Coastguard Worker target: { 82*288bf522SAndroid Build Coastguard Worker android: { 83*288bf522SAndroid Build Coastguard Worker srcs: ["pintool_tests.cpp"], 84*288bf522SAndroid Build Coastguard Worker }, 85*288bf522SAndroid Build Coastguard Worker }, 86*288bf522SAndroid Build Coastguard Worker 87*288bf522SAndroid Build Coastguard Worker cflags: [ 88*288bf522SAndroid Build Coastguard Worker "-Wall", 89*288bf522SAndroid Build Coastguard Worker "-Wextra", 90*288bf522SAndroid Build Coastguard Worker "-Werror", 91*288bf522SAndroid Build Coastguard Worker "-O0", // as some tests rely on compiler keeping code as is 92*288bf522SAndroid Build Coastguard Worker ], 93*288bf522SAndroid Build Coastguard Worker 94*288bf522SAndroid Build Coastguard Worker compile_multilib: "first", 95*288bf522SAndroid Build Coastguard Worker} 96