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