1// Copyright (C) 2017 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 19android_test_helper_app { 20 name: "CtsJvmtiAttachingDeviceApp", 21 dex_preopt: { 22 enabled: false, 23 }, 24 optimize: { 25 enabled: false, 26 }, 27 srcs: ["app/src/**/*.java"], 28 manifest: "app/AndroidManifest.xml", 29 jni_libs: ["libctsjvmtiattachagent"], 30 compile_multilib: "both", 31 sdk_version: "test_current", 32} 33 34cc_library_shared { 35 name: "libctsjvmtiattachagent", 36 srcs: ["app/jni/cts_agent.cpp"], 37 header_libs: ["libopenjdkjvmti_headers"], 38 shared_libs: [ 39 "liblog", 40 "libdl", 41 "libz", 42 ], 43 44 // The test implementation. We get this provided by ART. 45 // Note: Needs to be "whole" as this exposes JNI functions. 46 whole_static_libs: ["libctstiagent"], 47 sdk_version: "current", 48 49 // Platform libraries that may not be available to apps. Link in statically. 50 static_libs: ["libbase_ndk"], 51 strip: { 52 keep_symbols: true, 53 }, 54 // Turn on all warnings. 55 cflags: [ 56 "-fno-rtti", 57 "-ggdb3", 58 "-Wall", 59 "-Wextra", 60 "-Werror", 61 "-Wunreachable-code", 62 "-Wredundant-decls", 63 "-Wshadow", 64 "-Wunused", 65 "-Wimplicit-fallthrough", 66 "-Wfloat-equal", 67 "-Wint-to-void-pointer-cast", 68 "-Wused-but-marked-unused", 69 "-Wdeprecated", 70 "-Wunreachable-code-break", 71 "-Wunreachable-code-return", 72 "-g", 73 "-O0", 74 ], 75 stl: "c++_static", 76} 77 78java_test_host { 79 name: "CtsJvmtiAttachingHostTestCases", 80 srcs: ["host/**/*.java"], 81 libs: [ 82 "cts-tradefed", 83 "tradefed", 84 "compatibility-host-util", 85 ], 86 test_suites: [ 87 "cts", 88 "general-tests", 89 ], 90 test_config: "host/AndroidTest.xml", 91 data: [":CtsJvmtiAttachingDeviceApp"], 92 test_options: { 93 unit_test: false, 94 }, 95}