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