blob: e710509bd939c20cb07569af83c22cccb75b2b4c [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",
Orion Hodsone3124d22021-05-24 17:41:34 +0100129 "liblog",
Colin Cross6e95dd52016-09-12 15:37:10 -0700130 "libnativehelper",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000131 "libz",
Colin Cross6e95dd52016-09-12 15:37:10 -0700132 ],
Colin Cross6e95dd52016-09-12 15:37:10 -0700133
134 target: {
Dan Willemsen057f1e42017-10-03 14:11:48 -0700135 linux: {
Colin Cross6e95dd52016-09-12 15:37:10 -0700136 ldflags: [
137 // Allow jni_compiler_test to find Java_MyClassNatives_bar
138 // within itself using dlopen(NULL, ...).
139 // Mac OS linker doesn't understand --export-dynamic.
140 "-Wl,--export-dynamic",
141 "-Wl,-u,Java_MyClassNatives_bar",
142 "-Wl,-u,Java_MyClassNatives_sbar",
143 ],
Colin Cross6e95dd52016-09-12 15:37:10 -0700144 cflags: [
145 // gtest issue
146 "-Wno-used-but-marked-unused",
147 "-Wno-deprecated",
148 "-Wno-missing-noreturn",
149 ],
150 },
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000151 host: {
152 shared_libs: [
153 "libziparchive",
154 ],
155 },
Colin Cross6e95dd52016-09-12 15:37:10 -0700156 },
157}
158
159art_cc_defaults {
Colin Cross6b22aa52016-09-12 14:35:39 -0700160 name: "libart-gtest-defaults",
161 host_supported: true,
162 defaults: [
Colin Cross6b22aa52016-09-12 14:35:39 -0700163 "art_debug_defaults",
Andreas Gampe5115efb2017-05-24 16:55:54 -0700164 "art_defaults",
Colin Cross6b22aa52016-09-12 14:35:39 -0700165 ],
166 shared_libs: [
167 "libartd",
168 "libartd-compiler",
David Sehrfcbe15c2018-02-15 09:41:13 -0800169 "libdexfiled",
David Sehr82d046e2018-04-23 08:14:19 -0700170 "libprofiled",
David Sehr1f010162018-05-15 08:59:32 -0700171 "libartbased",
David Srbecky883c1342020-05-11 23:30:29 +0000172 "liblog",
Colin Cross6b22aa52016-09-12 14:35:39 -0700173 ],
174 static_libs: [
David Srbecky883c1342020-05-11 23:30:29 +0000175 "libgtest_isolated",
Colin Cross6b22aa52016-09-12 14:35:39 -0700176 ],
177 target: {
178 android32: {
Colin Crossc5c71872016-09-15 21:07:29 -0700179 cflags: ["-DART_TARGET_NATIVETEST_DIR=/data/nativetest/art"],
Colin Cross6b22aa52016-09-12 14:35:39 -0700180 },
181 android64: {
182 cflags: ["-DART_TARGET_NATIVETEST_DIR=/data/nativetest64/art"],
183 },
Dan Willemsen057f1e42017-10-03 14:11:48 -0700184 linux: {
Colin Cross6b22aa52016-09-12 14:35:39 -0700185 cflags: [
186 // gtest issue
187 "-Wno-used-but-marked-unused",
188 "-Wno-deprecated",
189 "-Wno-missing-noreturn",
190 ],
191 },
Colin Cross942036f2016-09-15 16:24:51 -0700192 darwin: {
193 enabled: false,
194 },
Colin Cross6b22aa52016-09-12 14:35:39 -0700195 },
Jiyong Park066dd9022019-12-19 02:11:59 +0000196 apex_available: [
197 "com.android.art.debug",
Martin Stjernholmd3e9ff32021-03-16 00:44:25 +0000198 // TODO(b/183882457): This lib doesn't go into com.android.art, but
199 // apex_available lists need to be the same for internal libs to avoid
200 // stubs, and this depends on libdexfiled and others.
201 "com.android.art",
Jiyong Park066dd9022019-12-19 02:11:59 +0000202 ],
Colin Cross6b22aa52016-09-12 14:35:39 -0700203}
204
205art_cc_library {
206 name: "libart-gtest",
207 host_supported: true,
David Srbecky883c1342020-05-11 23:30:29 +0000208 defaults: [
209 "art_debug_defaults",
210 "art_defaults",
211 ],
212 srcs: [
213 "common/gtest_main.cc",
214 ],
Colin Cross6b22aa52016-09-12 14:35:39 -0700215 whole_static_libs: [
216 "libart-compiler-gtest",
217 "libart-runtime-gtest",
David Sehrd5f8de82018-04-27 14:12:03 -0700218 "libartbase-art-gtest",
David Srbecky883c1342020-05-11 23:30:29 +0000219 "libgtest_isolated",
Colin Cross6b22aa52016-09-12 14:35:39 -0700220 ],
221 shared_libs: [
222 "libartd",
223 "libartd-compiler",
David Sehrfcbe15c2018-02-15 09:41:13 -0800224 "libdexfiled",
David Sehr82d046e2018-04-23 08:14:19 -0700225 "libprofiled",
David Sehr1f010162018-05-15 08:59:32 -0700226 "libartbased",
Colin Crossf0af9062016-10-21 10:50:31 -0700227 "libbase",
Dan Willemsen2ca27802017-09-27 14:57:43 -0700228 "libbacktrace",
David Srbecky883c1342020-05-11 23:30:29 +0000229 "liblog",
Colin Cross6b22aa52016-09-12 14:35:39 -0700230 ],
231 target: {
Colin Cross942036f2016-09-15 16:24:51 -0700232 darwin: {
233 enabled: false,
234 },
Colin Cross6b22aa52016-09-12 14:35:39 -0700235 },
Jiyong Park066dd9022019-12-19 02:11:59 +0000236 apex_available: [
237 "com.android.art.debug",
Martin Stjernholmd3e9ff32021-03-16 00:44:25 +0000238 // TODO(b/183882457): This lib doesn't go into com.android.art, but
239 // apex_available lists need to be the same for internal libs to avoid
240 // stubs, and this depends on libdexfiled and others.
241 "com.android.art",
Jiyong Park066dd9022019-12-19 02:11:59 +0000242 ],
Colin Cross6b22aa52016-09-12 14:35:39 -0700243}
Colin Crossafd3c9e2016-09-16 13:47:21 -0700244
Roland Levillain962a1102019-11-01 16:20:33 +0000245// ART run-tests.
246
Roland Levillain4258f9e2020-10-13 12:10:59 +0100247// Test configuration template for ART run-tests on target expected to run
248// successfully, and as such tagged as part of TradeFed's `art-target-run-test`
249// test suite via the `test-suite-tag`.
Roland Levillaina8049c62019-11-01 16:11:20 +0000250filegroup {
Roland Levillain4258f9e2020-10-13 12:10:59 +0100251 name: "art-run-test-target-template",
Roland Levillaina8049c62019-11-01 16:11:20 +0000252 srcs: [
Roland Levillain4258f9e2020-10-13 12:10:59 +0100253 "art-run-test-target-template.xml",
254 ],
255}
256
257// Test configuration template for ART run-tests on target expected to run
258// successfully, and as such *not* tagged as part of TradeFed's
259// `art-target-run-test` test suite via the `test-suite-tag`. This is as
260// temporary measure, while we add proper support for all ART (target) run-tests
261// to TradeFed (b/147818031).
262filegroup {
263 name: "art-run-test-target-no-test-suite-tag-template",
264 srcs: [
265 "art-run-test-target-no-test-suite-tag-template.xml",
Roland Levillaina8049c62019-11-01 16:11:20 +0000266 ],
267}
268
Roland Levillain79d90922020-02-04 15:41:45 +0000269java_defaults {
270 name: "art-run-test-defaults",
Roland Levillain9a0f9ba2020-02-13 15:06:54 +0000271
Roland Levillain79d90922020-02-04 15:41:45 +0000272 // Compile against the "core" bootclasspath, not the "default" one (current
Roland Levillain9a0f9ba2020-02-13 15:06:54 +0000273 // platform) -- use the same settings as Libcore tests (see e.g. the
274 // definition of module `core-tests` in libcore/JavaLibrary.bp).
275 //
276 // Note: The legacy way to build ART run-tests uses the
277 // `javac_with_bootclasspath` function defined in `test/etc/default-build`.
278 // See also `tools/javac-helper.sh`.
279 sdk_version: "none",
280 system_modules: "core-all-system-modules",
281
Roland Levillain01e56982020-02-10 12:28:01 +0000282 // Some ART run-tests contain constructs which break ErrorProne checks;
283 // disable them on `errorprone` builds.
284 errorprone: {
285 javacflags: ["-XepDisableAllChecks"],
286 },
Roland Levillain00381bf2020-09-01 17:28:11 +0100287 test_suites: [
288 "general-tests",
Kimberly Kreider284e8b02020-12-15 09:40:30 -0800289 "mts-art",
Roland Levillain00381bf2020-09-01 17:28:11 +0100290 ],
Daniil Riazanovskiy1ca19bc2020-10-01 00:32:21 +0000291 host_required: [
292 "art-run-test-checker",
293 ],
Roland Levillain79d90922020-02-04 15:41:45 +0000294}
295
Roland Levillain962a1102019-11-01 16:20:33 +0000296art_cc_test_library {
297 name: "libarttest",
298 defaults: ["libarttest-defaults"],
299 shared_libs: [
300 "libart",
301 "libdexfile",
302 "libprofile",
303 "libartbase",
304 ],
305}
306
307art_cc_test_library {
308 name: "libarttestd",
309 defaults: [
310 "art_debug_defaults",
311 "libarttest-defaults",
312 ],
313 shared_libs: [
314 "libartd",
315 "libdexfiled",
316 "libprofiled",
317 "libartbased",
318 ],
319}
320
321art_cc_defaults {
322 name: "libnativebridgetest-defaults",
323 defaults: [
324 "art_test_defaults",
325 "art_defaults",
326 ],
327 header_libs: ["libnativebridge-headers"],
328 srcs: ["115-native-bridge/nativebridge.cc"],
329}
330
331art_cc_test_library {
332 name: "libnativebridgetest",
333 shared_libs: ["libart"],
334 defaults: [
335 "libnativebridgetest-defaults",
336 ],
337}
338
339art_cc_test_library {
340 name: "libnativebridgetestd",
341 shared_libs: ["libartd"],
342 defaults: [
343 "libnativebridgetest-defaults",
344 "art_debug_defaults",
345 ],
346}
347
348// ART JVMTI run-tests.
349
Colin Crossafd3c9e2016-09-16 13:47:21 -0700350cc_defaults {
351 name: "libartagent-defaults",
352 defaults: [
Martin Stjernholm0d0f8df2021-04-28 16:47:01 +0100353 "art_test_internal_library_defaults",
Andreas Gampe5115efb2017-05-24 16:55:54 -0700354 "art_defaults",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700355 ],
356 shared_libs: [
357 "libbacktrace",
Andreas Gampe3fec9ac2016-09-13 10:47:28 -0700358 "libbase",
Orion Hodsonfcc922a2021-05-21 11:32:33 +0100359 "liblog",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700360 "libnativehelper",
361 ],
Colin Crossafd3c9e2016-09-16 13:47:21 -0700362}
363
364art_cc_test_library {
365 name: "libartagent",
366 srcs: ["900-hello-plugin/load_unload.cc"],
367 defaults: ["libartagent-defaults"],
Andreas Gampe9462a562018-02-20 09:35:21 -0800368 shared_libs: [
369 "libart",
370 "libdexfile",
David Sehr82d046e2018-04-23 08:14:19 -0700371 "libprofile",
David Sehr1f010162018-05-15 08:59:32 -0700372 "libartbase",
Andreas Gampe9462a562018-02-20 09:35:21 -0800373 ],
Colin Crossafd3c9e2016-09-16 13:47:21 -0700374}
375
376art_cc_test_library {
377 name: "libartagentd",
378 srcs: ["900-hello-plugin/load_unload.cc"],
379 defaults: [
Colin Crossafd3c9e2016-09-16 13:47:21 -0700380 "art_debug_defaults",
Andreas Gampe5115efb2017-05-24 16:55:54 -0700381 "libartagent-defaults",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700382 ],
Andreas Gampe9462a562018-02-20 09:35:21 -0800383 shared_libs: [
384 "libartd",
385 "libdexfiled",
David Sehr82d046e2018-04-23 08:14:19 -0700386 "libprofiled",
David Sehr1f010162018-05-15 08:59:32 -0700387 "libartbased",
Andreas Gampe9462a562018-02-20 09:35:21 -0800388 ],
Colin Crossafd3c9e2016-09-16 13:47:21 -0700389}
390
Andreas Gampee54d9922016-10-11 19:55:37 -0700391art_cc_defaults {
Dan Willemsen2ca27802017-09-27 14:57:43 -0700392 name: "libtiagent-base-defaults",
Andreas Gampecb5125d2018-02-20 09:36:54 -0800393 defaults: [
Martin Stjernholm0d0f8df2021-04-28 16:47:01 +0100394 "art_test_internal_library_defaults",
Andreas Gampecb5125d2018-02-20 09:36:54 -0800395 "art_defaults",
396 // Not derived from libartagent-defaults for NDK.
397 ],
Colin Crossafd3c9e2016-09-16 13:47:21 -0700398 srcs: [
Andreas Gampe027444b2017-03-31 12:49:07 -0700399 // These are the ART-independent parts.
Andreas Gampe46651672017-04-07 09:00:04 -0700400 "ti-agent/agent_common.cc",
Andreas Gampe027444b2017-03-31 12:49:07 -0700401 "ti-agent/agent_startup.cc",
Andreas Gampe3f46c962017-03-30 10:26:59 -0700402 "ti-agent/jni_binder.cc",
403 "ti-agent/jvmti_helper.cc",
404 "ti-agent/test_env.cc",
Alex Lightd0d65962017-06-30 11:13:33 -0700405 "ti-agent/breakpoint_helper.cc",
Alex Light78d63412017-04-14 16:20:53 -0700406 "ti-agent/common_helper.cc",
Alex Lightb7c640d2019-03-20 15:52:13 -0700407 "ti-agent/early_return_helper.cc",
Alex Lighte814f9d2017-07-31 16:14:39 -0700408 "ti-agent/frame_pop_helper.cc",
Alex Light47d49b82017-07-25 14:06:34 -0700409 "ti-agent/locals_helper.cc",
Alex Lightce568642017-09-05 16:54:25 -0700410 "ti-agent/monitors_helper.cc",
Alex Lightd0d65962017-06-30 11:13:33 -0700411 "ti-agent/redefinition_helper.cc",
Alex Light88fd7202017-06-30 08:31:59 -0700412 "ti-agent/suspension_helper.cc",
Alex Lightb4e65072019-04-25 15:10:32 -0700413 "ti-agent/suspend_event_helper.cc",
Alex Light47d49b82017-07-25 14:06:34 -0700414 "ti-agent/stack_trace_helper.cc",
Alex Light54d39dc2017-09-25 17:00:16 -0700415 "ti-agent/threads_helper.cc",
Alex Lightd0d65962017-06-30 11:13:33 -0700416 "ti-agent/trace_helper.cc",
Alex Light9fb1ab12017-09-05 09:32:49 -0700417 "ti-agent/exceptions_helper.cc",
Andreas Gampe027444b2017-03-31 12:49:07 -0700418 // This is the list of non-special OnLoad things and excludes BCI and anything that depends
419 // on ART internals.
Andreas Gampe6dee92e2016-09-12 19:58:13 -0700420 "903-hello-tagging/tagging.cc",
Andreas Gampe27fa96c2016-10-07 15:05:24 -0700421 "904-object-allocation/tracking.cc",
Andreas Gampecc13b222016-10-10 19:09:09 -0700422 "905-object-free/tracking_free.cc",
Andreas Gampee54d9922016-10-11 19:55:37 -0700423 "906-iterate-heap/iterate_heap.cc",
Andreas Gampeaa8b60c2016-10-12 12:51:25 -0700424 "907-get-loaded-classes/get_loaded_classes.cc",
Andreas Gampe9b8c5882016-10-21 15:27:46 -0700425 "908-gc-start-finish/gc_callbacks.cc",
Andreas Gampe3c252f02016-10-27 18:25:17 -0700426 "910-methods/methods.cc",
Andreas Gampeb5eb94a2016-10-27 19:23:09 -0700427 "911-get-stack-trace/stack_trace.cc",
Andreas Gamped5f2ccc2017-04-19 13:37:48 -0700428 "912-classes/classes.cc",
Andreas Gampee0f8ed92017-04-13 16:52:23 -0700429 "913-heaps/heaps.cc",
Andreas Gampeab2f0d02017-01-05 17:23:45 -0800430 "918-fields/fields.cc",
Andreas Gampe50a4e492017-01-06 18:00:20 -0800431 "920-objects/objects.cc",
Andreas Gampe1bdaf732017-01-09 19:21:06 -0800432 "922-properties/properties.cc",
Andreas Gampe319dbe82017-01-09 16:42:21 -0800433 "923-monitors/monitors.cc",
Andreas Gampeaf13ab92017-01-11 20:57:40 -0800434 "924-threads/threads.cc",
Andreas Gamped18d9e22017-01-16 16:08:45 +0000435 "925-threadgroups/threadgroups.cc",
Andreas Gampe35bcf812017-01-13 16:24:17 -0800436 "927-timers/timers.cc",
Andreas Gampe6f8e4f02017-01-16 18:18:14 -0800437 "928-jni-table/jni_table.cc",
Andreas Gampece7732b2017-01-17 15:50:26 -0800438 "929-search/search.cc",
Andreas Gampe732b0ac2017-01-18 15:23:39 -0800439 "931-agent-thread/agent_thread.cc",
Andreas Gampeeb0cea12017-01-23 08:50:04 -0800440 "933-misc-events/misc_events.cc",
Alex Light78d63412017-04-14 16:20:53 -0700441 "945-obsolete-native/obsolete_native.cc",
Alex Light8fd08562018-02-13 10:09:03 -0800442 "983-source-transform-verify/source_transform.cc",
Alex Light78d63412017-04-14 16:20:53 -0700443 "984-obsolete-invoke/obsolete_invoke.cc",
Alex Lightd78ddec2017-04-18 15:20:38 -0700444 "986-native-method-bind/native_bind.cc",
Alex Light65af20b2017-04-20 09:15:08 -0700445 "987-agent-bind/agent_bind.cc",
Alex Lighte85595e2018-08-17 15:54:34 -0700446 "988-method-trace/trace_fib.cc",
Alex Lightb7edcda2017-04-27 13:20:31 -0700447 "989-method-trace-throw/method_trace.cc",
Alex Light7c958492017-06-16 08:59:19 -0700448 "991-field-trace-2/field_trace.cc",
Alex Light6fa7b812017-06-16 09:04:29 -0700449 "992-source-data/source_file.cc",
Alex Lightc38c3692017-06-27 15:45:14 -0700450 "993-breakpoints/breakpoints.cc",
451 "996-breakpoint-obsolete/obsolete_breakpoints.cc",
Alex Light8ddfd9f2017-07-05 16:33:46 -0700452 "1900-track-alloc/alloc.cc",
Alex Light4c174282017-07-05 10:18:18 -0700453 "1901-get-bytecodes/bytecodes.cc",
Alex Light88fd7202017-06-30 08:31:59 -0700454 "1905-suspend-native/native_suspend.cc",
455 "1908-suspend-native-resume-self/native_suspend_resume.cc",
Alex Light092a4042017-07-12 08:46:44 -0700456 "1909-per-agent-tls/agent_tls.cc",
Alex Light47d49b82017-07-25 14:06:34 -0700457 "1914-get-local-instance/local_instance.cc",
Alex Light1d8a9742017-08-17 11:12:06 -0700458 "1919-vminit-thread-start-timing/vminit.cc",
Alex Light23aa7482017-08-16 10:01:13 -0700459 "1920-suspend-native-monitor/native_suspend_monitor.cc",
460 "1921-suspend-native-recursive-monitor/native_suspend_recursive_monitor.cc",
Alex Light88e1ddd2017-08-21 13:09:55 -0700461 "1922-owned-monitors-info/owned_monitors.cc",
Alex Lighte814f9d2017-07-31 16:14:39 -0700462 "1924-frame-pop-toggle/frame_pop_toggle.cc",
463 "1926-missed-frame-pop/frame_pop_missed.cc",
Alex Lightce568642017-09-05 16:54:25 -0700464 "1927-exception-event/exception_event.cc",
465 "1930-monitor-info/monitor.cc",
Dan Willemsen2ca27802017-09-27 14:57:43 -0700466 "1932-monitor-events-misc/monitor_misc.cc",
Alex Light54d39dc2017-09-25 17:00:16 -0700467 "1934-jvmti-signal-thread/signal_threads.cc",
Alex Light3dea2122017-10-11 15:56:48 +0000468 "1939-proxy-frames/local_instance.cc",
Alex Lightb284f8d2017-11-21 00:00:48 +0000469 "1941-dispose-stress/dispose_stress.cc",
Alex Light4d77daf2018-01-04 11:51:14 -0800470 "1942-suspend-raw-monitor-exit/native_suspend_monitor.cc",
471 "1943-suspend-raw-monitor-wait/native_suspend_monitor.cc",
Alex Lightc7588752018-02-20 11:15:54 -0800472 "1946-list-descriptors/descriptors.cc",
Alex Light9e7859c2018-04-05 13:49:43 -0700473 "1950-unprepared-transform/unprepared_transform.cc",
Alex Lightc98f83e2018-07-26 08:28:36 -0700474 "1951-monitor-enter-no-suspend/raw_monitor.cc",
Alex Light0aa7a5a2018-10-10 15:58:14 +0000475 "1953-pop-frame/pop_frame.cc",
Alex Lightae45cbb2018-10-18 15:49:56 -0700476 "1957-error-ext/lasterror.cc",
Alex Lightb7c640d2019-03-20 15:52:13 -0700477 // TODO Renumber
Alex Light40607862019-05-06 18:16:24 +0000478 "1962-multi-thread-events/multi_thread_events.cc",
Alex Light639e73b2019-05-17 21:44:36 +0000479 "1963-add-to-dex-classloader-in-memory/add_to_loader.cc",
Alex Lightb7c640d2019-03-20 15:52:13 -0700480 "1968-force-early-return/force_early_return.cc",
481 "1969-force-early-return-void/force_early_return_void.cc",
482 "1970-force-early-return-long/force_early_return_long.cc",
Alex Lightc14ec8f2019-07-18 16:08:41 -0700483 "1974-resize-array/resize_array.cc",
Nicolas Geoffray4ac0e152019-09-18 06:14:50 +0000484 "1975-hello-structural-transformation/structural_transform.cc",
485 "1976-hello-structural-static-methods/structural_transform_methods.cc",
Alex Light80777ed2019-12-17 17:07:33 +0000486 "2005-pause-all-redefine-multithreaded/pause-all.cc",
Alex Light72325b62020-01-09 17:49:45 -0800487 "2009-structural-local-ref/local-ref.cc",
Alex Light16527e82020-06-08 09:21:12 -0700488 "2035-structural-native-method/structural-native.cc",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700489 ],
Andreas Gampecb5125d2018-02-20 09:36:54 -0800490 // Use NDK-compatible headers for ctstiagent.
Alex Light8c2b9292017-11-09 13:21:01 -0800491 header_libs: [
Alex Light8c2b9292017-11-09 13:21:01 -0800492 "libopenjdkjvmti_headers",
493 ],
Paul Duffin4345aac2019-07-17 15:51:54 +0100494 local_include_dirs: ["ti-agent"],
Andreas Gampee54d9922016-10-11 19:55:37 -0700495}
496
Andreas Gampe027444b2017-03-31 12:49:07 -0700497art_cc_defaults {
498 name: "libtiagent-defaults",
Andreas Gampecb5125d2018-02-20 09:36:54 -0800499 defaults: [
500 "libtiagent-base-defaults",
501 "libartagent-defaults",
502 ],
Andreas Gampe027444b2017-03-31 12:49:07 -0700503 srcs: [
504 // This is to get the IsInterpreted native method.
505 "common/stack_inspect.cc",
506 "common/runtime_state.cc",
Alex Light78d63412017-04-14 16:20:53 -0700507 "ti-agent/common_load.cc",
Andreas Gampe027444b2017-03-31 12:49:07 -0700508 // This includes the remaining test functions. We should try to refactor things to
509 // make this list smaller.
Andreas Gampe027444b2017-03-31 12:49:07 -0700510 "901-hello-ti-agent/basics.cc",
511 "909-attach-agent/attach.cc",
Andreas Gamped5f2ccc2017-04-19 13:37:48 -0700512 "912-classes/classes_art.cc",
Andreas Gampe027444b2017-03-31 12:49:07 -0700513 "936-search-onload/search_onload.cc",
Alex Lightfbee3982018-05-24 10:28:46 -0700514 "980-redefine-object/redef_object.cc",
Andreas Gampe59484b92018-02-14 14:00:46 -0800515 "983-source-transform-verify/source_transform_art.cc",
Alex Light8c2b9292017-11-09 13:21:01 -0800516 "1940-ddms-ext/ddm_ext.cc",
Alex Light0aa7a5a2018-10-10 15:58:14 +0000517 // "1952-pop-frame-jit/pop_frame.cc",
Alex Lightfc81d802018-12-07 13:39:05 -0800518 "1959-redefine-object-instrument/fake_redef_object.cc",
Alex Lighte7a33542019-04-10 14:22:49 -0700519 "1960-obsolete-jit-multithread-native/native_say_hi.cc",
Alex Light639e73b2019-05-17 21:44:36 +0000520 "1964-add-to-dex-classloader-file/add_to_loader.cc",
Alex Light098e7a62019-05-21 16:57:10 -0700521 "1963-add-to-dex-classloader-in-memory/check_memfd_create.cc",
Alex Light3f0dca12020-01-27 17:20:28 -0800522 "2012-structural-redefinition-failures-jni-id/set-jni-id-used.cc",
Alex Light280e6c32020-03-03 13:52:07 -0800523 "2031-zygote-compiled-frame-deopt/native-wait.cc",
Alex Light1a0e2922021-01-12 13:57:42 +0000524 "2038-hiddenapi-jvmti-ext/hiddenapi_ext.cc",
Andreas Gampe027444b2017-03-31 12:49:07 -0700525 ],
Alex Lightfbee3982018-05-24 10:28:46 -0700526 static_libs: [
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000527 "libz",
Andreas Gampe7e057ec2019-03-04 13:11:22 -0800528 "slicer_no_rtti",
Alex Lightfbee3982018-05-24 10:28:46 -0700529 ],
Andreas Gampe027444b2017-03-31 12:49:07 -0700530}
531
Andreas Gampee54d9922016-10-11 19:55:37 -0700532art_cc_test_library {
533 name: "libtiagent",
534 defaults: ["libtiagent-defaults"],
David Sehrfcbe15c2018-02-15 09:41:13 -0800535 shared_libs: [
536 "libart",
537 "libdexfile",
David Sehr82d046e2018-04-23 08:14:19 -0700538 "libprofile",
David Sehr1f010162018-05-15 08:59:32 -0700539 "libartbase",
David Sehrfcbe15c2018-02-15 09:41:13 -0800540 ],
Colin Crossafd3c9e2016-09-16 13:47:21 -0700541}
542
543art_cc_test_library {
544 name: "libtiagentd",
545 defaults: [
Colin Crossafd3c9e2016-09-16 13:47:21 -0700546 "art_debug_defaults",
Andreas Gampe5115efb2017-05-24 16:55:54 -0700547 "libtiagent-defaults",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700548 ],
David Sehrfcbe15c2018-02-15 09:41:13 -0800549 shared_libs: [
550 "libartd",
551 "libdexfiled",
David Sehr82d046e2018-04-23 08:14:19 -0700552 "libprofiled",
David Sehr1f010162018-05-15 08:59:32 -0700553 "libartbased",
David Sehrfcbe15c2018-02-15 09:41:13 -0800554 ],
Colin Crossafd3c9e2016-09-16 13:47:21 -0700555}
556
Andreas Gampe59484b92018-02-14 14:00:46 -0800557cc_library_static {
Andreas Gamped0ed0d92018-02-12 15:03:36 -0800558 name: "libctstiagent",
559 defaults: ["libtiagent-base-defaults"],
Martin Stjernholm1dc77ab2021-05-10 17:44:05 +0100560
561 // TODO(b/187288515): Providing this as a prebuilt introduces an issue with
562 // sdk_version propagation. Temporarily use the source library instead,
563 // which means we need to override the logic inherited from art_defaults and
564 // art_test_internal_library_defaults that disables sources when not
565 // building ART from sources.
566 enabled: true,
567
Martin Stjernholmb4abe0a2019-05-17 19:22:55 +0100568 visibility: [
569 "//cts/hostsidetests/jvmti:__subpackages__",
570 ],
Andreas Gampe59484b92018-02-14 14:00:46 -0800571 host_supported: false,
572 srcs: [
573 "983-source-transform-verify/source_transform_slicer.cc",
574 ],
Andreas Gamped0ed0d92018-02-12 15:03:36 -0800575 whole_static_libs: [
Andreas Gampe7e057ec2019-03-04 13:11:22 -0800576 "slicer_ndk_no_rtti",
Andreas Gamped0ed0d92018-02-12 15:03:36 -0800577 ],
578 static_libs: [
Andreas Gampecb5125d2018-02-20 09:36:54 -0800579 "libbase_ndk",
Andreas Gamped0ed0d92018-02-12 15:03:36 -0800580 ],
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000581 shared_libs: [
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700582 "libz", // for slicer (using adler32).
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000583 ],
Andreas Gampecb5125d2018-02-20 09:36:54 -0800584 sdk_version: "current",
585 stl: "c++_static",
Paul Duffin4345aac2019-07-17 15:51:54 +0100586 header_libs: [
587 "jni_headers",
Alex Light8fd08562018-02-13 10:09:03 -0800588 // This is needed to resolve the base/ header file in libdexfile. Unfortunately there are
589 // many problems with how we export headers that are making doing this the 'right' way
590 // difficult.
591 // TODO: move those headers to art/ rather than under runtime.
Paul Duffin4345aac2019-07-17 15:51:54 +0100592 "libart_runtime_headers_ndk",
Alex Light8fd08562018-02-13 10:09:03 -0800593 ],
Andreas Gamped0ed0d92018-02-12 15:03:36 -0800594 export_include_dirs: ["ti-agent"],
595}
596
Alex Light8f2c6d42017-04-10 16:27:35 -0700597art_cc_defaults {
Alex Light88659142018-05-15 10:53:06 -0700598 name: "libtistress-srcs",
Alex Light8f2c6d42017-04-10 16:27:35 -0700599 defaults: ["libartagent-defaults"],
600 srcs: [
601 "ti-stress/stress.cc",
602 ],
Alex Light88659142018-05-15 10:53:06 -0700603 header_libs: ["libopenjdkjvmti_headers"],
604}
605
606art_cc_defaults {
607 name: "libtistress-defaults",
608 defaults: ["libtistress-srcs"],
Alex Light8f2c6d42017-04-10 16:27:35 -0700609 shared_libs: [
Andreas Gampe7e057ec2019-03-04 13:11:22 -0800610 "slicer_no_rtti",
Vladimir Markoe8a83af2020-01-29 10:14:44 +0000611 "libz", // for slicer (using adler32).
Alex Light8f2c6d42017-04-10 16:27:35 -0700612 ],
Alex Light8f2c6d42017-04-10 16:27:35 -0700613}
614
615art_cc_test_library {
616 name: "libtistress",
Dan Willemsen2ca27802017-09-27 14:57:43 -0700617 defaults: ["libtistress-defaults"],
Vladimir Markoe8a83af2020-01-29 10:14:44 +0000618 shared_libs: [
619 "libartbase",
620 "libz",
621 ],
Alex Light8f2c6d42017-04-10 16:27:35 -0700622}
623
624art_cc_test_library {
625 name: "libtistressd",
626 defaults: [
Alex Light8f2c6d42017-04-10 16:27:35 -0700627 "art_debug_defaults",
Andreas Gampe5115efb2017-05-24 16:55:54 -0700628 "libtistress-defaults",
Alex Light8f2c6d42017-04-10 16:27:35 -0700629 ],
Vladimir Markoe8a83af2020-01-29 10:14:44 +0000630 shared_libs: [
631 "libartbased",
632 "libz",
633 ],
Alex Light88659142018-05-15 10:53:06 -0700634}
635
636art_cc_defaults {
Vladimir Markoe8a83af2020-01-29 10:14:44 +0000637 name: "libtistress-shared-defaults",
Andreas Gampeec5ed062018-01-26 16:20:02 -0800638 defaults: [
639 "libtistress-srcs",
Alex Light88659142018-05-15 10:53:06 -0700640 ],
Andreas Gampe7e057ec2019-03-04 13:11:22 -0800641 static_libs: ["slicer_no_rtti"],
Alex Light88659142018-05-15 10:53:06 -0700642}
643
644art_cc_test_library {
645 name: "libtistresss",
Vladimir Markoe8a83af2020-01-29 10:14:44 +0000646 defaults: ["libtistress-shared-defaults"],
647 shared_libs: [
648 "libartbase",
649 "libz",
650 ],
Alex Light88659142018-05-15 10:53:06 -0700651}
652
653art_cc_test_library {
654 name: "libtistressds",
655 defaults: [
Vladimir Markoe8a83af2020-01-29 10:14:44 +0000656 "libtistress-shared-defaults",
Alex Light88659142018-05-15 10:53:06 -0700657 ],
Vladimir Markoe8a83af2020-01-29 10:14:44 +0000658 shared_libs: [
659 "libartbased",
660 "libz",
661 ],
Alex Light8f2c6d42017-04-10 16:27:35 -0700662}
663
Colin Crossafd3c9e2016-09-16 13:47:21 -0700664cc_defaults {
665 name: "libarttest-defaults",
666 defaults: [
Martin Stjernholm0d0f8df2021-04-28 16:47:01 +0100667 "art_test_internal_library_defaults",
Andreas Gampe5115efb2017-05-24 16:55:54 -0700668 "art_defaults",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700669 ],
670 srcs: [
Colin Crossafd3c9e2016-09-16 13:47:21 -0700671 "004-JniTest/jni_test.cc",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700672 "004-ReferenceMap/stack_walk_refmap_jni.cc",
Roland Levillainad0777d2018-02-12 20:00:18 +0000673 "004-SignalTest/signaltest.cc",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700674 "004-StackWalk/stack_walk_jni.cc",
675 "004-ThreadStress/thread_stress.cc",
676 "004-UnsafeTest/unsafe_test.cc",
677 "044-proxy/native_proxy.cc",
678 "051-thread/thread_test.cc",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700679 "1337-gc-coverage/gc_coverage.cc",
680 "136-daemon-jni-shutdown/daemon_jni_shutdown.cc",
681 "137-cfi/cfi.cc",
682 "139-register-natives/regnative.cc",
683 "141-class-unload/jni_unload.cc",
684 "148-multithread-gc-annotations/gc_coverage.cc",
685 "149-suspend-all-stress/suspend_all.cc",
Mathieu Chartier72a32892017-01-24 09:40:56 -0800686 "154-gc-loop/heap_interface.cc",
Andreas Gampeaaf0d382017-11-27 14:10:21 -0800687 "167-visit-locks/visit_locks.cc",
Andreas Gampe56776012018-01-26 17:40:55 -0800688 "169-threadgroup-jni/jni_daemon_thread.cc",
Mathieu Chartieradc90862018-05-11 13:03:06 -0700689 "172-app-image-twice/debug_print_class.cc",
Vladimir Marko422a9eb2019-08-01 12:54:07 +0100690 "177-visibly-initialized-deadlock/visibly_initialized.cc",
Vladimir Marko7dac8642019-11-06 17:09:30 +0000691 "178-app-image-native-method/native_methods.cc",
Alex Lighta2efd2a2020-05-19 09:44:49 -0700692 "179-nonvirtual-jni/nonvirtual-call.cc",
Roland Levillainad0777d2018-02-12 20:00:18 +0000693 "1945-proxy-method-arguments/get_args.cc",
Andreas Gampeaaf0d382017-11-27 14:10:21 -0800694 "203-multi-checkpoint/multi_checkpoint.cc",
Alex Lightf4ed7e82018-01-17 11:52:36 -0800695 "305-other-fault-handler/fault_handler.cc",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700696 "454-get-vreg/get_vreg_jni.cc",
697 "457-regs/regs_jni.cc",
698 "461-get-reference-vreg/get_reference_vreg_jni.cc",
699 "466-get-live-vreg/get_live_vreg_jni.cc",
700 "497-inlining-and-class-loader/clear_dex_cache.cc",
701 "543-env-long-ref/env_long_ref.cc",
702 "566-polymorphic-inlining/polymorphic_inline.cc",
703 "570-checker-osr/osr.cc",
704 "595-profile-saving/profile-saving.cc",
705 "596-app-images/app_images.cc",
Hans Boehm6fe97e02016-05-04 18:35:57 -0700706 "596-monitor-inflation/monitor_inflation.cc",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700707 "597-deopt-new-string/deopt.cc",
Alexey Grebenkinbe4c2bd2018-02-01 19:09:59 +0300708 "616-cha-unloading/cha_unload.cc",
Vladimir Markoc5798bf2016-12-09 10:20:54 +0000709 "626-const-class-linking/clear_dex_cache_types.cc",
Nicolas Geoffray13a797b2017-03-15 16:41:31 +0000710 "642-fp-callees/fp_callees.cc",
Vladimir Marko5fdd7782017-04-20 11:26:03 +0100711 "647-jni-get-field-id/get_field_id.cc",
Roland Levillain0d2323e2017-06-26 18:14:39 +0100712 "656-annotation-lookup-generic-jni/test.cc",
Igor Murashkin545412b2017-08-17 15:26:54 -0700713 "661-oat-writer-layout/oat_writer_layout.cc",
714 "664-aget-verifier/aget-verifier.cc",
Vladimir Marko2196c652017-11-30 16:16:07 +0000715 "667-jit-jni-stub/jit_jni_stub_test.cc",
David Brazdil11b67b22018-01-18 16:41:40 +0000716 "674-hiddenapi/hiddenapi.cc",
David Brazdil331a5e12019-04-01 22:46:16 +0000717 "692-vdex-inmem-loader/vdex_inmem_loader.cc",
Dan Willemsen2ca27802017-09-27 14:57:43 -0700718 "708-jit-cache-churn/jit.cc",
Nicolas Geoffrayfa595882019-08-06 17:40:09 +0100719 "720-thread-priority/thread_priority.cc",
Alexey Grebenkince750492018-05-31 23:42:20 +0300720 "800-smali/jni.cc",
Nicolas Geoffrayaf61f502021-03-31 16:03:50 +0000721 "817-hiddenapi/test_native.cc",
Alex Lightf889c702018-02-23 15:25:45 -0800722 "909-attach-agent/disallow_debugging.cc",
Mathieu Chartier00fbe4f2019-01-02 16:52:38 -0800723 "1001-app-image-regions/app_image_regions.cc",
Mathieu Chartier175ce3d2019-03-06 16:54:24 -0800724 "1002-notify-startup/startup_interface.cc",
Alex Lighte34fe442018-02-21 17:35:55 -0800725 "1947-breakpoint-redefine-deopt/check_deopt.cc",
Alex Lightf3677472019-06-26 16:31:53 -0700726 "1972-jni-id-swap-indices/jni_id.cc",
Alex Light55eccdf2019-10-07 13:51:13 +0000727 "1985-structural-redefine-stack-scope/stack_scope.cc",
Nicolas Geoffraye91e7952020-01-23 10:15:56 +0000728 "2011-stack-walk-concurrent-instrument/stack_walk_concurrent.cc",
Alex Light280e6c32020-03-03 13:52:07 -0800729 "2031-zygote-compiled-frame-deopt/native-wait.cc",
Hans Boehm672295a2020-04-16 21:31:17 -0700730 "2033-shutdown-mechanics/native_shutdown.cc",
Orion Hodson7285a4b2020-07-10 13:31:35 +0100731 "2036-jni-filechannel/jni_filechannel.cc",
Alex Light8d9c6042020-09-22 15:35:59 -0700732 "2037-thread-name-inherit/thread_name_inherit.cc",
Roland Levillainad0777d2018-02-12 20:00:18 +0000733 "common/runtime_state.cc",
734 "common/stack_inspect.cc",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700735 ],
736 shared_libs: [
737 "libbacktrace",
Andreas Gampe3fec9ac2016-09-13 10:47:28 -0700738 "libbase",
Orion Hodsonfcc922a2021-05-21 11:32:33 +0100739 "liblog",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700740 "libnativehelper",
741 ],
Colin Crossafd3c9e2016-09-16 13:47:21 -0700742}
743
Paul Duffin2506eff2020-04-07 11:32:24 +0100744java_library {
Sasha Smundakc7c5d532019-02-27 15:03:37 -0800745 name: "art_cts_jvmti_test_library",
Martin Stjernholmb4abe0a2019-05-17 19:22:55 +0100746 visibility: [
Paul Duffincc9df4f2020-08-13 14:57:41 +0100747 "//art:__subpackages__",
Martin Stjernholmb4abe0a2019-05-17 19:22:55 +0100748 "//cts/hostsidetests/jvmti:__subpackages__",
749 ],
Sasha Smundakc7c5d532019-02-27 15:03:37 -0800750 srcs: [
751 // shim classes. We use one that exposes the common functionality.
Alex Light23ca8fb2019-05-10 11:27:02 -0700752 "jvmti-common/Redefinition.java",
753 "jvmti-common/Main.java",
754 "jvmti-common/Trace.java",
755 "jvmti-common/Breakpoint.java",
756 "jvmti-common/Suspension.java",
757 "jvmti-common/Locals.java",
758 "jvmti-common/StackTrace.java",
759 "jvmti-common/FramePop.java",
760 "jvmti-common/Exceptions.java",
761 "jvmti-common/Monitors.java",
Alex Lightfe0ce642020-01-07 13:14:18 -0800762 "jvmti-common/NonStandardExit.java",
Alex Light23ca8fb2019-05-10 11:27:02 -0700763 "jvmti-common/Threads.java",
764 "jvmti-common/SuspendEvents.java",
Sasha Smundakc7c5d532019-02-27 15:03:37 -0800765
766 // Actual test classes.
767 "901-hello-ti-agent/src/art/Test901.java",
768 "902-hello-transformation/src/art/Test902.java",
769 "903-hello-tagging/src/art/Test903.java",
770 "904-object-allocation/src/art/Test904.java",
771 "905-object-free/src/art/Test905.java",
772 "906-iterate-heap/src/art/Test906.java",
773 "907-get-loaded-classes/src/art/Test907.java",
774 "907-get-loaded-classes/src/art/Cerr.java",
775 "908-gc-start-finish/src/art/Test908.java",
776 "910-methods/src/art/Test910.java",
777 "911-get-stack-trace/src/art/Test911.java",
778 "911-get-stack-trace/src/art/AllTraces.java",
779 "911-get-stack-trace/src/art/ControlData.java",
780 "911-get-stack-trace/src/art/Frames.java",
781 "911-get-stack-trace/src/art/OtherThread.java",
782 "911-get-stack-trace/src/art/PrintThread.java",
783 "911-get-stack-trace/src/art/Recurse.java",
784 "911-get-stack-trace/src/art/SameThread.java",
785 "911-get-stack-trace/src/art/ThreadListTraces.java",
786 "912-classes/src-art/art/Test912.java",
787 "912-classes/src-art/art/DexData.java",
788 "913-heaps/src/art/Test913.java",
789 "914-hello-obsolescence/src/art/Test914.java",
790 "915-obsolete-2/src/art/Test915.java",
791 "917-fields-transformation/src/art/Test917.java",
792 "918-fields/src/art/Test918.java",
793 "919-obsolete-fields/src/art/Test919.java",
794 "920-objects/src/art/Test920.java",
795 "922-properties/src/art/Test922.java",
796 "923-monitors/src/art/Test923.java",
797 "924-threads/src/art/Test924.java",
798 "925-threadgroups/src/art/Test925.java",
799 "926-multi-obsolescence/src/art/Test926.java",
800 "927-timers/src/art/Test927.java",
801 "928-jni-table/src/art/Test928.java",
802 "930-hello-retransform/src/art/Test930.java",
803 "931-agent-thread/src/art/Test931.java",
804 "932-transform-saves/src/art/Test932.java",
805 "933-misc-events/src/art/Test933.java",
806 "940-recursive-obsolete/src/art/Test940.java",
807 "942-private-recursive/src/art/Test942.java",
808 "944-transform-classloaders/src/art/Test944.java",
809 "945-obsolete-native/src/art/Test945.java",
810 "947-reflect-method/src/art/Test947.java",
811 "951-threaded-obsolete/src/art/Test951.java",
812 "982-ok-no-retransform/src/art/Test982.java",
813 "983-source-transform-verify/src/art/Test983.java",
814 "984-obsolete-invoke/src/art/Test984.java",
815 "985-re-obsolete/src/art/Test985.java",
816 "986-native-method-bind/src/art/Test986.java",
817 "988-method-trace/src/art/Test988.java",
818 "988-method-trace/src/art/Test988Intrinsics.java",
819 "989-method-trace-throw/src/art/Test989.java",
820 "990-field-trace/src/art/Test990.java",
821 "991-field-trace-2/src/art/Test991.java",
822 "992-source-data/src/art/Test992.java",
823 "992-source-data/src/art/Target2.java",
824 "993-breakpoints/src/art/Test993.java",
825 "994-breakpoint-line/src/art/Test994.java",
826 "995-breakpoints-throw/src/art/Test995.java",
827 "996-breakpoint-obsolete/src/art/Test996.java",
828 "997-single-step/src/art/Test997.java",
829 "1900-track-alloc/src/art/Test1900.java",
830 "1901-get-bytecodes/src/art/Test1901.java",
831 "1902-suspend/src/art/Test1902.java",
832 "1903-suspend-self/src/art/Test1903.java",
833 "1904-double-suspend/src/art/Test1904.java",
834 "1906-suspend-list-me-first/src/art/Test1906.java",
835 "1907-suspend-list-self-twice/src/art/Test1907.java",
836 "1908-suspend-native-resume-self/src/art/Test1908.java",
837 "1909-per-agent-tls/src/art/Test1909.java",
838 "1910-transform-with-default/src/art/Test1910.java",
839 "1911-get-local-var-table/src/art/Test1911.java",
840 "1912-get-set-local-primitive/src/art/Test1912.java",
841 "1913-get-set-local-objects/src/art/Test1913.java",
842 "1914-get-local-instance/src/art/Test1914.java",
843 "1915-get-set-local-current-thread/src/art/Test1915.java",
844 "1916-get-set-current-frame/src/art/Test1916.java",
845 "1917-get-stack-frame/src/art/Test1917.java",
846 "1920-suspend-native-monitor/src/art/Test1920.java",
847 "1921-suspend-native-recursive-monitor/src/art/Test1921.java",
848 "1922-owned-monitors-info/src/art/Test1922.java",
849 "1923-frame-pop/src/art/Test1923.java",
850 "1924-frame-pop-toggle/src/art/Test1924.java",
851 "1925-self-frame-pop/src/art/Test1925.java",
852 "1926-missed-frame-pop/src/art/Test1926.java",
853 "1927-exception-event/src/art/Test1927.java",
854 "1928-exception-event-exception/src/art/Test1928.java",
855 "1930-monitor-info/src/art/Test1930.java",
856 "1931-monitor-events/src/art/Test1931.java",
857 "1932-monitor-events-misc/src/art/Test1932.java",
858 "1933-monitor-current-contended/src/art/Test1933.java",
859 "1934-jvmti-signal-thread/src/art/Test1934.java",
860 "1936-thread-end-events/src/art/Test1936.java",
861 "1937-transform-soft-fail/src/art/Test1937.java",
862 "1939-proxy-frames/src/art/Test1939.java",
863 "1941-dispose-stress/src/art/Test1941.java",
864 "1942-suspend-raw-monitor-exit/src/art/Test1942.java",
865 "1943-suspend-raw-monitor-wait/src/art/Test1943.java",
866 "1953-pop-frame/src/art/Test1953.java",
867 "1958-transform-try-jit/src/art/Test1958.java",
Alex Light40607862019-05-06 18:16:24 +0000868 "1962-multi-thread-events/src/art/Test1962.java",
Alex Lightfe0ce642020-01-07 13:14:18 -0800869 "1963-add-to-dex-classloader-in-memory/src/art/Test1963.java",
870 "1967-get-set-local-bad-slot/src/art/Test1967.java",
871 "1968-force-early-return/src/art/Test1968.java",
872 "1969-force-early-return-void/src/art/Test1969.java",
873 "1970-force-early-return-long/src/art/Test1970.java",
874 "1971-multi-force-early-return/src/art/Test1971.java",
875 "1974-resize-array/src/art/Test1974.java",
876 "1975-hello-structural-transformation/src/art/Test1975.java",
877 "1975-hello-structural-transformation/src/art/Transform1975.java",
878 "1976-hello-structural-static-methods/src/art/Test1976.java",
879 "1976-hello-structural-static-methods/src/art/Transform1976.java",
880 "1977-hello-structural-obsolescence/src/art/Test1977.java",
881 "1978-regular-obsolete-then-structural-obsolescence/src/art/Test1978.java",
882 "1979-threaded-structural-transformation/src/art/Test1979.java",
883 "1981-structural-redef-private-method-handles/src/art/Test1981.java",
884 // TODO Requires VarHandles to be un-@hide. See b/64382372
885 // "1981-structural-redef-private-method-handles/src/art/Test1981_Varhandles.java",
886 "1982-no-virtuals-structural-redefinition/src/art/Test1982.java",
887 "1983-structural-redefinition-failures/src/art/Test1983.java",
888 "1984-structural-redefine-field-trace/src/art/Test1984.java",
889 "1988-multi-structural-redefine/src/art/Test1988.java",
890 "1989-transform-bad-monitor/src/art/Test1989.java",
891 "1990-structural-bad-verify/src/art/Test1990.java",
892 "1991-hello-structural-retransform/src/art/Test1991.java",
893 "1992-retransform-no-such-field/src/art/Test1992.java",
894 "1994-final-virtual-structural/src/art/Test1994.java",
895 "1995-final-virtual-structural-multithread/src/art/Test1995.java",
896 "1996-final-override-virtual-structural/src/art/Test1996.java",
897 "1997-structural-shadow-method/src/art/Test1997.java",
898 "1998-structural-shadow-field/src/art/Test1998.java",
899 "1999-virtual-structural/src/art/Test1999.java",
900 "2001-virtual-structural-multithread/src-art/art/Test2001.java",
901 "2002-virtual-structural-initializing/src-art/art/Test2002.java",
902 "2003-double-virtual-structural/src/art/Test2003.java",
903 "2004-double-virtual-structural-abstract/src/art/Test2004.java",
904 "2005-pause-all-redefine-multithreaded/src/art/Test2005.java",
905 "2006-virtual-structural-finalizing/src-art/art/Test2006.java",
906 "2007-virtual-structural-finalizable/src-art/art/Test2007.java",
Sasha Smundakc7c5d532019-02-27 15:03:37 -0800907 ],
Paul Duffin463d03e2020-10-21 21:38:58 +0100908 sdk_version: "core_platform",
Sasha Smundakc7c5d532019-02-27 15:03:37 -0800909}
910
911// CTS test runner in cts/hostsidetests/jvmti looks for an expected test
912// result for the test NN in the file results.NN.expected.txt while in the
Roland Levillaina073f462020-10-28 12:48:24 +0000913// source tree each expected test result is in the NN-xxxx/expected-stdout.txt.
Sasha Smundakc7c5d532019-02-27 15:03:37 -0800914// Copy+rename them them to a temporary directory and them zip them.
915java_genrule {
Paul Duffine5621f52020-03-25 10:51:14 +0000916 name: "expected_cts_outputs_gen",
Sasha Smundakc7c5d532019-02-27 15:03:37 -0800917 srcs: [
Roland Levillaina073f462020-10-28 12:48:24 +0000918 "901-hello-ti-agent/expected-stdout.txt",
919 "902-hello-transformation/expected-stdout.txt",
920 "903-hello-tagging/expected-stdout.txt",
921 "904-object-allocation/expected-stdout.txt",
922 "905-object-free/expected-stdout.txt",
923 "906-iterate-heap/expected-stdout.txt",
924 "907-get-loaded-classes/expected-stdout.txt",
925 "908-gc-start-finish/expected-stdout.txt",
926 "910-methods/expected-stdout.txt",
Alex Light4681f202020-01-10 09:27:57 -0800927 "911-get-stack-trace/expected-cts-version.txt",
Roland Levillaina073f462020-10-28 12:48:24 +0000928 "912-classes/expected-stdout.txt",
929 "913-heaps/expected-stdout.txt",
930 "914-hello-obsolescence/expected-stdout.txt",
931 "915-obsolete-2/expected-stdout.txt",
932 "917-fields-transformation/expected-stdout.txt",
933 "918-fields/expected-stdout.txt",
934 "919-obsolete-fields/expected-stdout.txt",
935 "920-objects/expected-stdout.txt",
936 "922-properties/expected-stdout.txt",
937 "923-monitors/expected-stdout.txt",
938 "924-threads/expected-stdout.txt",
939 "925-threadgroups/expected-stdout.txt",
940 "926-multi-obsolescence/expected-stdout.txt",
941 "927-timers/expected-stdout.txt",
942 "928-jni-table/expected-stdout.txt",
943 "930-hello-retransform/expected-stdout.txt",
944 "931-agent-thread/expected-stdout.txt",
945 "932-transform-saves/expected-stdout.txt",
946 "933-misc-events/expected-stdout.txt",
947 "940-recursive-obsolete/expected-stdout.txt",
948 "942-private-recursive/expected-stdout.txt",
949 "944-transform-classloaders/expected-stdout.txt",
950 "945-obsolete-native/expected-stdout.txt",
951 "947-reflect-method/expected-stdout.txt",
952 "951-threaded-obsolete/expected-stdout.txt",
953 "982-ok-no-retransform/expected-stdout.txt",
954 "983-source-transform-verify/expected-stdout.txt",
955 "984-obsolete-invoke/expected-stdout.txt",
956 "985-re-obsolete/expected-stdout.txt",
957 "986-native-method-bind/expected-stdout.txt",
958 "988-method-trace/expected-stdout.txt",
959 "989-method-trace-throw/expected-stdout.txt",
960 "990-field-trace/expected-stdout.txt",
961 "991-field-trace-2/expected-stdout.txt",
962 "992-source-data/expected-stdout.txt",
Alex Light2b8d3c82020-11-03 11:52:40 -0800963 // Need to avoid using hidden-apis
964 "993-breakpoints/expected_cts.txt",
Roland Levillaina073f462020-10-28 12:48:24 +0000965 "994-breakpoint-line/expected-stdout.txt",
966 "995-breakpoints-throw/expected-stdout.txt",
967 "996-breakpoint-obsolete/expected-stdout.txt",
968 "997-single-step/expected-stdout.txt",
969 "1900-track-alloc/expected-stdout.txt",
970 "1901-get-bytecodes/expected-stdout.txt",
971 "1902-suspend/expected-stdout.txt",
972 "1903-suspend-self/expected-stdout.txt",
973 "1904-double-suspend/expected-stdout.txt",
974 "1906-suspend-list-me-first/expected-stdout.txt",
975 "1907-suspend-list-self-twice/expected-stdout.txt",
976 "1908-suspend-native-resume-self/expected-stdout.txt",
977 "1909-per-agent-tls/expected-stdout.txt",
978 "1910-transform-with-default/expected-stdout.txt",
979 "1911-get-local-var-table/expected-stdout.txt",
980 "1912-get-set-local-primitive/expected-stdout.txt",
981 "1913-get-set-local-objects/expected-stdout.txt",
982 "1914-get-local-instance/expected-stdout.txt",
983 "1915-get-set-local-current-thread/expected-stdout.txt",
984 "1916-get-set-current-frame/expected-stdout.txt",
985 "1917-get-stack-frame/expected-stdout.txt",
986 "1920-suspend-native-monitor/expected-stdout.txt",
987 "1921-suspend-native-recursive-monitor/expected-stdout.txt",
988 "1922-owned-monitors-info/expected-stdout.txt",
989 "1923-frame-pop/expected-stdout.txt",
990 "1924-frame-pop-toggle/expected-stdout.txt",
991 "1925-self-frame-pop/expected-stdout.txt",
992 "1926-missed-frame-pop/expected-stdout.txt",
993 "1927-exception-event/expected-stdout.txt",
994 "1928-exception-event-exception/expected-stdout.txt",
995 "1930-monitor-info/expected-stdout.txt",
996 "1931-monitor-events/expected-stdout.txt",
997 "1932-monitor-events-misc/expected-stdout.txt",
998 "1933-monitor-current-contended/expected-stdout.txt",
999 "1934-jvmti-signal-thread/expected-stdout.txt",
1000 "1936-thread-end-events/expected-stdout.txt",
1001 "1937-transform-soft-fail/expected-stdout.txt",
1002 "1939-proxy-frames/expected-stdout.txt",
1003 "1941-dispose-stress/expected-stdout.txt",
1004 "1942-suspend-raw-monitor-exit/expected-stdout.txt",
1005 "1943-suspend-raw-monitor-wait/expected-stdout.txt",
1006 "1953-pop-frame/expected-stdout.txt",
1007 "1958-transform-try-jit/expected-stdout.txt",
1008 "1962-multi-thread-events/expected-stdout.txt",
1009 "1963-add-to-dex-classloader-in-memory/expected-stdout.txt",
1010 "1967-get-set-local-bad-slot/expected-stdout.txt",
1011 "1968-force-early-return/expected-stdout.txt",
1012 "1969-force-early-return-void/expected-stdout.txt",
1013 "1970-force-early-return-long/expected-stdout.txt",
1014 "1971-multi-force-early-return/expected-stdout.txt",
1015 "1974-resize-array/expected-stdout.txt",
1016 "1975-hello-structural-transformation/expected-stdout.txt",
1017 "1976-hello-structural-static-methods/expected-stdout.txt",
1018 "1977-hello-structural-obsolescence/expected-stdout.txt",
1019 "1978-regular-obsolete-then-structural-obsolescence/expected-stdout.txt",
1020 "1979-threaded-structural-transformation/expected-stdout.txt",
Alex Lightfe0ce642020-01-07 13:14:18 -08001021 // TODO Requires VarHandles to be un-@hide. See b/64382372
Roland Levillaina073f462020-10-28 12:48:24 +00001022 // "test/1981-structural-redef-private-method-handles/expected-stdout.txt",
Alex Lightfe0ce642020-01-07 13:14:18 -08001023 "1981-structural-redef-private-method-handles/expected_no_mh.txt",
Roland Levillaina073f462020-10-28 12:48:24 +00001024 "1982-no-virtuals-structural-redefinition/expected-stdout.txt",
Alex Light5c7f3672020-01-27 15:23:30 -08001025 // JNI-id use can change the outcome of this test on device.
1026 "1983-structural-redefinition-failures/expected-cts.txt",
Roland Levillaina073f462020-10-28 12:48:24 +00001027 "1984-structural-redefine-field-trace/expected-stdout.txt",
1028 "1988-multi-structural-redefine/expected-stdout.txt",
1029 "1989-transform-bad-monitor/expected-stdout.txt",
1030 "1990-structural-bad-verify/expected-stdout.txt",
1031 "1991-hello-structural-retransform/expected-stdout.txt",
1032 "1992-retransform-no-such-field/expected-stdout.txt",
1033 "1994-final-virtual-structural/expected-stdout.txt",
1034 "1995-final-virtual-structural-multithread/expected-stdout.txt",
1035 "1996-final-override-virtual-structural/expected-stdout.txt",
1036 "1997-structural-shadow-method/expected-stdout.txt",
1037 "1998-structural-shadow-field/expected-stdout.txt",
1038 "1999-virtual-structural/expected-stdout.txt",
1039 "2001-virtual-structural-multithread/expected-stdout.txt",
1040 "2002-virtual-structural-initializing/expected-stdout.txt",
1041 "2003-double-virtual-structural/expected-stdout.txt",
1042 "2004-double-virtual-structural-abstract/expected-stdout.txt",
1043 "2005-pause-all-redefine-multithreaded/expected-stdout.txt",
1044 "2006-virtual-structural-finalizing/expected-stdout.txt",
1045 "2007-virtual-structural-finalizable/expected-stdout.txt",
Sasha Smundakc7c5d532019-02-27 15:03:37 -08001046 ],
1047 out: ["expected_cts_outputs.jar"],
1048 tools: ["soong_zip"],
1049 cmd: "rm -rf $(genDir)/res && mkdir -p $(genDir)/res && " +
1050 "for f in $(in); do x=$${f#art/test/}; " +
1051 "cp $$f $(genDir)/res/results.$${x%%-*}.expected.txt; done && " +
1052 "$(location soong_zip) -o $(out) -C $(genDir)/res -D $(genDir)/res",
1053}
David Srbecky8c8f1482020-02-05 20:17:10 +00001054
Paul Duffine5621f52020-03-25 10:51:14 +00001055// Wrap the expected_cts_outputs_gen inside a java library to make it easy
1056// to export as a member of a module_exports.
1057java_library {
1058 name: "expected_cts_outputs",
1059 visibility: [
1060 "//art/build/sdk",
1061 "//cts/hostsidetests/jvmti:__subpackages__",
1062 ],
1063 static_libs: [
1064 "expected_cts_outputs_gen",
1065 ],
1066 sdk_version: "core_current",
1067}
1068
David Srbeckyee257162020-02-28 15:50:13 +00001069art_cc_test {
David Srbeckyf61e0612020-08-14 16:13:35 +01001070 name: "ArtGtestsTargetInstallApex",
Martin Stjernholm90b26612021-03-03 09:49:27 +00001071 defaults: [
1072 // Enable only in source builds, where com.android.art.testing is
1073 // available.
1074 "art_module_source_build_defaults",
1075 ],
David Srbeckyee257162020-02-28 15:50:13 +00001076 data: [
1077 // We need the ART testing apex, which contains all gtest binaries.
David Srbeckyf61e0612020-08-14 16:13:35 +01001078 // Note that due to build system and linker constraints the gtests must be in the apex.
David Srbeckyee257162020-02-28 15:50:13 +00001079 ":com.android.art.testing",
David Srbeckyee257162020-02-28 15:50:13 +00001080 ],
David Srbeckyf61e0612020-08-14 16:13:35 +01001081 // It seems that only device-tests build can create a valid apex.
Roland Levillain423aefc2020-09-01 18:42:22 +01001082 test_suites: [
1083 "device-tests",
Kimberly Kreider284e8b02020-12-15 09:40:30 -08001084 "mts-art",
Roland Levillain423aefc2020-09-01 18:42:22 +01001085 ],
David Srbeckyf61e0612020-08-14 16:13:35 +01001086 test_config: "art-gtests-target-install-apex.xml",
Roland Levillain423aefc2020-09-01 18:42:22 +01001087
1088 // Support multilib variants (using different suffix per sub-architecture), which is needed on
1089 // build targets with secondary architectures, as the MTS test suite packaging logic flattens
1090 // all test artifacts into a single `testcases` directory.
1091 compile_multilib: "both",
1092 multilib: {
1093 lib32: {
1094 suffix: "32",
1095 },
1096 lib64: {
1097 suffix: "64",
1098 },
1099 },
Martin Stjernholmd3e9ff32021-03-16 00:44:25 +00001100 test_for: [
1101 "com.android.art",
1102 "com.android.art.debug",
1103 ],
David Srbeckyf61e0612020-08-14 16:13:35 +01001104}
1105
1106art_cc_test {
1107 name: "ArtGtestsTargetChroot",
Martin Stjernholm90b26612021-03-03 09:49:27 +00001108 defaults: [
1109 // Enable only in source builds, where com.android.art.testing is
1110 // available.
1111 "art_module_source_build_defaults",
1112 ],
David Srbeckyf61e0612020-08-14 16:13:35 +01001113 data: [
1114 // We need the ART testing apex, which contains all gtest binaries.
1115 // Note that due to build system and linker constraints the gtests must be in the apex.
1116 ":com.android.art.testing",
1117 ],
1118 test_suites: ["general-tests"],
1119 test_config: "art-gtests-target-chroot.xml",
Martin Stjernholmd3e9ff32021-03-16 00:44:25 +00001120 test_for: [
1121 "com.android.art",
1122 "com.android.art.debug",
1123 ],
David Srbeckyee257162020-02-28 15:50:13 +00001124}
1125
David Srbecky8c8f1482020-02-05 20:17:10 +00001126filegroup {
1127 name: "art-gtest-jars",
1128 srcs: [
1129 ":art-gtest-jars-AbstractMethod",
1130 ":art-gtest-jars-AllFields",
1131 ":art-gtest-jars-DefaultMethods",
1132 ":art-gtest-jars-DexToDexDecompiler",
1133 ":art-gtest-jars-ErroneousA",
1134 ":art-gtest-jars-ErroneousB",
1135 ":art-gtest-jars-ErroneousInit",
Vladimir Markofdd46842020-03-25 14:57:17 +00001136 ":art-gtest-jars-Extension1",
1137 ":art-gtest-jars-Extension2",
David Srbecky8c8f1482020-02-05 20:17:10 +00001138 ":art-gtest-jars-ForClassLoaderA",
1139 ":art-gtest-jars-ForClassLoaderB",
1140 ":art-gtest-jars-ForClassLoaderC",
1141 ":art-gtest-jars-ForClassLoaderD",
1142 ":art-gtest-jars-ExceptionHandle",
1143 ":art-gtest-jars-GetMethodSignature",
1144 ":art-gtest-jars-HiddenApi",
1145 ":art-gtest-jars-HiddenApiSignatures",
1146 ":art-gtest-jars-HiddenApiStubs",
1147 ":art-gtest-jars-ImageLayoutA",
1148 ":art-gtest-jars-ImageLayoutB",
1149 ":art-gtest-jars-IMTA",
1150 ":art-gtest-jars-IMTB",
1151 ":art-gtest-jars-Instrumentation",
1152 ":art-gtest-jars-Interfaces",
1153 ":art-gtest-jars-Lookup",
1154 ":art-gtest-jars-Main",
1155 ":art-gtest-jars-ManyMethods",
1156 ":art-gtest-jars-MethodTypes",
1157 ":art-gtest-jars-MultiDex",
1158 ":art-gtest-jars-MultiDexModifiedSecondary",
1159 ":art-gtest-jars-MyClass",
1160 ":art-gtest-jars-MyClassNatives",
1161 ":art-gtest-jars-Nested",
1162 ":art-gtest-jars-NonStaticLeafMethods",
1163 ":art-gtest-jars-Packages",
1164 ":art-gtest-jars-ProtoCompare",
1165 ":art-gtest-jars-ProtoCompare2",
1166 ":art-gtest-jars-ProfileTestMultiDex",
1167 ":art-gtest-jars-StaticLeafMethods",
1168 ":art-gtest-jars-Statics",
1169 ":art-gtest-jars-StaticsFromCode",
1170 ":art-gtest-jars-StringLiterals",
1171 ":art-gtest-jars-Transaction",
1172 ":art-gtest-jars-XandY",
1173 ":art-gtest-jars-MainEmptyUncompressed",
1174 ":art-gtest-jars-MainEmptyUncompressedAligned",
1175 ":art-gtest-jars-MainStripped",
1176 ":art-gtest-jars-MainUncompressedAligned",
1177 ":art-gtest-jars-MultiDexUncompressedAligned",
1178 ":art-gtest-jars-VerifierDeps",
1179 ":art-gtest-jars-VerifierDepsMulti",
1180 ":art-gtest-jars-VerifySoftFailDuringClinit",
1181 ],
1182}
1183
1184java_defaults {
1185 name: "art-gtest-jars-defaults",
1186 installable: true,
1187 dex_preopt: {
1188 enabled: false,
1189 },
1190 sdk_version: "core_platform",
David Srbecky4a88a5a2020-05-05 16:21:57 +01001191 uncompress_dex: false,
David Srbecky8c8f1482020-02-05 20:17:10 +00001192}
1193
1194// The following modules are just trivial compilations (non-trivial cases are the end).
1195
1196java_library {
1197 name: "art-gtest-jars-AbstractMethod",
1198 srcs: ["AbstractMethod/**/*.java"],
1199 defaults: ["art-gtest-jars-defaults"],
1200}
1201
1202java_library {
1203 name: "art-gtest-jars-AllFields",
1204 srcs: ["AllFields/**/*.java"],
1205 defaults: ["art-gtest-jars-defaults"],
1206}
1207
1208java_library {
1209 name: "art-gtest-jars-DefaultMethods",
1210 srcs: ["DefaultMethods/**/*.java"],
1211 defaults: ["art-gtest-jars-defaults"],
1212}
1213
1214java_library {
1215 name: "art-gtest-jars-DexToDexDecompiler",
1216 srcs: ["DexToDexDecompiler/**/*.java"],
1217 defaults: ["art-gtest-jars-defaults"],
1218}
1219
1220java_library {
1221 name: "art-gtest-jars-ErroneousA",
1222 srcs: ["ErroneousA/**/*.java"],
1223 defaults: ["art-gtest-jars-defaults"],
1224}
1225
1226java_library {
1227 name: "art-gtest-jars-ErroneousB",
1228 srcs: ["ErroneousB/**/*.java"],
1229 defaults: ["art-gtest-jars-defaults"],
1230}
1231
1232java_library {
1233 name: "art-gtest-jars-ErroneousInit",
1234 srcs: ["ErroneousInit/**/*.java"],
1235 defaults: ["art-gtest-jars-defaults"],
1236}
1237
1238java_library {
Vladimir Markofdd46842020-03-25 14:57:17 +00001239 name: "art-gtest-jars-Extension1",
1240 srcs: ["Extension1/**/*.java"],
1241 defaults: ["art-gtest-jars-defaults"],
1242}
1243
1244java_library {
1245 name: "art-gtest-jars-Extension2",
1246 srcs: ["Extension2/**/*.java"],
1247 defaults: ["art-gtest-jars-defaults"],
1248}
1249
1250java_library {
David Srbecky8c8f1482020-02-05 20:17:10 +00001251 name: "art-gtest-jars-ForClassLoaderA",
1252 srcs: ["ForClassLoaderA/**/*.java"],
1253 defaults: ["art-gtest-jars-defaults"],
1254}
1255
1256java_library {
1257 name: "art-gtest-jars-ForClassLoaderB",
1258 srcs: ["ForClassLoaderB/**/*.java"],
1259 defaults: ["art-gtest-jars-defaults"],
1260}
1261
1262java_library {
1263 name: "art-gtest-jars-ForClassLoaderC",
1264 srcs: ["ForClassLoaderC/**/*.java"],
1265 defaults: ["art-gtest-jars-defaults"],
1266}
1267
1268java_library {
1269 name: "art-gtest-jars-ForClassLoaderD",
1270 srcs: ["ForClassLoaderD/**/*.java"],
1271 defaults: ["art-gtest-jars-defaults"],
1272}
1273
1274java_library {
1275 name: "art-gtest-jars-ExceptionHandle",
1276 srcs: ["ExceptionHandle/**/*.java"],
1277 defaults: ["art-gtest-jars-defaults"],
1278}
1279
1280java_library {
1281 name: "art-gtest-jars-GetMethodSignature",
1282 srcs: ["GetMethodSignature/**/*.java"],
1283 defaults: ["art-gtest-jars-defaults"],
1284}
1285
1286java_library {
1287 name: "art-gtest-jars-HiddenApi",
1288 srcs: ["HiddenApi/**/*.java"],
1289 defaults: ["art-gtest-jars-defaults"],
1290}
1291
1292java_library {
1293 name: "art-gtest-jars-HiddenApiSignatures",
1294 srcs: ["HiddenApiSignatures/**/*.java"],
1295 defaults: ["art-gtest-jars-defaults"],
1296}
1297
1298java_library {
1299 name: "art-gtest-jars-HiddenApiStubs",
1300 srcs: ["HiddenApiStubs/**/*.java"],
1301 defaults: ["art-gtest-jars-defaults"],
1302}
1303
1304java_library {
1305 name: "art-gtest-jars-ImageLayoutA",
1306 srcs: ["ImageLayoutA/**/*.java"],
1307 defaults: ["art-gtest-jars-defaults"],
1308}
1309
1310java_library {
1311 name: "art-gtest-jars-ImageLayoutB",
1312 srcs: ["ImageLayoutB/**/*.java"],
1313 defaults: ["art-gtest-jars-defaults"],
1314}
1315
1316java_library {
1317 name: "art-gtest-jars-IMTA",
1318 srcs: ["IMTA/**/*.java"],
1319 defaults: ["art-gtest-jars-defaults"],
1320}
1321
1322java_library {
1323 name: "art-gtest-jars-IMTB",
1324 srcs: ["IMTB/**/*.java"],
1325 defaults: ["art-gtest-jars-defaults"],
1326}
1327
1328java_library {
1329 name: "art-gtest-jars-Instrumentation",
1330 srcs: ["Instrumentation/**/*.java"],
1331 defaults: ["art-gtest-jars-defaults"],
1332}
1333
1334java_library {
1335 name: "art-gtest-jars-Interfaces",
1336 srcs: ["Interfaces/**/*.java"],
1337 defaults: ["art-gtest-jars-defaults"],
1338}
1339
1340java_library {
1341 name: "art-gtest-jars-Lookup",
1342 srcs: ["Lookup/**/*.java"],
1343 defaults: ["art-gtest-jars-defaults"],
1344}
1345
1346java_library {
1347 name: "art-gtest-jars-Main",
1348 srcs: ["Main/**/*.java"],
1349 defaults: ["art-gtest-jars-defaults"],
1350}
1351
1352java_library {
1353 name: "art-gtest-jars-ManyMethods",
1354 srcs: ["ManyMethods/**/*.java"],
1355 defaults: ["art-gtest-jars-defaults"],
1356}
1357
1358java_library {
1359 name: "art-gtest-jars-MethodTypes",
1360 srcs: ["MethodTypes/**/*.java"],
1361 defaults: ["art-gtest-jars-defaults"],
1362}
1363
1364java_library {
1365 name: "art-gtest-jars-MyClass",
1366 srcs: ["MyClass/**/*.java"],
1367 defaults: ["art-gtest-jars-defaults"],
1368}
1369
1370java_library {
1371 name: "art-gtest-jars-MyClassNatives",
1372 srcs: ["MyClassNatives/**/*.java"],
1373 defaults: ["art-gtest-jars-defaults"],
1374}
1375
1376java_library {
1377 name: "art-gtest-jars-Nested",
1378 srcs: ["Nested/**/*.java"],
1379 defaults: ["art-gtest-jars-defaults"],
1380}
1381
1382java_library {
1383 name: "art-gtest-jars-NonStaticLeafMethods",
1384 srcs: ["NonStaticLeafMethods/**/*.java"],
1385 defaults: ["art-gtest-jars-defaults"],
1386}
1387
1388java_library {
1389 name: "art-gtest-jars-Packages",
1390 srcs: ["Packages/**/*.java"],
1391 defaults: ["art-gtest-jars-defaults"],
1392}
1393
1394java_library {
1395 name: "art-gtest-jars-ProtoCompare",
1396 srcs: ["ProtoCompare/**/*.java"],
1397 defaults: ["art-gtest-jars-defaults"],
1398}
1399
1400java_library {
1401 name: "art-gtest-jars-ProtoCompare2",
1402 srcs: ["ProtoCompare2/**/*.java"],
1403 defaults: ["art-gtest-jars-defaults"],
1404}
1405
1406java_library {
1407 name: "art-gtest-jars-StaticLeafMethods",
1408 srcs: ["StaticLeafMethods/**/*.java"],
1409 defaults: ["art-gtest-jars-defaults"],
1410}
1411
1412java_library {
1413 name: "art-gtest-jars-Statics",
1414 srcs: ["Statics/**/*.java"],
1415 defaults: ["art-gtest-jars-defaults"],
1416}
1417
1418java_library {
1419 name: "art-gtest-jars-StaticsFromCode",
1420 srcs: ["StaticsFromCode/**/*.java"],
1421 defaults: ["art-gtest-jars-defaults"],
1422}
1423
1424java_library {
1425 name: "art-gtest-jars-StringLiterals",
1426 srcs: ["StringLiterals/**/*.java"],
1427 defaults: ["art-gtest-jars-defaults"],
1428}
1429
1430java_library {
1431 name: "art-gtest-jars-Transaction",
1432 srcs: ["Transaction/**/*.java"],
1433 defaults: ["art-gtest-jars-defaults"],
1434}
1435
1436java_library {
1437 name: "art-gtest-jars-XandY",
1438 srcs: ["XandY/**/*.java"],
1439 defaults: ["art-gtest-jars-defaults"],
1440}
1441
Calin Juravle33787682019-07-26 14:27:18 -07001442java_library {
1443 name: "art-gtest-jars-Dex2oatVdexTestDex",
1444 srcs: ["Dex2oatVdexTestDex/**/*.java"],
1445 defaults: ["art-gtest-jars-defaults"],
1446}
1447
David Srbecky8c8f1482020-02-05 20:17:10 +00001448// The following cases are non-trivial.
1449
1450// Uncompress classes.dex files in the jar file.
1451genrule_defaults {
1452 name: "art-gtest-jars-uncompress-defaults",
1453 cmd: "$(location zip2zip) -i $(in) -o $(out) -0 'classes*.dex'",
1454 tools: ["zip2zip"],
1455}
1456
1457// Ensure the files are at least 4 byte aligned.
1458genrule_defaults {
1459 name: "art-gtest-jars-align-defaults",
1460 cmd: "$(location zipalign) 4 $(in) $(out)",
1461 tools: ["zipalign"],
1462}
1463
1464// Assemble jar file from smali source.
1465genrule_defaults {
1466 name: "art-gtest-jars-smali-defaults",
1467 cmd: "$(location smali) assemble --output $(out) $(in)",
1468 tools: ["smali"],
1469}
1470
1471// A copy of Main with the classes.dex stripped for the oat file assistant tests.
1472genrule {
1473 name: "art-gtest-jars-MainStripped",
1474 srcs: [":art-gtest-jars-Main"],
1475 cmd: "$(location zip2zip) -i $(in) -o $(out) -x 'classes*.dex'",
1476 out: ["art-gtest-jars-MainStripped.jar"],
1477 tools: ["zip2zip"],
1478}
1479
1480// An empty.dex that is empty and uncompressed for the dex2oat tests.
1481genrule {
1482 name: "art-gtest-jars-MainEmptyUncompressed",
1483 srcs: ["Main/empty.dex"],
1484 cmd: "$(location soong_zip) -j -L 0 -o $(out) -f $(in)",
1485 out: ["art-gtest-jars-MainEmptyUncompressed.jar"],
1486 tools: ["soong_zip"],
1487}
1488
1489// An empty.dex that is empty and uncompressed and aligned for the dex2oat tests.
1490genrule {
1491 name: "art-gtest-jars-MainEmptyUncompressedAligned",
1492 defaults: ["art-gtest-jars-align-defaults"],
1493 srcs: [":art-gtest-jars-MainEmptyUncompressed"],
1494 out: ["art-gtest-jars-MainEmptyUncompressedAligned.jar"],
1495}
1496
1497// A copy of Main with the classes.dex uncompressed for the dex2oat tests.
1498genrule {
1499 name: "art-gtest-jars-MainUncompressed",
1500 defaults: ["art-gtest-jars-uncompress-defaults"],
1501 srcs: [":art-gtest-jars-Main"],
1502 out: ["art-gtest-jars-MainUncompressed.jar"],
1503}
1504
1505// A copy of Main with the classes.dex uncompressed and aligned for the dex2oat tests.
1506genrule {
1507 name: "art-gtest-jars-MainUncompressedAligned",
1508 defaults: ["art-gtest-jars-align-defaults"],
1509 srcs: [":art-gtest-jars-MainUncompressed"],
1510 out: ["art-gtest-jars-MainUncompressedAligned.jar"],
1511}
1512
1513java_library {
1514 name: "art-gtest-jars-MultiDex",
1515 srcs: ["MultiDex/**/*.java"],
1516 defaults: ["art-gtest-jars-defaults"],
1517 min_sdk_version: "19",
1518 dxflags: [
1519 "--main-dex-list",
1520 "art/test/MultiDex/main.list",
1521 ],
1522}
1523
1524// A copy of MultiDex with the classes.dex uncompressed for the OatFile tests.
1525genrule {
1526 name: "art-gtest-jars-MultiDexUncompressed",
1527 defaults: ["art-gtest-jars-uncompress-defaults"],
1528 srcs: [":art-gtest-jars-MultiDex"],
1529 out: ["art-gtest-jars-MultiDexUncompressed.jar"],
1530}
1531
1532// A copy of MultiDex with the classes.dex uncompressed and aligned for the OatFile tests.
1533genrule {
1534 name: "art-gtest-jars-MultiDexUncompressedAligned",
1535 defaults: ["art-gtest-jars-align-defaults"],
1536 srcs: [":art-gtest-jars-MultiDexUncompressed"],
1537 out: ["art-gtest-jars-MultiDexUncompressedAligned.jar"],
1538}
1539
1540java_library {
1541 name: "art-gtest-jars-MultiDexModifiedSecondary",
1542 srcs: ["MultiDexModifiedSecondary/**/*.java"],
1543 defaults: ["art-gtest-jars-defaults"],
1544 min_sdk_version: "19",
1545 dxflags: [
1546 "--main-dex-list",
1547 "art/test/MultiDexModifiedSecondary/main.list",
1548 ],
1549}
1550
1551java_library {
1552 name: "art-gtest-jars-ProfileTestMultiDex",
1553 srcs: ["ProfileTestMultiDex/**/*.java"],
1554 defaults: ["art-gtest-jars-defaults"],
1555 min_sdk_version: "19",
1556 dxflags: [
1557 "--main-dex-list",
1558 "art/test/ProfileTestMultiDex/main.list",
1559 ],
1560}
1561
David Srbeckyedda3ca2020-07-08 00:41:08 +01001562// Smali compiled files.
1563// Since they are not compiled by javac, we use different extension for them.
1564// The .jar extension for them would cause subtle failures in the test infra,
1565// which finds and opens all jar files and expects them to be valid zip files.
1566
David Srbecky8c8f1482020-02-05 20:17:10 +00001567genrule {
1568 name: "art-gtest-jars-VerifierDeps",
1569 defaults: ["art-gtest-jars-smali-defaults"],
1570 srcs: ["VerifierDeps/**/*.smali"],
David Srbeckyedda3ca2020-07-08 00:41:08 +01001571 out: ["art-gtest-jars-VerifierDeps.dex"],
David Srbecky8c8f1482020-02-05 20:17:10 +00001572}
1573
1574genrule {
1575 name: "art-gtest-jars-VerifierDepsMulti",
1576 defaults: ["art-gtest-jars-smali-defaults"],
1577 srcs: ["VerifierDepsMulti/**/*.smali"],
David Srbeckyedda3ca2020-07-08 00:41:08 +01001578 out: ["art-gtest-jars-VerifierDepsMulti.dex"],
David Srbecky8c8f1482020-02-05 20:17:10 +00001579}
1580
1581genrule {
1582 name: "art-gtest-jars-VerifySoftFailDuringClinit",
1583 defaults: ["art-gtest-jars-smali-defaults"],
1584 srcs: ["VerifySoftFailDuringClinit/**/*.smali"],
David Srbeckyedda3ca2020-07-08 00:41:08 +01001585 out: ["art-gtest-jars-VerifySoftFailDuringClinit.dex"],
David Srbecky8c8f1482020-02-05 20:17:10 +00001586}
David Srbecky4a88a5a2020-05-05 16:21:57 +01001587
1588genrule {
1589 name: "art-gtest-jars-LinkageTest",
1590 defaults: ["art-gtest-jars-smali-defaults"],
1591 srcs: ["LinkageTest/*.smali"],
David Srbeckyedda3ca2020-07-08 00:41:08 +01001592 out: ["art-gtest-jars-LinkageTest.dex"],
David Srbecky4a88a5a2020-05-05 16:21:57 +01001593}
Calin Juravle33787682019-07-26 14:27:18 -07001594
1595genrule {
1596 name: "art-gtest-jars-Dex2oatVdexPublicSdkDex",
1597 defaults: ["art-gtest-jars-smali-defaults"],
1598 srcs: ["Dex2oatVdexPublicSdkDex/*.smali"],
1599 out: ["art-gtest-jars-Dex2oatVdexPublicSdkDex.dex"],
1600}