blob: 1b890fededcfeb09016a11857507cc29e652d56b [file] [log] [blame]
Colin Cross6b22aa52016-09-12 14:35:39 -07001//
2// Copyright (C) 2016 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
Roland Levillain962a1102019-11-01 16:20:33 +000017// ART gtests.
18
Bob Badour9150de62021-02-26 03:22:24 -080019package {
20 // See: http://go/android-license-faq
21 // A large-scale-change added 'default_applicable_licenses' to import
22 // all of the 'license_kinds' from "art_license"
23 // to get the below license kinds:
24 // SPDX-license-identifier-Apache-2.0
25 default_applicable_licenses: ["art_license"],
26}
27
Martin Stjernholm7eedd442021-05-06 10:03:21 +010028soong_config_module_type_import {
29 from: "art/build/SoongConfig.bp",
30 module_types: [
31 "art_module_cc_defaults",
32 ],
33}
34
35art_module_cc_defaults {
Colin Cross6e95dd52016-09-12 15:37:10 -070036 name: "art_test_defaults",
37 host_supported: true,
Martin Stjernholm7eedd442021-05-06 10:03:21 +010038 soong_config_variables: {
39 source_build: {
40 target: {
41 android: {
42 test_for: [
43 "com.android.art",
44 "com.android.art.debug",
45 ],
46 },
47 },
Martin Stjernholmd3e9ff32021-03-16 00:44:25 +000048 },
Martin Stjernholm7eedd442021-05-06 10:03:21 +010049 },
50 target: {
Martin Stjernholm0d0f8df2021-04-28 16:47:01 +010051 // The following set of relative_install_paths installs the library in a
52 // location that will be available as java.library.path in run tests.
Colin Crossafd3c9e2016-09-16 13:47:21 -070053 android_arm: {
Roland Levillaind4d6fb52019-08-05 12:28:39 +010054 relative_install_path: "art/arm",
Colin Crossafd3c9e2016-09-16 13:47:21 -070055 },
56 android_arm64: {
Roland Levillaind4d6fb52019-08-05 12:28:39 +010057 relative_install_path: "art/arm64",
Colin Crossafd3c9e2016-09-16 13:47:21 -070058 },
Colin Crossafd3c9e2016-09-16 13:47:21 -070059 android_x86: {
Roland Levillaind4d6fb52019-08-05 12:28:39 +010060 relative_install_path: "art/x86",
Colin Crossafd3c9e2016-09-16 13:47:21 -070061 },
62 android_x86_64: {
Roland Levillaind4d6fb52019-08-05 12:28:39 +010063 relative_install_path: "art/x86_64",
Colin Crossafd3c9e2016-09-16 13:47:21 -070064 },
Colin Crossfd5428b2016-09-19 10:40:05 -070065 darwin: {
66 enabled: false,
67 },
Colin Crossafd3c9e2016-09-16 13:47:21 -070068 },
Dan Albertb5d36de2016-09-21 14:56:51 -070069 cflags: [
70 "-Wno-frame-larger-than=",
71 ],
Martin Stjernholmd3e9ff32021-03-16 00:44:25 +000072 // Tests aren't generally included in any APEX, but this is necessary to
73 // avoid duplicate install rules for them by making them unavailable to platform.
Jiyong Park066dd9022019-12-19 02:11:59 +000074 apex_available: [
75 "com.android.art.debug",
76 ],
Colin Crossafd3c9e2016-09-16 13:47:21 -070077}
78
Martin Stjernholm0d0f8df2021-04-28 16:47:01 +010079// Variant of art_test_defaults that installs the library in a location which
80// will be added to the default namespace, and hence also the com_android_art
81// namespace. That allows the library to have shared_libs dependencies on all
82// ART internal libraries.
83//
84// Currently this only works for run tests where run-test-jar sets
85// LD_LIBRARY_PATH and NATIVELOADER_DEFAULT_NAMESPACE_LIBS.
86art_cc_defaults {
87 name: "art_test_internal_library_defaults",
88 defaults: ["art_test_defaults"],
89 target: {
90 android_arm: {
91 relative_install_path: "com.android.art/lib",
92 },
93 android_arm64: {
94 relative_install_path: "com.android.art/lib64",
95 },
96 android_x86: {
97 relative_install_path: "com.android.art/lib",
98 },
99 android_x86_64: {
100 relative_install_path: "com.android.art/lib64",
101 },
102 },
103}
104
Colin Crossafd3c9e2016-09-16 13:47:21 -0700105art_cc_defaults {
106 name: "art_gtest_defaults",
Colin Cross6e95dd52016-09-12 15:37:10 -0700107 // These really are gtests, but the gtest library comes from libart-gtest.so
108 gtest: false,
109 defaults: [
Colin Crossafd3c9e2016-09-16 13:47:21 -0700110 "art_test_defaults",
Andreas Gampe5115efb2017-05-24 16:55:54 -0700111 "art_debug_defaults",
112 "art_defaults",
Colin Cross6e95dd52016-09-12 15:37:10 -0700113 ],
114
Dan Shi66474c22020-10-20 14:17:57 -0700115 test_suites: ["art-host-tests"],
David Srbecky9a09e7c2020-07-02 00:08:06 +0000116 test_options: {
117 test_suite_tag: ["art-host-gtest"],
118 },
119
Colin Cross6e95dd52016-09-12 15:37:10 -0700120 shared_libs: [
121 "libartd",
122 "libartd-disassembler",
Colin Cross6e95dd52016-09-12 15:37:10 -0700123 "libart-gtest",
David Sehrfcbe15c2018-02-15 09:41:13 -0800124 "libdexfiled",
David Sehr82d046e2018-04-23 08:14:19 -0700125 "libprofiled",
David Sehr1f010162018-05-15 08:59:32 -0700126 "libartbased",
Colin Cross6e95dd52016-09-12 15:37:10 -0700127
Andreas Gampe3fec9ac2016-09-13 10:47:28 -0700128 "libbase",
Colin Cross6e95dd52016-09-12 15:37:10 -0700129 "libnativehelper",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000130 "libz",
Colin Cross6e95dd52016-09-12 15:37:10 -0700131 ],
Colin Cross6e95dd52016-09-12 15:37:10 -0700132
133 target: {
Dan Willemsen057f1e42017-10-03 14:11:48 -0700134 linux: {
Colin Cross6e95dd52016-09-12 15:37:10 -0700135 ldflags: [
136 // Allow jni_compiler_test to find Java_MyClassNatives_bar
137 // within itself using dlopen(NULL, ...).
138 // Mac OS linker doesn't understand --export-dynamic.
139 "-Wl,--export-dynamic",
140 "-Wl,-u,Java_MyClassNatives_bar",
141 "-Wl,-u,Java_MyClassNatives_sbar",
142 ],
Colin Cross6e95dd52016-09-12 15:37:10 -0700143 cflags: [
144 // gtest issue
145 "-Wno-used-but-marked-unused",
146 "-Wno-deprecated",
147 "-Wno-missing-noreturn",
148 ],
149 },
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000150 host: {
151 shared_libs: [
152 "libziparchive",
153 ],
154 },
Dan Willemsen057f1e42017-10-03 14:11:48 -0700155 android: {
Colin Cross6e95dd52016-09-12 15:37:10 -0700156 shared_libs: [
Dimitry Ivanov9642b1b2016-09-28 02:44:00 -0700157 "liblog",
Colin Cross6e95dd52016-09-12 15:37:10 -0700158 ],
Colin Cross6e95dd52016-09-12 15:37:10 -0700159 },
Colin Cross6e95dd52016-09-12 15:37:10 -0700160 },
161}
162
163art_cc_defaults {
Colin Cross6b22aa52016-09-12 14:35:39 -0700164 name: "libart-gtest-defaults",
165 host_supported: true,
166 defaults: [
Colin Cross6b22aa52016-09-12 14:35:39 -0700167 "art_debug_defaults",
Andreas Gampe5115efb2017-05-24 16:55:54 -0700168 "art_defaults",
Colin Cross6b22aa52016-09-12 14:35:39 -0700169 ],
170 shared_libs: [
171 "libartd",
172 "libartd-compiler",
David Sehrfcbe15c2018-02-15 09:41:13 -0800173 "libdexfiled",
David Sehr82d046e2018-04-23 08:14:19 -0700174 "libprofiled",
David Sehr1f010162018-05-15 08:59:32 -0700175 "libartbased",
David Srbecky883c1342020-05-11 23:30:29 +0000176 "liblog",
Colin Cross6b22aa52016-09-12 14:35:39 -0700177 ],
178 static_libs: [
David Srbecky883c1342020-05-11 23:30:29 +0000179 "libgtest_isolated",
Colin Cross6b22aa52016-09-12 14:35:39 -0700180 ],
181 target: {
182 android32: {
Colin Crossc5c71872016-09-15 21:07:29 -0700183 cflags: ["-DART_TARGET_NATIVETEST_DIR=/data/nativetest/art"],
Colin Cross6b22aa52016-09-12 14:35:39 -0700184 },
185 android64: {
186 cflags: ["-DART_TARGET_NATIVETEST_DIR=/data/nativetest64/art"],
187 },
Dan Willemsen057f1e42017-10-03 14:11:48 -0700188 linux: {
Colin Cross6b22aa52016-09-12 14:35:39 -0700189 cflags: [
190 // gtest issue
191 "-Wno-used-but-marked-unused",
192 "-Wno-deprecated",
193 "-Wno-missing-noreturn",
194 ],
195 },
Colin Cross942036f2016-09-15 16:24:51 -0700196 darwin: {
197 enabled: false,
198 },
Colin Cross6b22aa52016-09-12 14:35:39 -0700199 },
Jiyong Park066dd9022019-12-19 02:11:59 +0000200 apex_available: [
201 "com.android.art.debug",
Martin Stjernholmd3e9ff32021-03-16 00:44:25 +0000202 // TODO(b/183882457): This lib doesn't go into com.android.art, but
203 // apex_available lists need to be the same for internal libs to avoid
204 // stubs, and this depends on libdexfiled and others.
205 "com.android.art",
Jiyong Park066dd9022019-12-19 02:11:59 +0000206 ],
Colin Cross6b22aa52016-09-12 14:35:39 -0700207}
208
209art_cc_library {
210 name: "libart-gtest",
211 host_supported: true,
David Srbecky883c1342020-05-11 23:30:29 +0000212 defaults: [
213 "art_debug_defaults",
214 "art_defaults",
215 ],
216 srcs: [
217 "common/gtest_main.cc",
218 ],
Colin Cross6b22aa52016-09-12 14:35:39 -0700219 whole_static_libs: [
220 "libart-compiler-gtest",
221 "libart-runtime-gtest",
David Sehrd5f8de82018-04-27 14:12:03 -0700222 "libartbase-art-gtest",
David Srbecky883c1342020-05-11 23:30:29 +0000223 "libgtest_isolated",
Colin Cross6b22aa52016-09-12 14:35:39 -0700224 ],
225 shared_libs: [
226 "libartd",
227 "libartd-compiler",
David Sehrfcbe15c2018-02-15 09:41:13 -0800228 "libdexfiled",
David Sehr82d046e2018-04-23 08:14:19 -0700229 "libprofiled",
David Sehr1f010162018-05-15 08:59:32 -0700230 "libartbased",
Colin Crossf0af9062016-10-21 10:50:31 -0700231 "libbase",
Dan Willemsen2ca27802017-09-27 14:57:43 -0700232 "libbacktrace",
David Srbecky883c1342020-05-11 23:30:29 +0000233 "liblog",
Colin Cross6b22aa52016-09-12 14:35:39 -0700234 ],
235 target: {
Colin Cross942036f2016-09-15 16:24:51 -0700236 darwin: {
237 enabled: false,
238 },
Colin Cross6b22aa52016-09-12 14:35:39 -0700239 },
Jiyong Park066dd9022019-12-19 02:11:59 +0000240 apex_available: [
241 "com.android.art.debug",
Martin Stjernholmd3e9ff32021-03-16 00:44:25 +0000242 // TODO(b/183882457): This lib doesn't go into com.android.art, but
243 // apex_available lists need to be the same for internal libs to avoid
244 // stubs, and this depends on libdexfiled and others.
245 "com.android.art",
Jiyong Park066dd9022019-12-19 02:11:59 +0000246 ],
Colin Cross6b22aa52016-09-12 14:35:39 -0700247}
Colin Crossafd3c9e2016-09-16 13:47:21 -0700248
Roland Levillain962a1102019-11-01 16:20:33 +0000249// ART run-tests.
250
Roland Levillain4258f9e2020-10-13 12:10:59 +0100251// Test configuration template for ART run-tests on target expected to run
252// successfully, and as such tagged as part of TradeFed's `art-target-run-test`
253// test suite via the `test-suite-tag`.
Roland Levillaina8049c62019-11-01 16:11:20 +0000254filegroup {
Roland Levillain4258f9e2020-10-13 12:10:59 +0100255 name: "art-run-test-target-template",
Roland Levillaina8049c62019-11-01 16:11:20 +0000256 srcs: [
Roland Levillain4258f9e2020-10-13 12:10:59 +0100257 "art-run-test-target-template.xml",
258 ],
259}
260
261// Test configuration template for ART run-tests on target expected to run
262// successfully, and as such *not* tagged as part of TradeFed's
263// `art-target-run-test` test suite via the `test-suite-tag`. This is as
264// temporary measure, while we add proper support for all ART (target) run-tests
265// to TradeFed (b/147818031).
266filegroup {
267 name: "art-run-test-target-no-test-suite-tag-template",
268 srcs: [
269 "art-run-test-target-no-test-suite-tag-template.xml",
Roland Levillaina8049c62019-11-01 16:11:20 +0000270 ],
271}
272
Roland Levillain79d90922020-02-04 15:41:45 +0000273java_defaults {
274 name: "art-run-test-defaults",
Roland Levillain9a0f9ba2020-02-13 15:06:54 +0000275
Roland Levillain79d90922020-02-04 15:41:45 +0000276 // Compile against the "core" bootclasspath, not the "default" one (current
Roland Levillain9a0f9ba2020-02-13 15:06:54 +0000277 // platform) -- use the same settings as Libcore tests (see e.g. the
278 // definition of module `core-tests` in libcore/JavaLibrary.bp).
279 //
280 // Note: The legacy way to build ART run-tests uses the
281 // `javac_with_bootclasspath` function defined in `test/etc/default-build`.
282 // See also `tools/javac-helper.sh`.
283 sdk_version: "none",
284 system_modules: "core-all-system-modules",
285
Roland Levillain01e56982020-02-10 12:28:01 +0000286 // Some ART run-tests contain constructs which break ErrorProne checks;
287 // disable them on `errorprone` builds.
288 errorprone: {
289 javacflags: ["-XepDisableAllChecks"],
290 },
Roland Levillain00381bf2020-09-01 17:28:11 +0100291 test_suites: [
292 "general-tests",
Kimberly Kreider284e8b02020-12-15 09:40:30 -0800293 "mts-art",
Roland Levillain00381bf2020-09-01 17:28:11 +0100294 ],
Daniil Riazanovskiy1ca19bc2020-10-01 00:32:21 +0000295 host_required: [
296 "art-run-test-checker",
297 ],
Roland Levillain79d90922020-02-04 15:41:45 +0000298}
299
Roland Levillain962a1102019-11-01 16:20:33 +0000300art_cc_test_library {
301 name: "libarttest",
302 defaults: ["libarttest-defaults"],
303 shared_libs: [
304 "libart",
305 "libdexfile",
306 "libprofile",
307 "libartbase",
308 ],
309}
310
311art_cc_test_library {
312 name: "libarttestd",
313 defaults: [
314 "art_debug_defaults",
315 "libarttest-defaults",
316 ],
317 shared_libs: [
318 "libartd",
319 "libdexfiled",
320 "libprofiled",
321 "libartbased",
322 ],
323}
324
325art_cc_defaults {
326 name: "libnativebridgetest-defaults",
327 defaults: [
328 "art_test_defaults",
329 "art_defaults",
330 ],
331 header_libs: ["libnativebridge-headers"],
332 srcs: ["115-native-bridge/nativebridge.cc"],
333}
334
335art_cc_test_library {
336 name: "libnativebridgetest",
337 shared_libs: ["libart"],
338 defaults: [
339 "libnativebridgetest-defaults",
340 ],
341}
342
343art_cc_test_library {
344 name: "libnativebridgetestd",
345 shared_libs: ["libartd"],
346 defaults: [
347 "libnativebridgetest-defaults",
348 "art_debug_defaults",
349 ],
350}
351
352// ART JVMTI run-tests.
353
Colin Crossafd3c9e2016-09-16 13:47:21 -0700354cc_defaults {
355 name: "libartagent-defaults",
356 defaults: [
Martin Stjernholm0d0f8df2021-04-28 16:47:01 +0100357 "art_test_internal_library_defaults",
Andreas Gampe5115efb2017-05-24 16:55:54 -0700358 "art_defaults",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700359 ],
360 shared_libs: [
361 "libbacktrace",
Andreas Gampe3fec9ac2016-09-13 10:47:28 -0700362 "libbase",
Orion Hodsonfcc922a2021-05-21 11:32:33 +0100363 "liblog",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700364 "libnativehelper",
365 ],
Colin Crossafd3c9e2016-09-16 13:47:21 -0700366}
367
368art_cc_test_library {
369 name: "libartagent",
370 srcs: ["900-hello-plugin/load_unload.cc"],
371 defaults: ["libartagent-defaults"],
Andreas Gampe9462a562018-02-20 09:35:21 -0800372 shared_libs: [
373 "libart",
374 "libdexfile",
David Sehr82d046e2018-04-23 08:14:19 -0700375 "libprofile",
David Sehr1f010162018-05-15 08:59:32 -0700376 "libartbase",
Andreas Gampe9462a562018-02-20 09:35:21 -0800377 ],
Colin Crossafd3c9e2016-09-16 13:47:21 -0700378}
379
380art_cc_test_library {
381 name: "libartagentd",
382 srcs: ["900-hello-plugin/load_unload.cc"],
383 defaults: [
Colin Crossafd3c9e2016-09-16 13:47:21 -0700384 "art_debug_defaults",
Andreas Gampe5115efb2017-05-24 16:55:54 -0700385 "libartagent-defaults",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700386 ],
Andreas Gampe9462a562018-02-20 09:35:21 -0800387 shared_libs: [
388 "libartd",
389 "libdexfiled",
David Sehr82d046e2018-04-23 08:14:19 -0700390 "libprofiled",
David Sehr1f010162018-05-15 08:59:32 -0700391 "libartbased",
Andreas Gampe9462a562018-02-20 09:35:21 -0800392 ],
Colin Crossafd3c9e2016-09-16 13:47:21 -0700393}
394
Andreas Gampee54d9922016-10-11 19:55:37 -0700395art_cc_defaults {
Dan Willemsen2ca27802017-09-27 14:57:43 -0700396 name: "libtiagent-base-defaults",
Andreas Gampecb5125d2018-02-20 09:36:54 -0800397 defaults: [
Martin Stjernholm0d0f8df2021-04-28 16:47:01 +0100398 "art_test_internal_library_defaults",
Andreas Gampecb5125d2018-02-20 09:36:54 -0800399 "art_defaults",
400 // Not derived from libartagent-defaults for NDK.
401 ],
Colin Crossafd3c9e2016-09-16 13:47:21 -0700402 srcs: [
Andreas Gampe027444b2017-03-31 12:49:07 -0700403 // These are the ART-independent parts.
Andreas Gampe46651672017-04-07 09:00:04 -0700404 "ti-agent/agent_common.cc",
Andreas Gampe027444b2017-03-31 12:49:07 -0700405 "ti-agent/agent_startup.cc",
Andreas Gampe3f46c962017-03-30 10:26:59 -0700406 "ti-agent/jni_binder.cc",
407 "ti-agent/jvmti_helper.cc",
408 "ti-agent/test_env.cc",
Alex Lightd0d65962017-06-30 11:13:33 -0700409 "ti-agent/breakpoint_helper.cc",
Alex Light78d63412017-04-14 16:20:53 -0700410 "ti-agent/common_helper.cc",
Alex Lightb7c640d2019-03-20 15:52:13 -0700411 "ti-agent/early_return_helper.cc",
Alex Lighte814f9d2017-07-31 16:14:39 -0700412 "ti-agent/frame_pop_helper.cc",
Alex Light47d49b82017-07-25 14:06:34 -0700413 "ti-agent/locals_helper.cc",
Alex Lightce568642017-09-05 16:54:25 -0700414 "ti-agent/monitors_helper.cc",
Alex Lightd0d65962017-06-30 11:13:33 -0700415 "ti-agent/redefinition_helper.cc",
Alex Light88fd7202017-06-30 08:31:59 -0700416 "ti-agent/suspension_helper.cc",
Alex Lightb4e65072019-04-25 15:10:32 -0700417 "ti-agent/suspend_event_helper.cc",
Alex Light47d49b82017-07-25 14:06:34 -0700418 "ti-agent/stack_trace_helper.cc",
Alex Light54d39dc2017-09-25 17:00:16 -0700419 "ti-agent/threads_helper.cc",
Alex Lightd0d65962017-06-30 11:13:33 -0700420 "ti-agent/trace_helper.cc",
Alex Light9fb1ab12017-09-05 09:32:49 -0700421 "ti-agent/exceptions_helper.cc",
Andreas Gampe027444b2017-03-31 12:49:07 -0700422 // This is the list of non-special OnLoad things and excludes BCI and anything that depends
423 // on ART internals.
Andreas Gampe6dee92e2016-09-12 19:58:13 -0700424 "903-hello-tagging/tagging.cc",
Andreas Gampe27fa96c2016-10-07 15:05:24 -0700425 "904-object-allocation/tracking.cc",
Andreas Gampecc13b222016-10-10 19:09:09 -0700426 "905-object-free/tracking_free.cc",
Andreas Gampee54d9922016-10-11 19:55:37 -0700427 "906-iterate-heap/iterate_heap.cc",
Andreas Gampeaa8b60c2016-10-12 12:51:25 -0700428 "907-get-loaded-classes/get_loaded_classes.cc",
Andreas Gampe9b8c5882016-10-21 15:27:46 -0700429 "908-gc-start-finish/gc_callbacks.cc",
Andreas Gampe3c252f02016-10-27 18:25:17 -0700430 "910-methods/methods.cc",
Andreas Gampeb5eb94a2016-10-27 19:23:09 -0700431 "911-get-stack-trace/stack_trace.cc",
Andreas Gamped5f2ccc2017-04-19 13:37:48 -0700432 "912-classes/classes.cc",
Andreas Gampee0f8ed92017-04-13 16:52:23 -0700433 "913-heaps/heaps.cc",
Andreas Gampeab2f0d02017-01-05 17:23:45 -0800434 "918-fields/fields.cc",
Andreas Gampe50a4e492017-01-06 18:00:20 -0800435 "920-objects/objects.cc",
Andreas Gampe1bdaf732017-01-09 19:21:06 -0800436 "922-properties/properties.cc",
Andreas Gampe319dbe82017-01-09 16:42:21 -0800437 "923-monitors/monitors.cc",
Andreas Gampeaf13ab92017-01-11 20:57:40 -0800438 "924-threads/threads.cc",
Andreas Gamped18d9e22017-01-16 16:08:45 +0000439 "925-threadgroups/threadgroups.cc",
Andreas Gampe35bcf812017-01-13 16:24:17 -0800440 "927-timers/timers.cc",
Andreas Gampe6f8e4f02017-01-16 18:18:14 -0800441 "928-jni-table/jni_table.cc",
Andreas Gampece7732b2017-01-17 15:50:26 -0800442 "929-search/search.cc",
Andreas Gampe732b0ac2017-01-18 15:23:39 -0800443 "931-agent-thread/agent_thread.cc",
Andreas Gampeeb0cea12017-01-23 08:50:04 -0800444 "933-misc-events/misc_events.cc",
Alex Light78d63412017-04-14 16:20:53 -0700445 "945-obsolete-native/obsolete_native.cc",
Alex Light8fd08562018-02-13 10:09:03 -0800446 "983-source-transform-verify/source_transform.cc",
Alex Light78d63412017-04-14 16:20:53 -0700447 "984-obsolete-invoke/obsolete_invoke.cc",
Alex Lightd78ddec2017-04-18 15:20:38 -0700448 "986-native-method-bind/native_bind.cc",
Alex Light65af20b2017-04-20 09:15:08 -0700449 "987-agent-bind/agent_bind.cc",
Alex Lighte85595e2018-08-17 15:54:34 -0700450 "988-method-trace/trace_fib.cc",
Alex Lightb7edcda2017-04-27 13:20:31 -0700451 "989-method-trace-throw/method_trace.cc",
Alex Light7c958492017-06-16 08:59:19 -0700452 "991-field-trace-2/field_trace.cc",
Alex Light6fa7b812017-06-16 09:04:29 -0700453 "992-source-data/source_file.cc",
Alex Lightc38c3692017-06-27 15:45:14 -0700454 "993-breakpoints/breakpoints.cc",
455 "996-breakpoint-obsolete/obsolete_breakpoints.cc",
Alex Light8ddfd9f2017-07-05 16:33:46 -0700456 "1900-track-alloc/alloc.cc",
Alex Light4c174282017-07-05 10:18:18 -0700457 "1901-get-bytecodes/bytecodes.cc",
Alex Light88fd7202017-06-30 08:31:59 -0700458 "1905-suspend-native/native_suspend.cc",
459 "1908-suspend-native-resume-self/native_suspend_resume.cc",
Alex Light092a4042017-07-12 08:46:44 -0700460 "1909-per-agent-tls/agent_tls.cc",
Alex Light47d49b82017-07-25 14:06:34 -0700461 "1914-get-local-instance/local_instance.cc",
Alex Light1d8a9742017-08-17 11:12:06 -0700462 "1919-vminit-thread-start-timing/vminit.cc",
Alex Light23aa7482017-08-16 10:01:13 -0700463 "1920-suspend-native-monitor/native_suspend_monitor.cc",
464 "1921-suspend-native-recursive-monitor/native_suspend_recursive_monitor.cc",
Alex Light88e1ddd2017-08-21 13:09:55 -0700465 "1922-owned-monitors-info/owned_monitors.cc",
Alex Lighte814f9d2017-07-31 16:14:39 -0700466 "1924-frame-pop-toggle/frame_pop_toggle.cc",
467 "1926-missed-frame-pop/frame_pop_missed.cc",
Alex Lightce568642017-09-05 16:54:25 -0700468 "1927-exception-event/exception_event.cc",
469 "1930-monitor-info/monitor.cc",
Dan Willemsen2ca27802017-09-27 14:57:43 -0700470 "1932-monitor-events-misc/monitor_misc.cc",
Alex Light54d39dc2017-09-25 17:00:16 -0700471 "1934-jvmti-signal-thread/signal_threads.cc",
Alex Light3dea2122017-10-11 15:56:48 +0000472 "1939-proxy-frames/local_instance.cc",
Alex Lightb284f8d2017-11-21 00:00:48 +0000473 "1941-dispose-stress/dispose_stress.cc",
Alex Light4d77daf2018-01-04 11:51:14 -0800474 "1942-suspend-raw-monitor-exit/native_suspend_monitor.cc",
475 "1943-suspend-raw-monitor-wait/native_suspend_monitor.cc",
Alex Lightc7588752018-02-20 11:15:54 -0800476 "1946-list-descriptors/descriptors.cc",
Alex Light9e7859c2018-04-05 13:49:43 -0700477 "1950-unprepared-transform/unprepared_transform.cc",
Alex Lightc98f83e2018-07-26 08:28:36 -0700478 "1951-monitor-enter-no-suspend/raw_monitor.cc",
Alex Light0aa7a5a2018-10-10 15:58:14 +0000479 "1953-pop-frame/pop_frame.cc",
Alex Lightae45cbb2018-10-18 15:49:56 -0700480 "1957-error-ext/lasterror.cc",
Alex Lightb7c640d2019-03-20 15:52:13 -0700481 // TODO Renumber
Alex Light40607862019-05-06 18:16:24 +0000482 "1962-multi-thread-events/multi_thread_events.cc",
Alex Light639e73b2019-05-17 21:44:36 +0000483 "1963-add-to-dex-classloader-in-memory/add_to_loader.cc",
Alex Lightb7c640d2019-03-20 15:52:13 -0700484 "1968-force-early-return/force_early_return.cc",
485 "1969-force-early-return-void/force_early_return_void.cc",
486 "1970-force-early-return-long/force_early_return_long.cc",
Alex Lightc14ec8f2019-07-18 16:08:41 -0700487 "1974-resize-array/resize_array.cc",
Nicolas Geoffray4ac0e152019-09-18 06:14:50 +0000488 "1975-hello-structural-transformation/structural_transform.cc",
489 "1976-hello-structural-static-methods/structural_transform_methods.cc",
Alex Light80777ed2019-12-17 17:07:33 +0000490 "2005-pause-all-redefine-multithreaded/pause-all.cc",
Alex Light72325b62020-01-09 17:49:45 -0800491 "2009-structural-local-ref/local-ref.cc",
Alex Light16527e82020-06-08 09:21:12 -0700492 "2035-structural-native-method/structural-native.cc",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700493 ],
Andreas Gampecb5125d2018-02-20 09:36:54 -0800494 // Use NDK-compatible headers for ctstiagent.
Alex Light8c2b9292017-11-09 13:21:01 -0800495 header_libs: [
Alex Light8c2b9292017-11-09 13:21:01 -0800496 "libopenjdkjvmti_headers",
497 ],
Paul Duffin4345aac2019-07-17 15:51:54 +0100498 local_include_dirs: ["ti-agent"],
Andreas Gampee54d9922016-10-11 19:55:37 -0700499}
500
Andreas Gampe027444b2017-03-31 12:49:07 -0700501art_cc_defaults {
502 name: "libtiagent-defaults",
Andreas Gampecb5125d2018-02-20 09:36:54 -0800503 defaults: [
504 "libtiagent-base-defaults",
505 "libartagent-defaults",
506 ],
Andreas Gampe027444b2017-03-31 12:49:07 -0700507 srcs: [
508 // This is to get the IsInterpreted native method.
509 "common/stack_inspect.cc",
510 "common/runtime_state.cc",
Alex Light78d63412017-04-14 16:20:53 -0700511 "ti-agent/common_load.cc",
Andreas Gampe027444b2017-03-31 12:49:07 -0700512 // This includes the remaining test functions. We should try to refactor things to
513 // make this list smaller.
Andreas Gampe027444b2017-03-31 12:49:07 -0700514 "901-hello-ti-agent/basics.cc",
515 "909-attach-agent/attach.cc",
Andreas Gamped5f2ccc2017-04-19 13:37:48 -0700516 "912-classes/classes_art.cc",
Andreas Gampe027444b2017-03-31 12:49:07 -0700517 "936-search-onload/search_onload.cc",
Alex Lightfbee3982018-05-24 10:28:46 -0700518 "980-redefine-object/redef_object.cc",
Andreas Gampe59484b92018-02-14 14:00:46 -0800519 "983-source-transform-verify/source_transform_art.cc",
Alex Light8c2b9292017-11-09 13:21:01 -0800520 "1940-ddms-ext/ddm_ext.cc",
Alex Light0aa7a5a2018-10-10 15:58:14 +0000521 // "1952-pop-frame-jit/pop_frame.cc",
Alex Lightfc81d802018-12-07 13:39:05 -0800522 "1959-redefine-object-instrument/fake_redef_object.cc",
Alex Lighte7a33542019-04-10 14:22:49 -0700523 "1960-obsolete-jit-multithread-native/native_say_hi.cc",
Alex Light639e73b2019-05-17 21:44:36 +0000524 "1964-add-to-dex-classloader-file/add_to_loader.cc",
Alex Light098e7a62019-05-21 16:57:10 -0700525 "1963-add-to-dex-classloader-in-memory/check_memfd_create.cc",
Alex Light3f0dca12020-01-27 17:20:28 -0800526 "2012-structural-redefinition-failures-jni-id/set-jni-id-used.cc",
Alex Light280e6c32020-03-03 13:52:07 -0800527 "2031-zygote-compiled-frame-deopt/native-wait.cc",
Alex Light1a0e2922021-01-12 13:57:42 +0000528 "2038-hiddenapi-jvmti-ext/hiddenapi_ext.cc",
Andreas Gampe027444b2017-03-31 12:49:07 -0700529 ],
Alex Lightfbee3982018-05-24 10:28:46 -0700530 static_libs: [
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000531 "libz",
Andreas Gampe7e057ec2019-03-04 13:11:22 -0800532 "slicer_no_rtti",
Alex Lightfbee3982018-05-24 10:28:46 -0700533 ],
Andreas Gampe027444b2017-03-31 12:49:07 -0700534}
535
Andreas Gampee54d9922016-10-11 19:55:37 -0700536art_cc_test_library {
537 name: "libtiagent",
538 defaults: ["libtiagent-defaults"],
David Sehrfcbe15c2018-02-15 09:41:13 -0800539 shared_libs: [
540 "libart",
541 "libdexfile",
David Sehr82d046e2018-04-23 08:14:19 -0700542 "libprofile",
David Sehr1f010162018-05-15 08:59:32 -0700543 "libartbase",
David Sehrfcbe15c2018-02-15 09:41:13 -0800544 ],
Colin Crossafd3c9e2016-09-16 13:47:21 -0700545}
546
547art_cc_test_library {
548 name: "libtiagentd",
549 defaults: [
Colin Crossafd3c9e2016-09-16 13:47:21 -0700550 "art_debug_defaults",
Andreas Gampe5115efb2017-05-24 16:55:54 -0700551 "libtiagent-defaults",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700552 ],
David Sehrfcbe15c2018-02-15 09:41:13 -0800553 shared_libs: [
554 "libartd",
555 "libdexfiled",
David Sehr82d046e2018-04-23 08:14:19 -0700556 "libprofiled",
David Sehr1f010162018-05-15 08:59:32 -0700557 "libartbased",
David Sehrfcbe15c2018-02-15 09:41:13 -0800558 ],
Colin Crossafd3c9e2016-09-16 13:47:21 -0700559}
560
Andreas Gampe59484b92018-02-14 14:00:46 -0800561cc_library_static {
Andreas Gamped0ed0d92018-02-12 15:03:36 -0800562 name: "libctstiagent",
563 defaults: ["libtiagent-base-defaults"],
Martin Stjernholm1dc77ab2021-05-10 17:44:05 +0100564
565 // TODO(b/187288515): Providing this as a prebuilt introduces an issue with
566 // sdk_version propagation. Temporarily use the source library instead,
567 // which means we need to override the logic inherited from art_defaults and
568 // art_test_internal_library_defaults that disables sources when not
569 // building ART from sources.
570 enabled: true,
571
Martin Stjernholmb4abe0a2019-05-17 19:22:55 +0100572 visibility: [
573 "//cts/hostsidetests/jvmti:__subpackages__",
574 ],
Andreas Gampe59484b92018-02-14 14:00:46 -0800575 host_supported: false,
576 srcs: [
577 "983-source-transform-verify/source_transform_slicer.cc",
578 ],
Andreas Gamped0ed0d92018-02-12 15:03:36 -0800579 whole_static_libs: [
Andreas Gampe7e057ec2019-03-04 13:11:22 -0800580 "slicer_ndk_no_rtti",
Andreas Gamped0ed0d92018-02-12 15:03:36 -0800581 ],
582 static_libs: [
Andreas Gampecb5125d2018-02-20 09:36:54 -0800583 "libbase_ndk",
Andreas Gamped0ed0d92018-02-12 15:03:36 -0800584 ],
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000585 shared_libs: [
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700586 "libz", // for slicer (using adler32).
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000587 ],
Andreas Gampecb5125d2018-02-20 09:36:54 -0800588 sdk_version: "current",
589 stl: "c++_static",
Paul Duffin4345aac2019-07-17 15:51:54 +0100590 header_libs: [
591 "jni_headers",
Alex Light8fd08562018-02-13 10:09:03 -0800592 // This is needed to resolve the base/ header file in libdexfile. Unfortunately there are
593 // many problems with how we export headers that are making doing this the 'right' way
594 // difficult.
595 // TODO: move those headers to art/ rather than under runtime.
Paul Duffin4345aac2019-07-17 15:51:54 +0100596 "libart_runtime_headers_ndk",
Alex Light8fd08562018-02-13 10:09:03 -0800597 ],
Andreas Gamped0ed0d92018-02-12 15:03:36 -0800598 export_include_dirs: ["ti-agent"],
599}
600
Alex Light8f2c6d42017-04-10 16:27:35 -0700601art_cc_defaults {
Alex Light88659142018-05-15 10:53:06 -0700602 name: "libtistress-srcs",
Alex Light8f2c6d42017-04-10 16:27:35 -0700603 defaults: ["libartagent-defaults"],
604 srcs: [
605 "ti-stress/stress.cc",
606 ],
Alex Light88659142018-05-15 10:53:06 -0700607 header_libs: ["libopenjdkjvmti_headers"],
608}
609
610art_cc_defaults {
611 name: "libtistress-defaults",
612 defaults: ["libtistress-srcs"],
Alex Light8f2c6d42017-04-10 16:27:35 -0700613 shared_libs: [
Andreas Gampe7e057ec2019-03-04 13:11:22 -0800614 "slicer_no_rtti",
Vladimir Markoe8a83af2020-01-29 10:14:44 +0000615 "libz", // for slicer (using adler32).
Alex Light8f2c6d42017-04-10 16:27:35 -0700616 ],
Alex Light8f2c6d42017-04-10 16:27:35 -0700617}
618
619art_cc_test_library {
620 name: "libtistress",
Dan Willemsen2ca27802017-09-27 14:57:43 -0700621 defaults: ["libtistress-defaults"],
Vladimir Markoe8a83af2020-01-29 10:14:44 +0000622 shared_libs: [
623 "libartbase",
624 "libz",
625 ],
Alex Light8f2c6d42017-04-10 16:27:35 -0700626}
627
628art_cc_test_library {
629 name: "libtistressd",
630 defaults: [
Alex Light8f2c6d42017-04-10 16:27:35 -0700631 "art_debug_defaults",
Andreas Gampe5115efb2017-05-24 16:55:54 -0700632 "libtistress-defaults",
Alex Light8f2c6d42017-04-10 16:27:35 -0700633 ],
Vladimir Markoe8a83af2020-01-29 10:14:44 +0000634 shared_libs: [
635 "libartbased",
636 "libz",
637 ],
Alex Light88659142018-05-15 10:53:06 -0700638}
639
640art_cc_defaults {
Vladimir Markoe8a83af2020-01-29 10:14:44 +0000641 name: "libtistress-shared-defaults",
Andreas Gampeec5ed062018-01-26 16:20:02 -0800642 defaults: [
643 "libtistress-srcs",
Alex Light88659142018-05-15 10:53:06 -0700644 ],
Andreas Gampe7e057ec2019-03-04 13:11:22 -0800645 static_libs: ["slicer_no_rtti"],
Alex Light88659142018-05-15 10:53:06 -0700646}
647
648art_cc_test_library {
649 name: "libtistresss",
Vladimir Markoe8a83af2020-01-29 10:14:44 +0000650 defaults: ["libtistress-shared-defaults"],
651 shared_libs: [
652 "libartbase",
653 "libz",
654 ],
Alex Light88659142018-05-15 10:53:06 -0700655}
656
657art_cc_test_library {
658 name: "libtistressds",
659 defaults: [
Vladimir Markoe8a83af2020-01-29 10:14:44 +0000660 "libtistress-shared-defaults",
Alex Light88659142018-05-15 10:53:06 -0700661 ],
Vladimir Markoe8a83af2020-01-29 10:14:44 +0000662 shared_libs: [
663 "libartbased",
664 "libz",
665 ],
Alex Light8f2c6d42017-04-10 16:27:35 -0700666}
667
Colin Crossafd3c9e2016-09-16 13:47:21 -0700668cc_defaults {
669 name: "libarttest-defaults",
670 defaults: [
Martin Stjernholm0d0f8df2021-04-28 16:47:01 +0100671 "art_test_internal_library_defaults",
Andreas Gampe5115efb2017-05-24 16:55:54 -0700672 "art_defaults",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700673 ],
674 srcs: [
Colin Crossafd3c9e2016-09-16 13:47:21 -0700675 "004-JniTest/jni_test.cc",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700676 "004-ReferenceMap/stack_walk_refmap_jni.cc",
Roland Levillainad0777d2018-02-12 20:00:18 +0000677 "004-SignalTest/signaltest.cc",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700678 "004-StackWalk/stack_walk_jni.cc",
679 "004-ThreadStress/thread_stress.cc",
680 "004-UnsafeTest/unsafe_test.cc",
681 "044-proxy/native_proxy.cc",
682 "051-thread/thread_test.cc",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700683 "1337-gc-coverage/gc_coverage.cc",
684 "136-daemon-jni-shutdown/daemon_jni_shutdown.cc",
685 "137-cfi/cfi.cc",
686 "139-register-natives/regnative.cc",
687 "141-class-unload/jni_unload.cc",
688 "148-multithread-gc-annotations/gc_coverage.cc",
689 "149-suspend-all-stress/suspend_all.cc",
Mathieu Chartier72a32892017-01-24 09:40:56 -0800690 "154-gc-loop/heap_interface.cc",
Andreas Gampeaaf0d382017-11-27 14:10:21 -0800691 "167-visit-locks/visit_locks.cc",
Andreas Gampe56776012018-01-26 17:40:55 -0800692 "169-threadgroup-jni/jni_daemon_thread.cc",
Mathieu Chartieradc90862018-05-11 13:03:06 -0700693 "172-app-image-twice/debug_print_class.cc",
Vladimir Marko422a9eb2019-08-01 12:54:07 +0100694 "177-visibly-initialized-deadlock/visibly_initialized.cc",
Vladimir Marko7dac8642019-11-06 17:09:30 +0000695 "178-app-image-native-method/native_methods.cc",
Alex Lighta2efd2a2020-05-19 09:44:49 -0700696 "179-nonvirtual-jni/nonvirtual-call.cc",
Roland Levillainad0777d2018-02-12 20:00:18 +0000697 "1945-proxy-method-arguments/get_args.cc",
Andreas Gampeaaf0d382017-11-27 14:10:21 -0800698 "203-multi-checkpoint/multi_checkpoint.cc",
Alex Lightf4ed7e82018-01-17 11:52:36 -0800699 "305-other-fault-handler/fault_handler.cc",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700700 "454-get-vreg/get_vreg_jni.cc",
701 "457-regs/regs_jni.cc",
702 "461-get-reference-vreg/get_reference_vreg_jni.cc",
703 "466-get-live-vreg/get_live_vreg_jni.cc",
704 "497-inlining-and-class-loader/clear_dex_cache.cc",
705 "543-env-long-ref/env_long_ref.cc",
706 "566-polymorphic-inlining/polymorphic_inline.cc",
707 "570-checker-osr/osr.cc",
708 "595-profile-saving/profile-saving.cc",
709 "596-app-images/app_images.cc",
Hans Boehm6fe97e02016-05-04 18:35:57 -0700710 "596-monitor-inflation/monitor_inflation.cc",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700711 "597-deopt-new-string/deopt.cc",
Alexey Grebenkinbe4c2bd2018-02-01 19:09:59 +0300712 "616-cha-unloading/cha_unload.cc",
Vladimir Markoc5798bf2016-12-09 10:20:54 +0000713 "626-const-class-linking/clear_dex_cache_types.cc",
Nicolas Geoffray13a797b2017-03-15 16:41:31 +0000714 "642-fp-callees/fp_callees.cc",
Vladimir Marko5fdd7782017-04-20 11:26:03 +0100715 "647-jni-get-field-id/get_field_id.cc",
Roland Levillain0d2323e2017-06-26 18:14:39 +0100716 "656-annotation-lookup-generic-jni/test.cc",
Igor Murashkin545412b2017-08-17 15:26:54 -0700717 "661-oat-writer-layout/oat_writer_layout.cc",
718 "664-aget-verifier/aget-verifier.cc",
Vladimir Marko2196c652017-11-30 16:16:07 +0000719 "667-jit-jni-stub/jit_jni_stub_test.cc",
David Brazdil11b67b22018-01-18 16:41:40 +0000720 "674-hiddenapi/hiddenapi.cc",
David Brazdil331a5e12019-04-01 22:46:16 +0000721 "692-vdex-inmem-loader/vdex_inmem_loader.cc",
Dan Willemsen2ca27802017-09-27 14:57:43 -0700722 "708-jit-cache-churn/jit.cc",
Nicolas Geoffrayfa595882019-08-06 17:40:09 +0100723 "720-thread-priority/thread_priority.cc",
Alexey Grebenkince750492018-05-31 23:42:20 +0300724 "800-smali/jni.cc",
Nicolas Geoffrayaf61f502021-03-31 16:03:50 +0000725 "817-hiddenapi/test_native.cc",
Alex Lightf889c702018-02-23 15:25:45 -0800726 "909-attach-agent/disallow_debugging.cc",
Mathieu Chartier00fbe4f2019-01-02 16:52:38 -0800727 "1001-app-image-regions/app_image_regions.cc",
Mathieu Chartier175ce3d2019-03-06 16:54:24 -0800728 "1002-notify-startup/startup_interface.cc",
Alex Lighte34fe442018-02-21 17:35:55 -0800729 "1947-breakpoint-redefine-deopt/check_deopt.cc",
Alex Lightf3677472019-06-26 16:31:53 -0700730 "1972-jni-id-swap-indices/jni_id.cc",
Alex Light55eccdf2019-10-07 13:51:13 +0000731 "1985-structural-redefine-stack-scope/stack_scope.cc",
Nicolas Geoffraye91e7952020-01-23 10:15:56 +0000732 "2011-stack-walk-concurrent-instrument/stack_walk_concurrent.cc",
Alex Light280e6c32020-03-03 13:52:07 -0800733 "2031-zygote-compiled-frame-deopt/native-wait.cc",
Hans Boehm672295a2020-04-16 21:31:17 -0700734 "2033-shutdown-mechanics/native_shutdown.cc",
Orion Hodson7285a4b2020-07-10 13:31:35 +0100735 "2036-jni-filechannel/jni_filechannel.cc",
Alex Light8d9c6042020-09-22 15:35:59 -0700736 "2037-thread-name-inherit/thread_name_inherit.cc",
Roland Levillainad0777d2018-02-12 20:00:18 +0000737 "common/runtime_state.cc",
738 "common/stack_inspect.cc",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700739 ],
740 shared_libs: [
741 "libbacktrace",
Andreas Gampe3fec9ac2016-09-13 10:47:28 -0700742 "libbase",
Orion Hodsonfcc922a2021-05-21 11:32:33 +0100743 "liblog",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700744 "libnativehelper",
745 ],
Colin Crossafd3c9e2016-09-16 13:47:21 -0700746}
747
Paul Duffin2506eff2020-04-07 11:32:24 +0100748java_library {
Sasha Smundakc7c5d532019-02-27 15:03:37 -0800749 name: "art_cts_jvmti_test_library",
Martin Stjernholmb4abe0a2019-05-17 19:22:55 +0100750 visibility: [
Paul Duffincc9df4f2020-08-13 14:57:41 +0100751 "//art:__subpackages__",
Martin Stjernholmb4abe0a2019-05-17 19:22:55 +0100752 "//cts/hostsidetests/jvmti:__subpackages__",
753 ],
Sasha Smundakc7c5d532019-02-27 15:03:37 -0800754 srcs: [
755 // shim classes. We use one that exposes the common functionality.
Alex Light23ca8fb2019-05-10 11:27:02 -0700756 "jvmti-common/Redefinition.java",
757 "jvmti-common/Main.java",
758 "jvmti-common/Trace.java",
759 "jvmti-common/Breakpoint.java",
760 "jvmti-common/Suspension.java",
761 "jvmti-common/Locals.java",
762 "jvmti-common/StackTrace.java",
763 "jvmti-common/FramePop.java",
764 "jvmti-common/Exceptions.java",
765 "jvmti-common/Monitors.java",
Alex Lightfe0ce642020-01-07 13:14:18 -0800766 "jvmti-common/NonStandardExit.java",
Alex Light23ca8fb2019-05-10 11:27:02 -0700767 "jvmti-common/Threads.java",
768 "jvmti-common/SuspendEvents.java",
Sasha Smundakc7c5d532019-02-27 15:03:37 -0800769
770 // Actual test classes.
771 "901-hello-ti-agent/src/art/Test901.java",
772 "902-hello-transformation/src/art/Test902.java",
773 "903-hello-tagging/src/art/Test903.java",
774 "904-object-allocation/src/art/Test904.java",
775 "905-object-free/src/art/Test905.java",
776 "906-iterate-heap/src/art/Test906.java",
777 "907-get-loaded-classes/src/art/Test907.java",
778 "907-get-loaded-classes/src/art/Cerr.java",
779 "908-gc-start-finish/src/art/Test908.java",
780 "910-methods/src/art/Test910.java",
781 "911-get-stack-trace/src/art/Test911.java",
782 "911-get-stack-trace/src/art/AllTraces.java",
783 "911-get-stack-trace/src/art/ControlData.java",
784 "911-get-stack-trace/src/art/Frames.java",
785 "911-get-stack-trace/src/art/OtherThread.java",
786 "911-get-stack-trace/src/art/PrintThread.java",
787 "911-get-stack-trace/src/art/Recurse.java",
788 "911-get-stack-trace/src/art/SameThread.java",
789 "911-get-stack-trace/src/art/ThreadListTraces.java",
790 "912-classes/src-art/art/Test912.java",
791 "912-classes/src-art/art/DexData.java",
792 "913-heaps/src/art/Test913.java",
793 "914-hello-obsolescence/src/art/Test914.java",
794 "915-obsolete-2/src/art/Test915.java",
795 "917-fields-transformation/src/art/Test917.java",
796 "918-fields/src/art/Test918.java",
797 "919-obsolete-fields/src/art/Test919.java",
798 "920-objects/src/art/Test920.java",
799 "922-properties/src/art/Test922.java",
800 "923-monitors/src/art/Test923.java",
801 "924-threads/src/art/Test924.java",
802 "925-threadgroups/src/art/Test925.java",
803 "926-multi-obsolescence/src/art/Test926.java",
804 "927-timers/src/art/Test927.java",
805 "928-jni-table/src/art/Test928.java",
806 "930-hello-retransform/src/art/Test930.java",
807 "931-agent-thread/src/art/Test931.java",
808 "932-transform-saves/src/art/Test932.java",
809 "933-misc-events/src/art/Test933.java",
810 "940-recursive-obsolete/src/art/Test940.java",
811 "942-private-recursive/src/art/Test942.java",
812 "944-transform-classloaders/src/art/Test944.java",
813 "945-obsolete-native/src/art/Test945.java",
814 "947-reflect-method/src/art/Test947.java",
815 "951-threaded-obsolete/src/art/Test951.java",
816 "982-ok-no-retransform/src/art/Test982.java",
817 "983-source-transform-verify/src/art/Test983.java",
818 "984-obsolete-invoke/src/art/Test984.java",
819 "985-re-obsolete/src/art/Test985.java",
820 "986-native-method-bind/src/art/Test986.java",
821 "988-method-trace/src/art/Test988.java",
822 "988-method-trace/src/art/Test988Intrinsics.java",
823 "989-method-trace-throw/src/art/Test989.java",
824 "990-field-trace/src/art/Test990.java",
825 "991-field-trace-2/src/art/Test991.java",
826 "992-source-data/src/art/Test992.java",
827 "992-source-data/src/art/Target2.java",
828 "993-breakpoints/src/art/Test993.java",
829 "994-breakpoint-line/src/art/Test994.java",
830 "995-breakpoints-throw/src/art/Test995.java",
831 "996-breakpoint-obsolete/src/art/Test996.java",
832 "997-single-step/src/art/Test997.java",
833 "1900-track-alloc/src/art/Test1900.java",
834 "1901-get-bytecodes/src/art/Test1901.java",
835 "1902-suspend/src/art/Test1902.java",
836 "1903-suspend-self/src/art/Test1903.java",
837 "1904-double-suspend/src/art/Test1904.java",
838 "1906-suspend-list-me-first/src/art/Test1906.java",
839 "1907-suspend-list-self-twice/src/art/Test1907.java",
840 "1908-suspend-native-resume-self/src/art/Test1908.java",
841 "1909-per-agent-tls/src/art/Test1909.java",
842 "1910-transform-with-default/src/art/Test1910.java",
843 "1911-get-local-var-table/src/art/Test1911.java",
844 "1912-get-set-local-primitive/src/art/Test1912.java",
845 "1913-get-set-local-objects/src/art/Test1913.java",
846 "1914-get-local-instance/src/art/Test1914.java",
847 "1915-get-set-local-current-thread/src/art/Test1915.java",
848 "1916-get-set-current-frame/src/art/Test1916.java",
849 "1917-get-stack-frame/src/art/Test1917.java",
850 "1920-suspend-native-monitor/src/art/Test1920.java",
851 "1921-suspend-native-recursive-monitor/src/art/Test1921.java",
852 "1922-owned-monitors-info/src/art/Test1922.java",
853 "1923-frame-pop/src/art/Test1923.java",
854 "1924-frame-pop-toggle/src/art/Test1924.java",
855 "1925-self-frame-pop/src/art/Test1925.java",
856 "1926-missed-frame-pop/src/art/Test1926.java",
857 "1927-exception-event/src/art/Test1927.java",
858 "1928-exception-event-exception/src/art/Test1928.java",
859 "1930-monitor-info/src/art/Test1930.java",
860 "1931-monitor-events/src/art/Test1931.java",
861 "1932-monitor-events-misc/src/art/Test1932.java",
862 "1933-monitor-current-contended/src/art/Test1933.java",
863 "1934-jvmti-signal-thread/src/art/Test1934.java",
864 "1936-thread-end-events/src/art/Test1936.java",
865 "1937-transform-soft-fail/src/art/Test1937.java",
866 "1939-proxy-frames/src/art/Test1939.java",
867 "1941-dispose-stress/src/art/Test1941.java",
868 "1942-suspend-raw-monitor-exit/src/art/Test1942.java",
869 "1943-suspend-raw-monitor-wait/src/art/Test1943.java",
870 "1953-pop-frame/src/art/Test1953.java",
871 "1958-transform-try-jit/src/art/Test1958.java",
Alex Light40607862019-05-06 18:16:24 +0000872 "1962-multi-thread-events/src/art/Test1962.java",
Alex Lightfe0ce642020-01-07 13:14:18 -0800873 "1963-add-to-dex-classloader-in-memory/src/art/Test1963.java",
874 "1967-get-set-local-bad-slot/src/art/Test1967.java",
875 "1968-force-early-return/src/art/Test1968.java",
876 "1969-force-early-return-void/src/art/Test1969.java",
877 "1970-force-early-return-long/src/art/Test1970.java",
878 "1971-multi-force-early-return/src/art/Test1971.java",
879 "1974-resize-array/src/art/Test1974.java",
880 "1975-hello-structural-transformation/src/art/Test1975.java",
881 "1975-hello-structural-transformation/src/art/Transform1975.java",
882 "1976-hello-structural-static-methods/src/art/Test1976.java",
883 "1976-hello-structural-static-methods/src/art/Transform1976.java",
884 "1977-hello-structural-obsolescence/src/art/Test1977.java",
885 "1978-regular-obsolete-then-structural-obsolescence/src/art/Test1978.java",
886 "1979-threaded-structural-transformation/src/art/Test1979.java",
887 "1981-structural-redef-private-method-handles/src/art/Test1981.java",
888 // TODO Requires VarHandles to be un-@hide. See b/64382372
889 // "1981-structural-redef-private-method-handles/src/art/Test1981_Varhandles.java",
890 "1982-no-virtuals-structural-redefinition/src/art/Test1982.java",
891 "1983-structural-redefinition-failures/src/art/Test1983.java",
892 "1984-structural-redefine-field-trace/src/art/Test1984.java",
893 "1988-multi-structural-redefine/src/art/Test1988.java",
894 "1989-transform-bad-monitor/src/art/Test1989.java",
895 "1990-structural-bad-verify/src/art/Test1990.java",
896 "1991-hello-structural-retransform/src/art/Test1991.java",
897 "1992-retransform-no-such-field/src/art/Test1992.java",
898 "1994-final-virtual-structural/src/art/Test1994.java",
899 "1995-final-virtual-structural-multithread/src/art/Test1995.java",
900 "1996-final-override-virtual-structural/src/art/Test1996.java",
901 "1997-structural-shadow-method/src/art/Test1997.java",
902 "1998-structural-shadow-field/src/art/Test1998.java",
903 "1999-virtual-structural/src/art/Test1999.java",
904 "2001-virtual-structural-multithread/src-art/art/Test2001.java",
905 "2002-virtual-structural-initializing/src-art/art/Test2002.java",
906 "2003-double-virtual-structural/src/art/Test2003.java",
907 "2004-double-virtual-structural-abstract/src/art/Test2004.java",
908 "2005-pause-all-redefine-multithreaded/src/art/Test2005.java",
909 "2006-virtual-structural-finalizing/src-art/art/Test2006.java",
910 "2007-virtual-structural-finalizable/src-art/art/Test2007.java",
Sasha Smundakc7c5d532019-02-27 15:03:37 -0800911 ],
Paul Duffin463d03e2020-10-21 21:38:58 +0100912 sdk_version: "core_platform",
Sasha Smundakc7c5d532019-02-27 15:03:37 -0800913}
914
915// CTS test runner in cts/hostsidetests/jvmti looks for an expected test
916// result for the test NN in the file results.NN.expected.txt while in the
Roland Levillaina073f462020-10-28 12:48:24 +0000917// source tree each expected test result is in the NN-xxxx/expected-stdout.txt.
Sasha Smundakc7c5d532019-02-27 15:03:37 -0800918// Copy+rename them them to a temporary directory and them zip them.
919java_genrule {
Paul Duffine5621f52020-03-25 10:51:14 +0000920 name: "expected_cts_outputs_gen",
Sasha Smundakc7c5d532019-02-27 15:03:37 -0800921 srcs: [
Roland Levillaina073f462020-10-28 12:48:24 +0000922 "901-hello-ti-agent/expected-stdout.txt",
923 "902-hello-transformation/expected-stdout.txt",
924 "903-hello-tagging/expected-stdout.txt",
925 "904-object-allocation/expected-stdout.txt",
926 "905-object-free/expected-stdout.txt",
927 "906-iterate-heap/expected-stdout.txt",
928 "907-get-loaded-classes/expected-stdout.txt",
929 "908-gc-start-finish/expected-stdout.txt",
930 "910-methods/expected-stdout.txt",
Alex Light4681f202020-01-10 09:27:57 -0800931 "911-get-stack-trace/expected-cts-version.txt",
Roland Levillaina073f462020-10-28 12:48:24 +0000932 "912-classes/expected-stdout.txt",
933 "913-heaps/expected-stdout.txt",
934 "914-hello-obsolescence/expected-stdout.txt",
935 "915-obsolete-2/expected-stdout.txt",
936 "917-fields-transformation/expected-stdout.txt",
937 "918-fields/expected-stdout.txt",
938 "919-obsolete-fields/expected-stdout.txt",
939 "920-objects/expected-stdout.txt",
940 "922-properties/expected-stdout.txt",
941 "923-monitors/expected-stdout.txt",
942 "924-threads/expected-stdout.txt",
943 "925-threadgroups/expected-stdout.txt",
944 "926-multi-obsolescence/expected-stdout.txt",
945 "927-timers/expected-stdout.txt",
946 "928-jni-table/expected-stdout.txt",
947 "930-hello-retransform/expected-stdout.txt",
948 "931-agent-thread/expected-stdout.txt",
949 "932-transform-saves/expected-stdout.txt",
950 "933-misc-events/expected-stdout.txt",
951 "940-recursive-obsolete/expected-stdout.txt",
952 "942-private-recursive/expected-stdout.txt",
953 "944-transform-classloaders/expected-stdout.txt",
954 "945-obsolete-native/expected-stdout.txt",
955 "947-reflect-method/expected-stdout.txt",
956 "951-threaded-obsolete/expected-stdout.txt",
957 "982-ok-no-retransform/expected-stdout.txt",
958 "983-source-transform-verify/expected-stdout.txt",
959 "984-obsolete-invoke/expected-stdout.txt",
960 "985-re-obsolete/expected-stdout.txt",
961 "986-native-method-bind/expected-stdout.txt",
962 "988-method-trace/expected-stdout.txt",
963 "989-method-trace-throw/expected-stdout.txt",
964 "990-field-trace/expected-stdout.txt",
965 "991-field-trace-2/expected-stdout.txt",
966 "992-source-data/expected-stdout.txt",
Alex Light2b8d3c82020-11-03 11:52:40 -0800967 // Need to avoid using hidden-apis
968 "993-breakpoints/expected_cts.txt",
Roland Levillaina073f462020-10-28 12:48:24 +0000969 "994-breakpoint-line/expected-stdout.txt",
970 "995-breakpoints-throw/expected-stdout.txt",
971 "996-breakpoint-obsolete/expected-stdout.txt",
972 "997-single-step/expected-stdout.txt",
973 "1900-track-alloc/expected-stdout.txt",
974 "1901-get-bytecodes/expected-stdout.txt",
975 "1902-suspend/expected-stdout.txt",
976 "1903-suspend-self/expected-stdout.txt",
977 "1904-double-suspend/expected-stdout.txt",
978 "1906-suspend-list-me-first/expected-stdout.txt",
979 "1907-suspend-list-self-twice/expected-stdout.txt",
980 "1908-suspend-native-resume-self/expected-stdout.txt",
981 "1909-per-agent-tls/expected-stdout.txt",
982 "1910-transform-with-default/expected-stdout.txt",
983 "1911-get-local-var-table/expected-stdout.txt",
984 "1912-get-set-local-primitive/expected-stdout.txt",
985 "1913-get-set-local-objects/expected-stdout.txt",
986 "1914-get-local-instance/expected-stdout.txt",
987 "1915-get-set-local-current-thread/expected-stdout.txt",
988 "1916-get-set-current-frame/expected-stdout.txt",
989 "1917-get-stack-frame/expected-stdout.txt",
990 "1920-suspend-native-monitor/expected-stdout.txt",
991 "1921-suspend-native-recursive-monitor/expected-stdout.txt",
992 "1922-owned-monitors-info/expected-stdout.txt",
993 "1923-frame-pop/expected-stdout.txt",
994 "1924-frame-pop-toggle/expected-stdout.txt",
995 "1925-self-frame-pop/expected-stdout.txt",
996 "1926-missed-frame-pop/expected-stdout.txt",
997 "1927-exception-event/expected-stdout.txt",
998 "1928-exception-event-exception/expected-stdout.txt",
999 "1930-monitor-info/expected-stdout.txt",
1000 "1931-monitor-events/expected-stdout.txt",
1001 "1932-monitor-events-misc/expected-stdout.txt",
1002 "1933-monitor-current-contended/expected-stdout.txt",
1003 "1934-jvmti-signal-thread/expected-stdout.txt",
1004 "1936-thread-end-events/expected-stdout.txt",
1005 "1937-transform-soft-fail/expected-stdout.txt",
1006 "1939-proxy-frames/expected-stdout.txt",
1007 "1941-dispose-stress/expected-stdout.txt",
1008 "1942-suspend-raw-monitor-exit/expected-stdout.txt",
1009 "1943-suspend-raw-monitor-wait/expected-stdout.txt",
1010 "1953-pop-frame/expected-stdout.txt",
1011 "1958-transform-try-jit/expected-stdout.txt",
1012 "1962-multi-thread-events/expected-stdout.txt",
1013 "1963-add-to-dex-classloader-in-memory/expected-stdout.txt",
1014 "1967-get-set-local-bad-slot/expected-stdout.txt",
1015 "1968-force-early-return/expected-stdout.txt",
1016 "1969-force-early-return-void/expected-stdout.txt",
1017 "1970-force-early-return-long/expected-stdout.txt",
1018 "1971-multi-force-early-return/expected-stdout.txt",
1019 "1974-resize-array/expected-stdout.txt",
1020 "1975-hello-structural-transformation/expected-stdout.txt",
1021 "1976-hello-structural-static-methods/expected-stdout.txt",
1022 "1977-hello-structural-obsolescence/expected-stdout.txt",
1023 "1978-regular-obsolete-then-structural-obsolescence/expected-stdout.txt",
1024 "1979-threaded-structural-transformation/expected-stdout.txt",
Alex Lightfe0ce642020-01-07 13:14:18 -08001025 // TODO Requires VarHandles to be un-@hide. See b/64382372
Roland Levillaina073f462020-10-28 12:48:24 +00001026 // "test/1981-structural-redef-private-method-handles/expected-stdout.txt",
Alex Lightfe0ce642020-01-07 13:14:18 -08001027 "1981-structural-redef-private-method-handles/expected_no_mh.txt",
Roland Levillaina073f462020-10-28 12:48:24 +00001028 "1982-no-virtuals-structural-redefinition/expected-stdout.txt",
Alex Light5c7f3672020-01-27 15:23:30 -08001029 // JNI-id use can change the outcome of this test on device.
1030 "1983-structural-redefinition-failures/expected-cts.txt",
Roland Levillaina073f462020-10-28 12:48:24 +00001031 "1984-structural-redefine-field-trace/expected-stdout.txt",
1032 "1988-multi-structural-redefine/expected-stdout.txt",
1033 "1989-transform-bad-monitor/expected-stdout.txt",
1034 "1990-structural-bad-verify/expected-stdout.txt",
1035 "1991-hello-structural-retransform/expected-stdout.txt",
1036 "1992-retransform-no-such-field/expected-stdout.txt",
1037 "1994-final-virtual-structural/expected-stdout.txt",
1038 "1995-final-virtual-structural-multithread/expected-stdout.txt",
1039 "1996-final-override-virtual-structural/expected-stdout.txt",
1040 "1997-structural-shadow-method/expected-stdout.txt",
1041 "1998-structural-shadow-field/expected-stdout.txt",
1042 "1999-virtual-structural/expected-stdout.txt",
1043 "2001-virtual-structural-multithread/expected-stdout.txt",
1044 "2002-virtual-structural-initializing/expected-stdout.txt",
1045 "2003-double-virtual-structural/expected-stdout.txt",
1046 "2004-double-virtual-structural-abstract/expected-stdout.txt",
1047 "2005-pause-all-redefine-multithreaded/expected-stdout.txt",
1048 "2006-virtual-structural-finalizing/expected-stdout.txt",
1049 "2007-virtual-structural-finalizable/expected-stdout.txt",
Sasha Smundakc7c5d532019-02-27 15:03:37 -08001050 ],
1051 out: ["expected_cts_outputs.jar"],
1052 tools: ["soong_zip"],
1053 cmd: "rm -rf $(genDir)/res && mkdir -p $(genDir)/res && " +
1054 "for f in $(in); do x=$${f#art/test/}; " +
1055 "cp $$f $(genDir)/res/results.$${x%%-*}.expected.txt; done && " +
1056 "$(location soong_zip) -o $(out) -C $(genDir)/res -D $(genDir)/res",
1057}
David Srbecky8c8f1482020-02-05 20:17:10 +00001058
Paul Duffine5621f52020-03-25 10:51:14 +00001059// Wrap the expected_cts_outputs_gen inside a java library to make it easy
1060// to export as a member of a module_exports.
1061java_library {
1062 name: "expected_cts_outputs",
1063 visibility: [
1064 "//art/build/sdk",
1065 "//cts/hostsidetests/jvmti:__subpackages__",
1066 ],
1067 static_libs: [
1068 "expected_cts_outputs_gen",
1069 ],
1070 sdk_version: "core_current",
1071}
1072
David Srbeckyee257162020-02-28 15:50:13 +00001073art_cc_test {
David Srbeckyf61e0612020-08-14 16:13:35 +01001074 name: "ArtGtestsTargetInstallApex",
Martin Stjernholm90b26612021-03-03 09:49:27 +00001075 defaults: [
1076 // Enable only in source builds, where com.android.art.testing is
1077 // available.
1078 "art_module_source_build_defaults",
1079 ],
David Srbeckyee257162020-02-28 15:50:13 +00001080 data: [
1081 // We need the ART testing apex, which contains all gtest binaries.
David Srbeckyf61e0612020-08-14 16:13:35 +01001082 // Note that due to build system and linker constraints the gtests must be in the apex.
David Srbeckyee257162020-02-28 15:50:13 +00001083 ":com.android.art.testing",
David Srbeckyee257162020-02-28 15:50:13 +00001084 ],
David Srbeckyf61e0612020-08-14 16:13:35 +01001085 // It seems that only device-tests build can create a valid apex.
Roland Levillain423aefc2020-09-01 18:42:22 +01001086 test_suites: [
1087 "device-tests",
Kimberly Kreider284e8b02020-12-15 09:40:30 -08001088 "mts-art",
Roland Levillain423aefc2020-09-01 18:42:22 +01001089 ],
David Srbeckyf61e0612020-08-14 16:13:35 +01001090 test_config: "art-gtests-target-install-apex.xml",
Roland Levillain423aefc2020-09-01 18:42:22 +01001091
1092 // Support multilib variants (using different suffix per sub-architecture), which is needed on
1093 // build targets with secondary architectures, as the MTS test suite packaging logic flattens
1094 // all test artifacts into a single `testcases` directory.
1095 compile_multilib: "both",
1096 multilib: {
1097 lib32: {
1098 suffix: "32",
1099 },
1100 lib64: {
1101 suffix: "64",
1102 },
1103 },
Martin Stjernholmd3e9ff32021-03-16 00:44:25 +00001104 test_for: [
1105 "com.android.art",
1106 "com.android.art.debug",
1107 ],
David Srbeckyf61e0612020-08-14 16:13:35 +01001108}
1109
1110art_cc_test {
1111 name: "ArtGtestsTargetChroot",
Martin Stjernholm90b26612021-03-03 09:49:27 +00001112 defaults: [
1113 // Enable only in source builds, where com.android.art.testing is
1114 // available.
1115 "art_module_source_build_defaults",
1116 ],
David Srbeckyf61e0612020-08-14 16:13:35 +01001117 data: [
1118 // We need the ART testing apex, which contains all gtest binaries.
1119 // Note that due to build system and linker constraints the gtests must be in the apex.
1120 ":com.android.art.testing",
1121 ],
1122 test_suites: ["general-tests"],
1123 test_config: "art-gtests-target-chroot.xml",
Martin Stjernholmd3e9ff32021-03-16 00:44:25 +00001124 test_for: [
1125 "com.android.art",
1126 "com.android.art.debug",
1127 ],
David Srbeckyee257162020-02-28 15:50:13 +00001128}
1129
David Srbecky8c8f1482020-02-05 20:17:10 +00001130filegroup {
1131 name: "art-gtest-jars",
1132 srcs: [
1133 ":art-gtest-jars-AbstractMethod",
1134 ":art-gtest-jars-AllFields",
1135 ":art-gtest-jars-DefaultMethods",
1136 ":art-gtest-jars-DexToDexDecompiler",
1137 ":art-gtest-jars-ErroneousA",
1138 ":art-gtest-jars-ErroneousB",
1139 ":art-gtest-jars-ErroneousInit",
Vladimir Markofdd46842020-03-25 14:57:17 +00001140 ":art-gtest-jars-Extension1",
1141 ":art-gtest-jars-Extension2",
David Srbecky8c8f1482020-02-05 20:17:10 +00001142 ":art-gtest-jars-ForClassLoaderA",
1143 ":art-gtest-jars-ForClassLoaderB",
1144 ":art-gtest-jars-ForClassLoaderC",
1145 ":art-gtest-jars-ForClassLoaderD",
1146 ":art-gtest-jars-ExceptionHandle",
1147 ":art-gtest-jars-GetMethodSignature",
1148 ":art-gtest-jars-HiddenApi",
1149 ":art-gtest-jars-HiddenApiSignatures",
1150 ":art-gtest-jars-HiddenApiStubs",
1151 ":art-gtest-jars-ImageLayoutA",
1152 ":art-gtest-jars-ImageLayoutB",
1153 ":art-gtest-jars-IMTA",
1154 ":art-gtest-jars-IMTB",
1155 ":art-gtest-jars-Instrumentation",
1156 ":art-gtest-jars-Interfaces",
1157 ":art-gtest-jars-Lookup",
1158 ":art-gtest-jars-Main",
1159 ":art-gtest-jars-ManyMethods",
1160 ":art-gtest-jars-MethodTypes",
1161 ":art-gtest-jars-MultiDex",
1162 ":art-gtest-jars-MultiDexModifiedSecondary",
1163 ":art-gtest-jars-MyClass",
1164 ":art-gtest-jars-MyClassNatives",
1165 ":art-gtest-jars-Nested",
1166 ":art-gtest-jars-NonStaticLeafMethods",
1167 ":art-gtest-jars-Packages",
1168 ":art-gtest-jars-ProtoCompare",
1169 ":art-gtest-jars-ProtoCompare2",
1170 ":art-gtest-jars-ProfileTestMultiDex",
1171 ":art-gtest-jars-StaticLeafMethods",
1172 ":art-gtest-jars-Statics",
1173 ":art-gtest-jars-StaticsFromCode",
1174 ":art-gtest-jars-StringLiterals",
1175 ":art-gtest-jars-Transaction",
1176 ":art-gtest-jars-XandY",
1177 ":art-gtest-jars-MainEmptyUncompressed",
1178 ":art-gtest-jars-MainEmptyUncompressedAligned",
1179 ":art-gtest-jars-MainStripped",
1180 ":art-gtest-jars-MainUncompressedAligned",
1181 ":art-gtest-jars-MultiDexUncompressedAligned",
1182 ":art-gtest-jars-VerifierDeps",
1183 ":art-gtest-jars-VerifierDepsMulti",
1184 ":art-gtest-jars-VerifySoftFailDuringClinit",
1185 ],
1186}
1187
1188java_defaults {
1189 name: "art-gtest-jars-defaults",
1190 installable: true,
1191 dex_preopt: {
1192 enabled: false,
1193 },
1194 sdk_version: "core_platform",
David Srbecky4a88a5a2020-05-05 16:21:57 +01001195 uncompress_dex: false,
David Srbecky8c8f1482020-02-05 20:17:10 +00001196}
1197
1198// The following modules are just trivial compilations (non-trivial cases are the end).
1199
1200java_library {
1201 name: "art-gtest-jars-AbstractMethod",
1202 srcs: ["AbstractMethod/**/*.java"],
1203 defaults: ["art-gtest-jars-defaults"],
1204}
1205
1206java_library {
1207 name: "art-gtest-jars-AllFields",
1208 srcs: ["AllFields/**/*.java"],
1209 defaults: ["art-gtest-jars-defaults"],
1210}
1211
1212java_library {
1213 name: "art-gtest-jars-DefaultMethods",
1214 srcs: ["DefaultMethods/**/*.java"],
1215 defaults: ["art-gtest-jars-defaults"],
1216}
1217
1218java_library {
1219 name: "art-gtest-jars-DexToDexDecompiler",
1220 srcs: ["DexToDexDecompiler/**/*.java"],
1221 defaults: ["art-gtest-jars-defaults"],
1222}
1223
1224java_library {
1225 name: "art-gtest-jars-ErroneousA",
1226 srcs: ["ErroneousA/**/*.java"],
1227 defaults: ["art-gtest-jars-defaults"],
1228}
1229
1230java_library {
1231 name: "art-gtest-jars-ErroneousB",
1232 srcs: ["ErroneousB/**/*.java"],
1233 defaults: ["art-gtest-jars-defaults"],
1234}
1235
1236java_library {
1237 name: "art-gtest-jars-ErroneousInit",
1238 srcs: ["ErroneousInit/**/*.java"],
1239 defaults: ["art-gtest-jars-defaults"],
1240}
1241
1242java_library {
Vladimir Markofdd46842020-03-25 14:57:17 +00001243 name: "art-gtest-jars-Extension1",
1244 srcs: ["Extension1/**/*.java"],
1245 defaults: ["art-gtest-jars-defaults"],
1246}
1247
1248java_library {
1249 name: "art-gtest-jars-Extension2",
1250 srcs: ["Extension2/**/*.java"],
1251 defaults: ["art-gtest-jars-defaults"],
1252}
1253
1254java_library {
David Srbecky8c8f1482020-02-05 20:17:10 +00001255 name: "art-gtest-jars-ForClassLoaderA",
1256 srcs: ["ForClassLoaderA/**/*.java"],
1257 defaults: ["art-gtest-jars-defaults"],
1258}
1259
1260java_library {
1261 name: "art-gtest-jars-ForClassLoaderB",
1262 srcs: ["ForClassLoaderB/**/*.java"],
1263 defaults: ["art-gtest-jars-defaults"],
1264}
1265
1266java_library {
1267 name: "art-gtest-jars-ForClassLoaderC",
1268 srcs: ["ForClassLoaderC/**/*.java"],
1269 defaults: ["art-gtest-jars-defaults"],
1270}
1271
1272java_library {
1273 name: "art-gtest-jars-ForClassLoaderD",
1274 srcs: ["ForClassLoaderD/**/*.java"],
1275 defaults: ["art-gtest-jars-defaults"],
1276}
1277
1278java_library {
1279 name: "art-gtest-jars-ExceptionHandle",
1280 srcs: ["ExceptionHandle/**/*.java"],
1281 defaults: ["art-gtest-jars-defaults"],
1282}
1283
1284java_library {
1285 name: "art-gtest-jars-GetMethodSignature",
1286 srcs: ["GetMethodSignature/**/*.java"],
1287 defaults: ["art-gtest-jars-defaults"],
1288}
1289
1290java_library {
1291 name: "art-gtest-jars-HiddenApi",
1292 srcs: ["HiddenApi/**/*.java"],
1293 defaults: ["art-gtest-jars-defaults"],
1294}
1295
1296java_library {
1297 name: "art-gtest-jars-HiddenApiSignatures",
1298 srcs: ["HiddenApiSignatures/**/*.java"],
1299 defaults: ["art-gtest-jars-defaults"],
1300}
1301
1302java_library {
1303 name: "art-gtest-jars-HiddenApiStubs",
1304 srcs: ["HiddenApiStubs/**/*.java"],
1305 defaults: ["art-gtest-jars-defaults"],
1306}
1307
1308java_library {
1309 name: "art-gtest-jars-ImageLayoutA",
1310 srcs: ["ImageLayoutA/**/*.java"],
1311 defaults: ["art-gtest-jars-defaults"],
1312}
1313
1314java_library {
1315 name: "art-gtest-jars-ImageLayoutB",
1316 srcs: ["ImageLayoutB/**/*.java"],
1317 defaults: ["art-gtest-jars-defaults"],
1318}
1319
1320java_library {
1321 name: "art-gtest-jars-IMTA",
1322 srcs: ["IMTA/**/*.java"],
1323 defaults: ["art-gtest-jars-defaults"],
1324}
1325
1326java_library {
1327 name: "art-gtest-jars-IMTB",
1328 srcs: ["IMTB/**/*.java"],
1329 defaults: ["art-gtest-jars-defaults"],
1330}
1331
1332java_library {
1333 name: "art-gtest-jars-Instrumentation",
1334 srcs: ["Instrumentation/**/*.java"],
1335 defaults: ["art-gtest-jars-defaults"],
1336}
1337
1338java_library {
1339 name: "art-gtest-jars-Interfaces",
1340 srcs: ["Interfaces/**/*.java"],
1341 defaults: ["art-gtest-jars-defaults"],
1342}
1343
1344java_library {
1345 name: "art-gtest-jars-Lookup",
1346 srcs: ["Lookup/**/*.java"],
1347 defaults: ["art-gtest-jars-defaults"],
1348}
1349
1350java_library {
1351 name: "art-gtest-jars-Main",
1352 srcs: ["Main/**/*.java"],
1353 defaults: ["art-gtest-jars-defaults"],
1354}
1355
1356java_library {
1357 name: "art-gtest-jars-ManyMethods",
1358 srcs: ["ManyMethods/**/*.java"],
1359 defaults: ["art-gtest-jars-defaults"],
1360}
1361
1362java_library {
1363 name: "art-gtest-jars-MethodTypes",
1364 srcs: ["MethodTypes/**/*.java"],
1365 defaults: ["art-gtest-jars-defaults"],
1366}
1367
1368java_library {
1369 name: "art-gtest-jars-MyClass",
1370 srcs: ["MyClass/**/*.java"],
1371 defaults: ["art-gtest-jars-defaults"],
1372}
1373
1374java_library {
1375 name: "art-gtest-jars-MyClassNatives",
1376 srcs: ["MyClassNatives/**/*.java"],
1377 defaults: ["art-gtest-jars-defaults"],
1378}
1379
1380java_library {
1381 name: "art-gtest-jars-Nested",
1382 srcs: ["Nested/**/*.java"],
1383 defaults: ["art-gtest-jars-defaults"],
1384}
1385
1386java_library {
1387 name: "art-gtest-jars-NonStaticLeafMethods",
1388 srcs: ["NonStaticLeafMethods/**/*.java"],
1389 defaults: ["art-gtest-jars-defaults"],
1390}
1391
1392java_library {
1393 name: "art-gtest-jars-Packages",
1394 srcs: ["Packages/**/*.java"],
1395 defaults: ["art-gtest-jars-defaults"],
1396}
1397
1398java_library {
1399 name: "art-gtest-jars-ProtoCompare",
1400 srcs: ["ProtoCompare/**/*.java"],
1401 defaults: ["art-gtest-jars-defaults"],
1402}
1403
1404java_library {
1405 name: "art-gtest-jars-ProtoCompare2",
1406 srcs: ["ProtoCompare2/**/*.java"],
1407 defaults: ["art-gtest-jars-defaults"],
1408}
1409
1410java_library {
1411 name: "art-gtest-jars-StaticLeafMethods",
1412 srcs: ["StaticLeafMethods/**/*.java"],
1413 defaults: ["art-gtest-jars-defaults"],
1414}
1415
1416java_library {
1417 name: "art-gtest-jars-Statics",
1418 srcs: ["Statics/**/*.java"],
1419 defaults: ["art-gtest-jars-defaults"],
1420}
1421
1422java_library {
1423 name: "art-gtest-jars-StaticsFromCode",
1424 srcs: ["StaticsFromCode/**/*.java"],
1425 defaults: ["art-gtest-jars-defaults"],
1426}
1427
1428java_library {
1429 name: "art-gtest-jars-StringLiterals",
1430 srcs: ["StringLiterals/**/*.java"],
1431 defaults: ["art-gtest-jars-defaults"],
1432}
1433
1434java_library {
1435 name: "art-gtest-jars-Transaction",
1436 srcs: ["Transaction/**/*.java"],
1437 defaults: ["art-gtest-jars-defaults"],
1438}
1439
1440java_library {
1441 name: "art-gtest-jars-XandY",
1442 srcs: ["XandY/**/*.java"],
1443 defaults: ["art-gtest-jars-defaults"],
1444}
1445
Calin Juravle33787682019-07-26 14:27:18 -07001446java_library {
1447 name: "art-gtest-jars-Dex2oatVdexTestDex",
1448 srcs: ["Dex2oatVdexTestDex/**/*.java"],
1449 defaults: ["art-gtest-jars-defaults"],
1450}
1451
David Srbecky8c8f1482020-02-05 20:17:10 +00001452// The following cases are non-trivial.
1453
1454// Uncompress classes.dex files in the jar file.
1455genrule_defaults {
1456 name: "art-gtest-jars-uncompress-defaults",
1457 cmd: "$(location zip2zip) -i $(in) -o $(out) -0 'classes*.dex'",
1458 tools: ["zip2zip"],
1459}
1460
1461// Ensure the files are at least 4 byte aligned.
1462genrule_defaults {
1463 name: "art-gtest-jars-align-defaults",
1464 cmd: "$(location zipalign) 4 $(in) $(out)",
1465 tools: ["zipalign"],
1466}
1467
1468// Assemble jar file from smali source.
1469genrule_defaults {
1470 name: "art-gtest-jars-smali-defaults",
1471 cmd: "$(location smali) assemble --output $(out) $(in)",
1472 tools: ["smali"],
1473}
1474
1475// A copy of Main with the classes.dex stripped for the oat file assistant tests.
1476genrule {
1477 name: "art-gtest-jars-MainStripped",
1478 srcs: [":art-gtest-jars-Main"],
1479 cmd: "$(location zip2zip) -i $(in) -o $(out) -x 'classes*.dex'",
1480 out: ["art-gtest-jars-MainStripped.jar"],
1481 tools: ["zip2zip"],
1482}
1483
1484// An empty.dex that is empty and uncompressed for the dex2oat tests.
1485genrule {
1486 name: "art-gtest-jars-MainEmptyUncompressed",
1487 srcs: ["Main/empty.dex"],
1488 cmd: "$(location soong_zip) -j -L 0 -o $(out) -f $(in)",
1489 out: ["art-gtest-jars-MainEmptyUncompressed.jar"],
1490 tools: ["soong_zip"],
1491}
1492
1493// An empty.dex that is empty and uncompressed and aligned for the dex2oat tests.
1494genrule {
1495 name: "art-gtest-jars-MainEmptyUncompressedAligned",
1496 defaults: ["art-gtest-jars-align-defaults"],
1497 srcs: [":art-gtest-jars-MainEmptyUncompressed"],
1498 out: ["art-gtest-jars-MainEmptyUncompressedAligned.jar"],
1499}
1500
1501// A copy of Main with the classes.dex uncompressed for the dex2oat tests.
1502genrule {
1503 name: "art-gtest-jars-MainUncompressed",
1504 defaults: ["art-gtest-jars-uncompress-defaults"],
1505 srcs: [":art-gtest-jars-Main"],
1506 out: ["art-gtest-jars-MainUncompressed.jar"],
1507}
1508
1509// A copy of Main with the classes.dex uncompressed and aligned for the dex2oat tests.
1510genrule {
1511 name: "art-gtest-jars-MainUncompressedAligned",
1512 defaults: ["art-gtest-jars-align-defaults"],
1513 srcs: [":art-gtest-jars-MainUncompressed"],
1514 out: ["art-gtest-jars-MainUncompressedAligned.jar"],
1515}
1516
1517java_library {
1518 name: "art-gtest-jars-MultiDex",
1519 srcs: ["MultiDex/**/*.java"],
1520 defaults: ["art-gtest-jars-defaults"],
1521 min_sdk_version: "19",
1522 dxflags: [
1523 "--main-dex-list",
1524 "art/test/MultiDex/main.list",
1525 ],
1526}
1527
1528// A copy of MultiDex with the classes.dex uncompressed for the OatFile tests.
1529genrule {
1530 name: "art-gtest-jars-MultiDexUncompressed",
1531 defaults: ["art-gtest-jars-uncompress-defaults"],
1532 srcs: [":art-gtest-jars-MultiDex"],
1533 out: ["art-gtest-jars-MultiDexUncompressed.jar"],
1534}
1535
1536// A copy of MultiDex with the classes.dex uncompressed and aligned for the OatFile tests.
1537genrule {
1538 name: "art-gtest-jars-MultiDexUncompressedAligned",
1539 defaults: ["art-gtest-jars-align-defaults"],
1540 srcs: [":art-gtest-jars-MultiDexUncompressed"],
1541 out: ["art-gtest-jars-MultiDexUncompressedAligned.jar"],
1542}
1543
1544java_library {
1545 name: "art-gtest-jars-MultiDexModifiedSecondary",
1546 srcs: ["MultiDexModifiedSecondary/**/*.java"],
1547 defaults: ["art-gtest-jars-defaults"],
1548 min_sdk_version: "19",
1549 dxflags: [
1550 "--main-dex-list",
1551 "art/test/MultiDexModifiedSecondary/main.list",
1552 ],
1553}
1554
1555java_library {
1556 name: "art-gtest-jars-ProfileTestMultiDex",
1557 srcs: ["ProfileTestMultiDex/**/*.java"],
1558 defaults: ["art-gtest-jars-defaults"],
1559 min_sdk_version: "19",
1560 dxflags: [
1561 "--main-dex-list",
1562 "art/test/ProfileTestMultiDex/main.list",
1563 ],
1564}
1565
David Srbeckyedda3ca2020-07-08 00:41:08 +01001566// Smali compiled files.
1567// Since they are not compiled by javac, we use different extension for them.
1568// The .jar extension for them would cause subtle failures in the test infra,
1569// which finds and opens all jar files and expects them to be valid zip files.
1570
David Srbecky8c8f1482020-02-05 20:17:10 +00001571genrule {
1572 name: "art-gtest-jars-VerifierDeps",
1573 defaults: ["art-gtest-jars-smali-defaults"],
1574 srcs: ["VerifierDeps/**/*.smali"],
David Srbeckyedda3ca2020-07-08 00:41:08 +01001575 out: ["art-gtest-jars-VerifierDeps.dex"],
David Srbecky8c8f1482020-02-05 20:17:10 +00001576}
1577
1578genrule {
1579 name: "art-gtest-jars-VerifierDepsMulti",
1580 defaults: ["art-gtest-jars-smali-defaults"],
1581 srcs: ["VerifierDepsMulti/**/*.smali"],
David Srbeckyedda3ca2020-07-08 00:41:08 +01001582 out: ["art-gtest-jars-VerifierDepsMulti.dex"],
David Srbecky8c8f1482020-02-05 20:17:10 +00001583}
1584
1585genrule {
1586 name: "art-gtest-jars-VerifySoftFailDuringClinit",
1587 defaults: ["art-gtest-jars-smali-defaults"],
1588 srcs: ["VerifySoftFailDuringClinit/**/*.smali"],
David Srbeckyedda3ca2020-07-08 00:41:08 +01001589 out: ["art-gtest-jars-VerifySoftFailDuringClinit.dex"],
David Srbecky8c8f1482020-02-05 20:17:10 +00001590}
David Srbecky4a88a5a2020-05-05 16:21:57 +01001591
1592genrule {
1593 name: "art-gtest-jars-LinkageTest",
1594 defaults: ["art-gtest-jars-smali-defaults"],
1595 srcs: ["LinkageTest/*.smali"],
David Srbeckyedda3ca2020-07-08 00:41:08 +01001596 out: ["art-gtest-jars-LinkageTest.dex"],
David Srbecky4a88a5a2020-05-05 16:21:57 +01001597}
Calin Juravle33787682019-07-26 14:27:18 -07001598
1599genrule {
1600 name: "art-gtest-jars-Dex2oatVdexPublicSdkDex",
1601 defaults: ["art-gtest-jars-smali-defaults"],
1602 srcs: ["Dex2oatVdexPublicSdkDex/*.smali"],
1603 out: ["art-gtest-jars-Dex2oatVdexPublicSdkDex.dex"],
1604}