blob: 152a79f969dbff70d736f1fd9b501ac03bacae7f [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
Colin Cross6b22aa52016-09-12 14:35:39 -070019art_cc_defaults {
Colin Cross6e95dd52016-09-12 15:37:10 -070020 name: "art_test_defaults",
21 host_supported: true,
Colin Crossafd3c9e2016-09-16 13:47:21 -070022 target: {
23 android_arm: {
Roland Levillaind4d6fb52019-08-05 12:28:39 +010024 relative_install_path: "art/arm",
Colin Crossafd3c9e2016-09-16 13:47:21 -070025 },
26 android_arm64: {
Roland Levillaind4d6fb52019-08-05 12:28:39 +010027 relative_install_path: "art/arm64",
Colin Crossafd3c9e2016-09-16 13:47:21 -070028 },
Colin Crossafd3c9e2016-09-16 13:47:21 -070029 android_x86: {
Roland Levillaind4d6fb52019-08-05 12:28:39 +010030 relative_install_path: "art/x86",
Colin Crossafd3c9e2016-09-16 13:47:21 -070031 },
32 android_x86_64: {
Roland Levillaind4d6fb52019-08-05 12:28:39 +010033 relative_install_path: "art/x86_64",
Colin Crossafd3c9e2016-09-16 13:47:21 -070034 },
Colin Crossfd5428b2016-09-19 10:40:05 -070035 darwin: {
36 enabled: false,
37 },
Colin Crossafd3c9e2016-09-16 13:47:21 -070038 },
Dan Albertb5d36de2016-09-21 14:56:51 -070039 cflags: [
40 "-Wno-frame-larger-than=",
41 ],
Jiyong Park066dd9022019-12-19 02:11:59 +000042 apex_available: [
43 "com.android.art.debug",
44 ],
Colin Crossafd3c9e2016-09-16 13:47:21 -070045}
46
47art_cc_defaults {
48 name: "art_gtest_defaults",
Colin Cross6e95dd52016-09-12 15:37:10 -070049 // These really are gtests, but the gtest library comes from libart-gtest.so
50 gtest: false,
51 defaults: [
Colin Crossafd3c9e2016-09-16 13:47:21 -070052 "art_test_defaults",
Andreas Gampe5115efb2017-05-24 16:55:54 -070053 "art_debug_defaults",
54 "art_defaults",
Colin Cross6e95dd52016-09-12 15:37:10 -070055 ],
56
David Srbecky9a09e7c2020-07-02 00:08:06 +000057 test_suites: ["general-tests"],
58 test_options: {
59 test_suite_tag: ["art-host-gtest"],
60 },
61
Colin Cross6e95dd52016-09-12 15:37:10 -070062 shared_libs: [
63 "libartd",
64 "libartd-disassembler",
Roland Levillain12dd9ae2018-11-06 13:32:06 +000065 "libvixld",
Colin Cross6e95dd52016-09-12 15:37:10 -070066 "libart-gtest",
David Sehrfcbe15c2018-02-15 09:41:13 -080067 "libdexfiled",
David Sehr82d046e2018-04-23 08:14:19 -070068 "libprofiled",
David Sehr1f010162018-05-15 08:59:32 -070069 "libartbased",
Colin Cross6e95dd52016-09-12 15:37:10 -070070
Andreas Gampe3fec9ac2016-09-13 10:47:28 -070071 "libbase",
Colin Cross6e95dd52016-09-12 15:37:10 -070072 "libnativehelper",
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000073 "libz",
Colin Cross6e95dd52016-09-12 15:37:10 -070074 ],
75 whole_static_libs: [
76 "libsigchain",
77 ],
Colin Cross6e95dd52016-09-12 15:37:10 -070078
79 target: {
Dan Willemsen057f1e42017-10-03 14:11:48 -070080 linux: {
Colin Cross6e95dd52016-09-12 15:37:10 -070081 ldflags: [
82 // Allow jni_compiler_test to find Java_MyClassNatives_bar
83 // within itself using dlopen(NULL, ...).
84 // Mac OS linker doesn't understand --export-dynamic.
85 "-Wl,--export-dynamic",
86 "-Wl,-u,Java_MyClassNatives_bar",
87 "-Wl,-u,Java_MyClassNatives_sbar",
88 ],
Colin Cross6e95dd52016-09-12 15:37:10 -070089 cflags: [
90 // gtest issue
91 "-Wno-used-but-marked-unused",
92 "-Wno-deprecated",
93 "-Wno-missing-noreturn",
94 ],
95 },
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +000096 host: {
97 shared_libs: [
98 "libziparchive",
99 ],
100 },
Dan Willemsen057f1e42017-10-03 14:11:48 -0700101 android: {
Colin Cross6e95dd52016-09-12 15:37:10 -0700102 shared_libs: [
Dimitry Ivanov9642b1b2016-09-28 02:44:00 -0700103 "liblog",
Colin Cross6e95dd52016-09-12 15:37:10 -0700104 ],
Colin Cross6e95dd52016-09-12 15:37:10 -0700105 },
Colin Cross6e95dd52016-09-12 15:37:10 -0700106 },
107}
108
109art_cc_defaults {
Colin Cross6b22aa52016-09-12 14:35:39 -0700110 name: "libart-gtest-defaults",
111 host_supported: true,
112 defaults: [
Colin Cross6b22aa52016-09-12 14:35:39 -0700113 "art_debug_defaults",
Andreas Gampe5115efb2017-05-24 16:55:54 -0700114 "art_defaults",
Colin Cross6b22aa52016-09-12 14:35:39 -0700115 ],
116 shared_libs: [
117 "libartd",
118 "libartd-compiler",
David Sehrfcbe15c2018-02-15 09:41:13 -0800119 "libdexfiled",
David Sehr82d046e2018-04-23 08:14:19 -0700120 "libprofiled",
David Sehr1f010162018-05-15 08:59:32 -0700121 "libartbased",
David Srbecky883c1342020-05-11 23:30:29 +0000122 "liblog",
Colin Cross6b22aa52016-09-12 14:35:39 -0700123 ],
124 static_libs: [
David Srbecky883c1342020-05-11 23:30:29 +0000125 "libgtest_isolated",
Colin Cross6b22aa52016-09-12 14:35:39 -0700126 ],
127 target: {
128 android32: {
Colin Crossc5c71872016-09-15 21:07:29 -0700129 cflags: ["-DART_TARGET_NATIVETEST_DIR=/data/nativetest/art"],
Colin Cross6b22aa52016-09-12 14:35:39 -0700130 },
131 android64: {
132 cflags: ["-DART_TARGET_NATIVETEST_DIR=/data/nativetest64/art"],
133 },
Dan Willemsen057f1e42017-10-03 14:11:48 -0700134 linux: {
Colin Cross6b22aa52016-09-12 14:35:39 -0700135 cflags: [
136 // gtest issue
137 "-Wno-used-but-marked-unused",
138 "-Wno-deprecated",
139 "-Wno-missing-noreturn",
140 ],
141 },
Colin Cross942036f2016-09-15 16:24:51 -0700142 darwin: {
143 enabled: false,
144 },
Colin Cross6b22aa52016-09-12 14:35:39 -0700145 },
Jiyong Park066dd9022019-12-19 02:11:59 +0000146 apex_available: [
147 "com.android.art.debug",
148 ],
Colin Cross6b22aa52016-09-12 14:35:39 -0700149}
150
151art_cc_library {
152 name: "libart-gtest",
153 host_supported: true,
David Srbecky883c1342020-05-11 23:30:29 +0000154 defaults: [
155 "art_debug_defaults",
156 "art_defaults",
157 ],
158 srcs: [
159 "common/gtest_main.cc",
160 ],
Colin Cross6b22aa52016-09-12 14:35:39 -0700161 whole_static_libs: [
162 "libart-compiler-gtest",
163 "libart-runtime-gtest",
David Sehrd5f8de82018-04-27 14:12:03 -0700164 "libartbase-art-gtest",
David Srbecky883c1342020-05-11 23:30:29 +0000165 "libgtest_isolated",
Colin Cross6b22aa52016-09-12 14:35:39 -0700166 ],
167 shared_libs: [
168 "libartd",
169 "libartd-compiler",
David Sehrfcbe15c2018-02-15 09:41:13 -0800170 "libdexfiled",
David Sehr82d046e2018-04-23 08:14:19 -0700171 "libprofiled",
David Sehr1f010162018-05-15 08:59:32 -0700172 "libartbased",
Colin Crossf0af9062016-10-21 10:50:31 -0700173 "libbase",
Dan Willemsen2ca27802017-09-27 14:57:43 -0700174 "libbacktrace",
David Srbecky883c1342020-05-11 23:30:29 +0000175 "liblog",
Colin Cross6b22aa52016-09-12 14:35:39 -0700176 ],
177 target: {
Colin Cross942036f2016-09-15 16:24:51 -0700178 darwin: {
179 enabled: false,
180 },
Colin Cross6b22aa52016-09-12 14:35:39 -0700181 },
Jiyong Park066dd9022019-12-19 02:11:59 +0000182 apex_available: [
183 "com.android.art.debug",
184 ],
Colin Cross6b22aa52016-09-12 14:35:39 -0700185}
Colin Crossafd3c9e2016-09-16 13:47:21 -0700186
Roland Levillain962a1102019-11-01 16:20:33 +0000187// ART run-tests.
188
Roland Levillain4258f9e2020-10-13 12:10:59 +0100189// Test configuration template for ART run-tests on target expected to run
190// successfully, and as such tagged as part of TradeFed's `art-target-run-test`
191// test suite via the `test-suite-tag`.
Roland Levillaina8049c62019-11-01 16:11:20 +0000192filegroup {
Roland Levillain4258f9e2020-10-13 12:10:59 +0100193 name: "art-run-test-target-template",
Roland Levillaina8049c62019-11-01 16:11:20 +0000194 srcs: [
Roland Levillain4258f9e2020-10-13 12:10:59 +0100195 "art-run-test-target-template.xml",
196 ],
197}
198
199// Test configuration template for ART run-tests on target expected to run
200// successfully, and as such *not* tagged as part of TradeFed's
201// `art-target-run-test` test suite via the `test-suite-tag`. This is as
202// temporary measure, while we add proper support for all ART (target) run-tests
203// to TradeFed (b/147818031).
204filegroup {
205 name: "art-run-test-target-no-test-suite-tag-template",
206 srcs: [
207 "art-run-test-target-no-test-suite-tag-template.xml",
Roland Levillaina8049c62019-11-01 16:11:20 +0000208 ],
209}
210
Roland Levillain79d90922020-02-04 15:41:45 +0000211java_defaults {
212 name: "art-run-test-defaults",
Roland Levillain9a0f9ba2020-02-13 15:06:54 +0000213
Roland Levillain79d90922020-02-04 15:41:45 +0000214 // Compile against the "core" bootclasspath, not the "default" one (current
Roland Levillain9a0f9ba2020-02-13 15:06:54 +0000215 // platform) -- use the same settings as Libcore tests (see e.g. the
216 // definition of module `core-tests` in libcore/JavaLibrary.bp).
217 //
218 // Note: The legacy way to build ART run-tests uses the
219 // `javac_with_bootclasspath` function defined in `test/etc/default-build`.
220 // See also `tools/javac-helper.sh`.
221 sdk_version: "none",
222 system_modules: "core-all-system-modules",
223
Roland Levillain01e56982020-02-10 12:28:01 +0000224 // Some ART run-tests contain constructs which break ErrorProne checks;
225 // disable them on `errorprone` builds.
226 errorprone: {
227 javacflags: ["-XepDisableAllChecks"],
228 },
229
Roland Levillain00381bf2020-09-01 17:28:11 +0100230 test_suites: [
231 "general-tests",
232 "mts",
233 ],
Roland Levillain79d90922020-02-04 15:41:45 +0000234}
235
Roland Levillain962a1102019-11-01 16:20:33 +0000236art_cc_test_library {
237 name: "libarttest",
238 defaults: ["libarttest-defaults"],
239 shared_libs: [
240 "libart",
241 "libdexfile",
242 "libprofile",
243 "libartbase",
244 ],
245}
246
247art_cc_test_library {
248 name: "libarttestd",
249 defaults: [
250 "art_debug_defaults",
251 "libarttest-defaults",
252 ],
253 shared_libs: [
254 "libartd",
255 "libdexfiled",
256 "libprofiled",
257 "libartbased",
258 ],
259}
260
261art_cc_defaults {
262 name: "libnativebridgetest-defaults",
263 defaults: [
264 "art_test_defaults",
265 "art_defaults",
266 ],
267 header_libs: ["libnativebridge-headers"],
268 srcs: ["115-native-bridge/nativebridge.cc"],
269}
270
271art_cc_test_library {
272 name: "libnativebridgetest",
273 shared_libs: ["libart"],
274 defaults: [
275 "libnativebridgetest-defaults",
276 ],
277}
278
279art_cc_test_library {
280 name: "libnativebridgetestd",
281 shared_libs: ["libartd"],
282 defaults: [
283 "libnativebridgetest-defaults",
284 "art_debug_defaults",
285 ],
286}
287
288// ART JVMTI run-tests.
289
Colin Crossafd3c9e2016-09-16 13:47:21 -0700290cc_defaults {
291 name: "libartagent-defaults",
292 defaults: [
Colin Crossafd3c9e2016-09-16 13:47:21 -0700293 "art_test_defaults",
Andreas Gampe5115efb2017-05-24 16:55:54 -0700294 "art_defaults",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700295 ],
296 shared_libs: [
297 "libbacktrace",
Andreas Gampe3fec9ac2016-09-13 10:47:28 -0700298 "libbase",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700299 "libnativehelper",
300 ],
Colin Crossafd3c9e2016-09-16 13:47:21 -0700301}
302
303art_cc_test_library {
304 name: "libartagent",
305 srcs: ["900-hello-plugin/load_unload.cc"],
306 defaults: ["libartagent-defaults"],
Andreas Gampe9462a562018-02-20 09:35:21 -0800307 shared_libs: [
308 "libart",
309 "libdexfile",
David Sehr82d046e2018-04-23 08:14:19 -0700310 "libprofile",
David Sehr1f010162018-05-15 08:59:32 -0700311 "libartbase",
Andreas Gampe9462a562018-02-20 09:35:21 -0800312 ],
Colin Crossafd3c9e2016-09-16 13:47:21 -0700313}
314
315art_cc_test_library {
316 name: "libartagentd",
317 srcs: ["900-hello-plugin/load_unload.cc"],
318 defaults: [
Colin Crossafd3c9e2016-09-16 13:47:21 -0700319 "art_debug_defaults",
Andreas Gampe5115efb2017-05-24 16:55:54 -0700320 "libartagent-defaults",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700321 ],
Andreas Gampe9462a562018-02-20 09:35:21 -0800322 shared_libs: [
323 "libartd",
324 "libdexfiled",
David Sehr82d046e2018-04-23 08:14:19 -0700325 "libprofiled",
David Sehr1f010162018-05-15 08:59:32 -0700326 "libartbased",
Andreas Gampe9462a562018-02-20 09:35:21 -0800327 ],
Colin Crossafd3c9e2016-09-16 13:47:21 -0700328}
329
Andreas Gampee54d9922016-10-11 19:55:37 -0700330art_cc_defaults {
Dan Willemsen2ca27802017-09-27 14:57:43 -0700331 name: "libtiagent-base-defaults",
Andreas Gampecb5125d2018-02-20 09:36:54 -0800332 defaults: [
333 "art_test_defaults",
334 "art_defaults",
335 // Not derived from libartagent-defaults for NDK.
336 ],
Colin Crossafd3c9e2016-09-16 13:47:21 -0700337 srcs: [
Andreas Gampe027444b2017-03-31 12:49:07 -0700338 // These are the ART-independent parts.
Andreas Gampe46651672017-04-07 09:00:04 -0700339 "ti-agent/agent_common.cc",
Andreas Gampe027444b2017-03-31 12:49:07 -0700340 "ti-agent/agent_startup.cc",
Andreas Gampe3f46c962017-03-30 10:26:59 -0700341 "ti-agent/jni_binder.cc",
342 "ti-agent/jvmti_helper.cc",
343 "ti-agent/test_env.cc",
Alex Lightd0d65962017-06-30 11:13:33 -0700344 "ti-agent/breakpoint_helper.cc",
Alex Light78d63412017-04-14 16:20:53 -0700345 "ti-agent/common_helper.cc",
Alex Lightb7c640d2019-03-20 15:52:13 -0700346 "ti-agent/early_return_helper.cc",
Alex Lighte814f9d2017-07-31 16:14:39 -0700347 "ti-agent/frame_pop_helper.cc",
Alex Light47d49b82017-07-25 14:06:34 -0700348 "ti-agent/locals_helper.cc",
Alex Lightce568642017-09-05 16:54:25 -0700349 "ti-agent/monitors_helper.cc",
Alex Lightd0d65962017-06-30 11:13:33 -0700350 "ti-agent/redefinition_helper.cc",
Alex Light88fd7202017-06-30 08:31:59 -0700351 "ti-agent/suspension_helper.cc",
Alex Lightb4e65072019-04-25 15:10:32 -0700352 "ti-agent/suspend_event_helper.cc",
Alex Light47d49b82017-07-25 14:06:34 -0700353 "ti-agent/stack_trace_helper.cc",
Alex Light54d39dc2017-09-25 17:00:16 -0700354 "ti-agent/threads_helper.cc",
Alex Lightd0d65962017-06-30 11:13:33 -0700355 "ti-agent/trace_helper.cc",
Alex Light9fb1ab12017-09-05 09:32:49 -0700356 "ti-agent/exceptions_helper.cc",
Andreas Gampe027444b2017-03-31 12:49:07 -0700357 // This is the list of non-special OnLoad things and excludes BCI and anything that depends
358 // on ART internals.
Andreas Gampe6dee92e2016-09-12 19:58:13 -0700359 "903-hello-tagging/tagging.cc",
Andreas Gampe27fa96c2016-10-07 15:05:24 -0700360 "904-object-allocation/tracking.cc",
Andreas Gampecc13b222016-10-10 19:09:09 -0700361 "905-object-free/tracking_free.cc",
Andreas Gampee54d9922016-10-11 19:55:37 -0700362 "906-iterate-heap/iterate_heap.cc",
Andreas Gampeaa8b60c2016-10-12 12:51:25 -0700363 "907-get-loaded-classes/get_loaded_classes.cc",
Andreas Gampe9b8c5882016-10-21 15:27:46 -0700364 "908-gc-start-finish/gc_callbacks.cc",
Andreas Gampe3c252f02016-10-27 18:25:17 -0700365 "910-methods/methods.cc",
Andreas Gampeb5eb94a2016-10-27 19:23:09 -0700366 "911-get-stack-trace/stack_trace.cc",
Andreas Gamped5f2ccc2017-04-19 13:37:48 -0700367 "912-classes/classes.cc",
Andreas Gampee0f8ed92017-04-13 16:52:23 -0700368 "913-heaps/heaps.cc",
Andreas Gampeab2f0d02017-01-05 17:23:45 -0800369 "918-fields/fields.cc",
Andreas Gampe50a4e492017-01-06 18:00:20 -0800370 "920-objects/objects.cc",
Andreas Gampe1bdaf732017-01-09 19:21:06 -0800371 "922-properties/properties.cc",
Andreas Gampe319dbe82017-01-09 16:42:21 -0800372 "923-monitors/monitors.cc",
Andreas Gampeaf13ab92017-01-11 20:57:40 -0800373 "924-threads/threads.cc",
Andreas Gamped18d9e22017-01-16 16:08:45 +0000374 "925-threadgroups/threadgroups.cc",
Andreas Gampe35bcf812017-01-13 16:24:17 -0800375 "927-timers/timers.cc",
Andreas Gampe6f8e4f02017-01-16 18:18:14 -0800376 "928-jni-table/jni_table.cc",
Andreas Gampece7732b2017-01-17 15:50:26 -0800377 "929-search/search.cc",
Andreas Gampe732b0ac2017-01-18 15:23:39 -0800378 "931-agent-thread/agent_thread.cc",
Andreas Gampeeb0cea12017-01-23 08:50:04 -0800379 "933-misc-events/misc_events.cc",
Alex Light78d63412017-04-14 16:20:53 -0700380 "945-obsolete-native/obsolete_native.cc",
Alex Light8fd08562018-02-13 10:09:03 -0800381 "983-source-transform-verify/source_transform.cc",
Alex Light78d63412017-04-14 16:20:53 -0700382 "984-obsolete-invoke/obsolete_invoke.cc",
Alex Lightd78ddec2017-04-18 15:20:38 -0700383 "986-native-method-bind/native_bind.cc",
Alex Light65af20b2017-04-20 09:15:08 -0700384 "987-agent-bind/agent_bind.cc",
Alex Lighte85595e2018-08-17 15:54:34 -0700385 "988-method-trace/trace_fib.cc",
Alex Lightb7edcda2017-04-27 13:20:31 -0700386 "989-method-trace-throw/method_trace.cc",
Alex Light7c958492017-06-16 08:59:19 -0700387 "991-field-trace-2/field_trace.cc",
Alex Light6fa7b812017-06-16 09:04:29 -0700388 "992-source-data/source_file.cc",
Alex Lightc38c3692017-06-27 15:45:14 -0700389 "993-breakpoints/breakpoints.cc",
390 "996-breakpoint-obsolete/obsolete_breakpoints.cc",
Alex Light8ddfd9f2017-07-05 16:33:46 -0700391 "1900-track-alloc/alloc.cc",
Alex Light4c174282017-07-05 10:18:18 -0700392 "1901-get-bytecodes/bytecodes.cc",
Alex Light88fd7202017-06-30 08:31:59 -0700393 "1905-suspend-native/native_suspend.cc",
394 "1908-suspend-native-resume-self/native_suspend_resume.cc",
Alex Light092a4042017-07-12 08:46:44 -0700395 "1909-per-agent-tls/agent_tls.cc",
Alex Light47d49b82017-07-25 14:06:34 -0700396 "1914-get-local-instance/local_instance.cc",
Alex Light1d8a9742017-08-17 11:12:06 -0700397 "1919-vminit-thread-start-timing/vminit.cc",
Alex Light23aa7482017-08-16 10:01:13 -0700398 "1920-suspend-native-monitor/native_suspend_monitor.cc",
399 "1921-suspend-native-recursive-monitor/native_suspend_recursive_monitor.cc",
Alex Light88e1ddd2017-08-21 13:09:55 -0700400 "1922-owned-monitors-info/owned_monitors.cc",
Alex Lighte814f9d2017-07-31 16:14:39 -0700401 "1924-frame-pop-toggle/frame_pop_toggle.cc",
402 "1926-missed-frame-pop/frame_pop_missed.cc",
Alex Lightce568642017-09-05 16:54:25 -0700403 "1927-exception-event/exception_event.cc",
404 "1930-monitor-info/monitor.cc",
Dan Willemsen2ca27802017-09-27 14:57:43 -0700405 "1932-monitor-events-misc/monitor_misc.cc",
Alex Light54d39dc2017-09-25 17:00:16 -0700406 "1934-jvmti-signal-thread/signal_threads.cc",
Alex Light3dea2122017-10-11 15:56:48 +0000407 "1939-proxy-frames/local_instance.cc",
Alex Lightb284f8d2017-11-21 00:00:48 +0000408 "1941-dispose-stress/dispose_stress.cc",
Alex Light4d77daf2018-01-04 11:51:14 -0800409 "1942-suspend-raw-monitor-exit/native_suspend_monitor.cc",
410 "1943-suspend-raw-monitor-wait/native_suspend_monitor.cc",
Alex Lightc7588752018-02-20 11:15:54 -0800411 "1946-list-descriptors/descriptors.cc",
Alex Light9e7859c2018-04-05 13:49:43 -0700412 "1950-unprepared-transform/unprepared_transform.cc",
Alex Lightc98f83e2018-07-26 08:28:36 -0700413 "1951-monitor-enter-no-suspend/raw_monitor.cc",
Alex Light0aa7a5a2018-10-10 15:58:14 +0000414 "1953-pop-frame/pop_frame.cc",
Alex Lightae45cbb2018-10-18 15:49:56 -0700415 "1957-error-ext/lasterror.cc",
Alex Lightb7c640d2019-03-20 15:52:13 -0700416 // TODO Renumber
Alex Light40607862019-05-06 18:16:24 +0000417 "1962-multi-thread-events/multi_thread_events.cc",
Alex Light639e73b2019-05-17 21:44:36 +0000418 "1963-add-to-dex-classloader-in-memory/add_to_loader.cc",
Alex Lightb7c640d2019-03-20 15:52:13 -0700419 "1968-force-early-return/force_early_return.cc",
420 "1969-force-early-return-void/force_early_return_void.cc",
421 "1970-force-early-return-long/force_early_return_long.cc",
Alex Lightc14ec8f2019-07-18 16:08:41 -0700422 "1974-resize-array/resize_array.cc",
Nicolas Geoffray4ac0e152019-09-18 06:14:50 +0000423 "1975-hello-structural-transformation/structural_transform.cc",
424 "1976-hello-structural-static-methods/structural_transform_methods.cc",
Alex Light80777ed2019-12-17 17:07:33 +0000425 "2005-pause-all-redefine-multithreaded/pause-all.cc",
Alex Light72325b62020-01-09 17:49:45 -0800426 "2009-structural-local-ref/local-ref.cc",
Alex Light16527e82020-06-08 09:21:12 -0700427 "2035-structural-native-method/structural-native.cc",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700428 ],
Andreas Gampecb5125d2018-02-20 09:36:54 -0800429 // Use NDK-compatible headers for ctstiagent.
Alex Light8c2b9292017-11-09 13:21:01 -0800430 header_libs: [
Alex Light8c2b9292017-11-09 13:21:01 -0800431 "libopenjdkjvmti_headers",
432 ],
Paul Duffin4345aac2019-07-17 15:51:54 +0100433 local_include_dirs: ["ti-agent"],
Andreas Gampee54d9922016-10-11 19:55:37 -0700434}
435
Andreas Gampe027444b2017-03-31 12:49:07 -0700436art_cc_defaults {
437 name: "libtiagent-defaults",
Andreas Gampecb5125d2018-02-20 09:36:54 -0800438 defaults: [
439 "libtiagent-base-defaults",
440 "libartagent-defaults",
441 ],
Andreas Gampe027444b2017-03-31 12:49:07 -0700442 srcs: [
443 // This is to get the IsInterpreted native method.
444 "common/stack_inspect.cc",
445 "common/runtime_state.cc",
Alex Light78d63412017-04-14 16:20:53 -0700446 "ti-agent/common_load.cc",
Andreas Gampe027444b2017-03-31 12:49:07 -0700447 // This includes the remaining test functions. We should try to refactor things to
448 // make this list smaller.
Andreas Gampe027444b2017-03-31 12:49:07 -0700449 "901-hello-ti-agent/basics.cc",
450 "909-attach-agent/attach.cc",
Andreas Gamped5f2ccc2017-04-19 13:37:48 -0700451 "912-classes/classes_art.cc",
Andreas Gampe027444b2017-03-31 12:49:07 -0700452 "936-search-onload/search_onload.cc",
Alex Lightfbee3982018-05-24 10:28:46 -0700453 "980-redefine-object/redef_object.cc",
Andreas Gampe59484b92018-02-14 14:00:46 -0800454 "983-source-transform-verify/source_transform_art.cc",
Alex Light8c2b9292017-11-09 13:21:01 -0800455 "1940-ddms-ext/ddm_ext.cc",
Alex Light0aa7a5a2018-10-10 15:58:14 +0000456 // "1952-pop-frame-jit/pop_frame.cc",
Alex Lightfc81d802018-12-07 13:39:05 -0800457 "1959-redefine-object-instrument/fake_redef_object.cc",
Alex Lighte7a33542019-04-10 14:22:49 -0700458 "1960-obsolete-jit-multithread-native/native_say_hi.cc",
Alex Light639e73b2019-05-17 21:44:36 +0000459 "1964-add-to-dex-classloader-file/add_to_loader.cc",
Alex Light098e7a62019-05-21 16:57:10 -0700460 "1963-add-to-dex-classloader-in-memory/check_memfd_create.cc",
Alex Light3f0dca12020-01-27 17:20:28 -0800461 "2012-structural-redefinition-failures-jni-id/set-jni-id-used.cc",
Alex Light280e6c32020-03-03 13:52:07 -0800462 "2031-zygote-compiled-frame-deopt/native-wait.cc",
Andreas Gampe027444b2017-03-31 12:49:07 -0700463 ],
Alex Lightfbee3982018-05-24 10:28:46 -0700464 static_libs: [
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000465 "libz",
Andreas Gampe7e057ec2019-03-04 13:11:22 -0800466 "slicer_no_rtti",
Alex Lightfbee3982018-05-24 10:28:46 -0700467 ],
Andreas Gampe027444b2017-03-31 12:49:07 -0700468}
469
Andreas Gampee54d9922016-10-11 19:55:37 -0700470art_cc_test_library {
471 name: "libtiagent",
472 defaults: ["libtiagent-defaults"],
David Sehrfcbe15c2018-02-15 09:41:13 -0800473 shared_libs: [
474 "libart",
475 "libdexfile",
David Sehr82d046e2018-04-23 08:14:19 -0700476 "libprofile",
David Sehr1f010162018-05-15 08:59:32 -0700477 "libartbase",
David Sehrfcbe15c2018-02-15 09:41:13 -0800478 ],
Colin Crossafd3c9e2016-09-16 13:47:21 -0700479}
480
481art_cc_test_library {
482 name: "libtiagentd",
483 defaults: [
Colin Crossafd3c9e2016-09-16 13:47:21 -0700484 "art_debug_defaults",
Andreas Gampe5115efb2017-05-24 16:55:54 -0700485 "libtiagent-defaults",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700486 ],
David Sehrfcbe15c2018-02-15 09:41:13 -0800487 shared_libs: [
488 "libartd",
489 "libdexfiled",
David Sehr82d046e2018-04-23 08:14:19 -0700490 "libprofiled",
David Sehr1f010162018-05-15 08:59:32 -0700491 "libartbased",
David Sehrfcbe15c2018-02-15 09:41:13 -0800492 ],
Colin Crossafd3c9e2016-09-16 13:47:21 -0700493}
494
Andreas Gampe59484b92018-02-14 14:00:46 -0800495cc_library_static {
Andreas Gamped0ed0d92018-02-12 15:03:36 -0800496 name: "libctstiagent",
497 defaults: ["libtiagent-base-defaults"],
Martin Stjernholmb4abe0a2019-05-17 19:22:55 +0100498 visibility: [
499 "//cts/hostsidetests/jvmti:__subpackages__",
500 ],
Andreas Gampe59484b92018-02-14 14:00:46 -0800501 host_supported: false,
502 srcs: [
503 "983-source-transform-verify/source_transform_slicer.cc",
504 ],
Andreas Gamped0ed0d92018-02-12 15:03:36 -0800505 whole_static_libs: [
Andreas Gampe7e057ec2019-03-04 13:11:22 -0800506 "slicer_ndk_no_rtti",
Andreas Gamped0ed0d92018-02-12 15:03:36 -0800507 ],
508 static_libs: [
Andreas Gampecb5125d2018-02-20 09:36:54 -0800509 "libbase_ndk",
Andreas Gamped0ed0d92018-02-12 15:03:36 -0800510 ],
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000511 shared_libs: [
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700512 "libz", // for slicer (using adler32).
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000513 ],
Andreas Gampecb5125d2018-02-20 09:36:54 -0800514 sdk_version: "current",
515 stl: "c++_static",
Paul Duffin4345aac2019-07-17 15:51:54 +0100516 header_libs: [
517 "jni_headers",
Alex Light8fd08562018-02-13 10:09:03 -0800518 // This is needed to resolve the base/ header file in libdexfile. Unfortunately there are
519 // many problems with how we export headers that are making doing this the 'right' way
520 // difficult.
521 // TODO: move those headers to art/ rather than under runtime.
Paul Duffin4345aac2019-07-17 15:51:54 +0100522 "libart_runtime_headers_ndk",
Alex Light8fd08562018-02-13 10:09:03 -0800523 ],
Andreas Gamped0ed0d92018-02-12 15:03:36 -0800524 export_include_dirs: ["ti-agent"],
525}
526
Alex Light8f2c6d42017-04-10 16:27:35 -0700527art_cc_defaults {
Alex Light88659142018-05-15 10:53:06 -0700528 name: "libtistress-srcs",
Alex Light8f2c6d42017-04-10 16:27:35 -0700529 defaults: ["libartagent-defaults"],
530 srcs: [
531 "ti-stress/stress.cc",
532 ],
Alex Light88659142018-05-15 10:53:06 -0700533 header_libs: ["libopenjdkjvmti_headers"],
534}
535
536art_cc_defaults {
537 name: "libtistress-defaults",
538 defaults: ["libtistress-srcs"],
Alex Light8f2c6d42017-04-10 16:27:35 -0700539 shared_libs: [
Andreas Gampe7e057ec2019-03-04 13:11:22 -0800540 "slicer_no_rtti",
Vladimir Markoe8a83af2020-01-29 10:14:44 +0000541 "libz", // for slicer (using adler32).
Alex Light8f2c6d42017-04-10 16:27:35 -0700542 ],
Alex Light8f2c6d42017-04-10 16:27:35 -0700543}
544
545art_cc_test_library {
546 name: "libtistress",
Dan Willemsen2ca27802017-09-27 14:57:43 -0700547 defaults: ["libtistress-defaults"],
Vladimir Markoe8a83af2020-01-29 10:14:44 +0000548 shared_libs: [
549 "libartbase",
550 "libz",
551 ],
Alex Light8f2c6d42017-04-10 16:27:35 -0700552}
553
554art_cc_test_library {
555 name: "libtistressd",
556 defaults: [
Alex Light8f2c6d42017-04-10 16:27:35 -0700557 "art_debug_defaults",
Andreas Gampe5115efb2017-05-24 16:55:54 -0700558 "libtistress-defaults",
Alex Light8f2c6d42017-04-10 16:27:35 -0700559 ],
Vladimir Markoe8a83af2020-01-29 10:14:44 +0000560 shared_libs: [
561 "libartbased",
562 "libz",
563 ],
Alex Light88659142018-05-15 10:53:06 -0700564}
565
566art_cc_defaults {
Vladimir Markoe8a83af2020-01-29 10:14:44 +0000567 name: "libtistress-shared-defaults",
Andreas Gampeec5ed062018-01-26 16:20:02 -0800568 defaults: [
569 "libtistress-srcs",
Alex Light88659142018-05-15 10:53:06 -0700570 ],
Andreas Gampe7e057ec2019-03-04 13:11:22 -0800571 static_libs: ["slicer_no_rtti"],
Alex Light88659142018-05-15 10:53:06 -0700572}
573
574art_cc_test_library {
575 name: "libtistresss",
Vladimir Markoe8a83af2020-01-29 10:14:44 +0000576 defaults: ["libtistress-shared-defaults"],
577 shared_libs: [
578 "libartbase",
579 "libz",
580 ],
Alex Light88659142018-05-15 10:53:06 -0700581}
582
583art_cc_test_library {
584 name: "libtistressds",
585 defaults: [
Vladimir Markoe8a83af2020-01-29 10:14:44 +0000586 "libtistress-shared-defaults",
Alex Light88659142018-05-15 10:53:06 -0700587 ],
Vladimir Markoe8a83af2020-01-29 10:14:44 +0000588 shared_libs: [
589 "libartbased",
590 "libz",
591 ],
Alex Light8f2c6d42017-04-10 16:27:35 -0700592}
593
Colin Crossafd3c9e2016-09-16 13:47:21 -0700594cc_defaults {
595 name: "libarttest-defaults",
596 defaults: [
Colin Crossafd3c9e2016-09-16 13:47:21 -0700597 "art_test_defaults",
Andreas Gampe5115efb2017-05-24 16:55:54 -0700598 "art_defaults",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700599 ],
600 srcs: [
Colin Crossafd3c9e2016-09-16 13:47:21 -0700601 "004-JniTest/jni_test.cc",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700602 "004-ReferenceMap/stack_walk_refmap_jni.cc",
Roland Levillainad0777d2018-02-12 20:00:18 +0000603 "004-SignalTest/signaltest.cc",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700604 "004-StackWalk/stack_walk_jni.cc",
605 "004-ThreadStress/thread_stress.cc",
606 "004-UnsafeTest/unsafe_test.cc",
607 "044-proxy/native_proxy.cc",
608 "051-thread/thread_test.cc",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700609 "1337-gc-coverage/gc_coverage.cc",
610 "136-daemon-jni-shutdown/daemon_jni_shutdown.cc",
611 "137-cfi/cfi.cc",
612 "139-register-natives/regnative.cc",
613 "141-class-unload/jni_unload.cc",
614 "148-multithread-gc-annotations/gc_coverage.cc",
615 "149-suspend-all-stress/suspend_all.cc",
Mathieu Chartier72a32892017-01-24 09:40:56 -0800616 "154-gc-loop/heap_interface.cc",
Andreas Gampeaaf0d382017-11-27 14:10:21 -0800617 "167-visit-locks/visit_locks.cc",
Andreas Gampe56776012018-01-26 17:40:55 -0800618 "169-threadgroup-jni/jni_daemon_thread.cc",
Mathieu Chartieradc90862018-05-11 13:03:06 -0700619 "172-app-image-twice/debug_print_class.cc",
Vladimir Marko422a9eb2019-08-01 12:54:07 +0100620 "177-visibly-initialized-deadlock/visibly_initialized.cc",
Vladimir Marko7dac8642019-11-06 17:09:30 +0000621 "178-app-image-native-method/native_methods.cc",
Alex Lighta2efd2a2020-05-19 09:44:49 -0700622 "179-nonvirtual-jni/nonvirtual-call.cc",
Roland Levillainad0777d2018-02-12 20:00:18 +0000623 "1945-proxy-method-arguments/get_args.cc",
Andreas Gampeaaf0d382017-11-27 14:10:21 -0800624 "203-multi-checkpoint/multi_checkpoint.cc",
Alex Lightf4ed7e82018-01-17 11:52:36 -0800625 "305-other-fault-handler/fault_handler.cc",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700626 "454-get-vreg/get_vreg_jni.cc",
627 "457-regs/regs_jni.cc",
628 "461-get-reference-vreg/get_reference_vreg_jni.cc",
629 "466-get-live-vreg/get_live_vreg_jni.cc",
630 "497-inlining-and-class-loader/clear_dex_cache.cc",
631 "543-env-long-ref/env_long_ref.cc",
632 "566-polymorphic-inlining/polymorphic_inline.cc",
633 "570-checker-osr/osr.cc",
634 "595-profile-saving/profile-saving.cc",
635 "596-app-images/app_images.cc",
Hans Boehm6fe97e02016-05-04 18:35:57 -0700636 "596-monitor-inflation/monitor_inflation.cc",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700637 "597-deopt-new-string/deopt.cc",
Alexey Grebenkinbe4c2bd2018-02-01 19:09:59 +0300638 "616-cha-unloading/cha_unload.cc",
Vladimir Markoc5798bf2016-12-09 10:20:54 +0000639 "626-const-class-linking/clear_dex_cache_types.cc",
Nicolas Geoffray13a797b2017-03-15 16:41:31 +0000640 "642-fp-callees/fp_callees.cc",
Vladimir Marko5fdd7782017-04-20 11:26:03 +0100641 "647-jni-get-field-id/get_field_id.cc",
Roland Levillain0d2323e2017-06-26 18:14:39 +0100642 "656-annotation-lookup-generic-jni/test.cc",
Igor Murashkin545412b2017-08-17 15:26:54 -0700643 "661-oat-writer-layout/oat_writer_layout.cc",
644 "664-aget-verifier/aget-verifier.cc",
Vladimir Marko2196c652017-11-30 16:16:07 +0000645 "667-jit-jni-stub/jit_jni_stub_test.cc",
David Brazdil11b67b22018-01-18 16:41:40 +0000646 "674-hiddenapi/hiddenapi.cc",
David Brazdil331a5e12019-04-01 22:46:16 +0000647 "692-vdex-inmem-loader/vdex_inmem_loader.cc",
Dan Willemsen2ca27802017-09-27 14:57:43 -0700648 "708-jit-cache-churn/jit.cc",
Nicolas Geoffrayfa595882019-08-06 17:40:09 +0100649 "720-thread-priority/thread_priority.cc",
Alexey Grebenkince750492018-05-31 23:42:20 +0300650 "800-smali/jni.cc",
Alex Lightf889c702018-02-23 15:25:45 -0800651 "909-attach-agent/disallow_debugging.cc",
Mathieu Chartier00fbe4f2019-01-02 16:52:38 -0800652 "1001-app-image-regions/app_image_regions.cc",
Mathieu Chartier175ce3d2019-03-06 16:54:24 -0800653 "1002-notify-startup/startup_interface.cc",
Alex Lighte34fe442018-02-21 17:35:55 -0800654 "1947-breakpoint-redefine-deopt/check_deopt.cc",
Alex Lightf3677472019-06-26 16:31:53 -0700655 "1972-jni-id-swap-indices/jni_id.cc",
Alex Light55eccdf2019-10-07 13:51:13 +0000656 "1985-structural-redefine-stack-scope/stack_scope.cc",
Nicolas Geoffraye91e7952020-01-23 10:15:56 +0000657 "2011-stack-walk-concurrent-instrument/stack_walk_concurrent.cc",
Alex Light280e6c32020-03-03 13:52:07 -0800658 "2031-zygote-compiled-frame-deopt/native-wait.cc",
Hans Boehm672295a2020-04-16 21:31:17 -0700659 "2033-shutdown-mechanics/native_shutdown.cc",
Orion Hodson7285a4b2020-07-10 13:31:35 +0100660 "2036-jni-filechannel/jni_filechannel.cc",
Alex Light8d9c6042020-09-22 15:35:59 -0700661 "2037-thread-name-inherit/thread_name_inherit.cc",
Roland Levillainad0777d2018-02-12 20:00:18 +0000662 "common/runtime_state.cc",
663 "common/stack_inspect.cc",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700664 ],
665 shared_libs: [
666 "libbacktrace",
Andreas Gampe3fec9ac2016-09-13 10:47:28 -0700667 "libbase",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700668 "libnativehelper",
669 ],
Colin Crossafd3c9e2016-09-16 13:47:21 -0700670}
671
Paul Duffin2506eff2020-04-07 11:32:24 +0100672java_library {
Sasha Smundakc7c5d532019-02-27 15:03:37 -0800673 name: "art_cts_jvmti_test_library",
Martin Stjernholmb4abe0a2019-05-17 19:22:55 +0100674 visibility: [
675 "//cts/hostsidetests/jvmti:__subpackages__",
676 ],
Sasha Smundakc7c5d532019-02-27 15:03:37 -0800677 srcs: [
678 // shim classes. We use one that exposes the common functionality.
Alex Light23ca8fb2019-05-10 11:27:02 -0700679 "jvmti-common/Redefinition.java",
680 "jvmti-common/Main.java",
681 "jvmti-common/Trace.java",
682 "jvmti-common/Breakpoint.java",
683 "jvmti-common/Suspension.java",
684 "jvmti-common/Locals.java",
685 "jvmti-common/StackTrace.java",
686 "jvmti-common/FramePop.java",
687 "jvmti-common/Exceptions.java",
688 "jvmti-common/Monitors.java",
Alex Lightfe0ce642020-01-07 13:14:18 -0800689 "jvmti-common/NonStandardExit.java",
Alex Light23ca8fb2019-05-10 11:27:02 -0700690 "jvmti-common/Threads.java",
691 "jvmti-common/SuspendEvents.java",
Sasha Smundakc7c5d532019-02-27 15:03:37 -0800692
693 // Actual test classes.
694 "901-hello-ti-agent/src/art/Test901.java",
695 "902-hello-transformation/src/art/Test902.java",
696 "903-hello-tagging/src/art/Test903.java",
697 "904-object-allocation/src/art/Test904.java",
698 "905-object-free/src/art/Test905.java",
699 "906-iterate-heap/src/art/Test906.java",
700 "907-get-loaded-classes/src/art/Test907.java",
701 "907-get-loaded-classes/src/art/Cerr.java",
702 "908-gc-start-finish/src/art/Test908.java",
703 "910-methods/src/art/Test910.java",
704 "911-get-stack-trace/src/art/Test911.java",
705 "911-get-stack-trace/src/art/AllTraces.java",
706 "911-get-stack-trace/src/art/ControlData.java",
707 "911-get-stack-trace/src/art/Frames.java",
708 "911-get-stack-trace/src/art/OtherThread.java",
709 "911-get-stack-trace/src/art/PrintThread.java",
710 "911-get-stack-trace/src/art/Recurse.java",
711 "911-get-stack-trace/src/art/SameThread.java",
712 "911-get-stack-trace/src/art/ThreadListTraces.java",
713 "912-classes/src-art/art/Test912.java",
714 "912-classes/src-art/art/DexData.java",
715 "913-heaps/src/art/Test913.java",
716 "914-hello-obsolescence/src/art/Test914.java",
717 "915-obsolete-2/src/art/Test915.java",
718 "917-fields-transformation/src/art/Test917.java",
719 "918-fields/src/art/Test918.java",
720 "919-obsolete-fields/src/art/Test919.java",
721 "920-objects/src/art/Test920.java",
722 "922-properties/src/art/Test922.java",
723 "923-monitors/src/art/Test923.java",
724 "924-threads/src/art/Test924.java",
725 "925-threadgroups/src/art/Test925.java",
726 "926-multi-obsolescence/src/art/Test926.java",
727 "927-timers/src/art/Test927.java",
728 "928-jni-table/src/art/Test928.java",
729 "930-hello-retransform/src/art/Test930.java",
730 "931-agent-thread/src/art/Test931.java",
731 "932-transform-saves/src/art/Test932.java",
732 "933-misc-events/src/art/Test933.java",
733 "940-recursive-obsolete/src/art/Test940.java",
734 "942-private-recursive/src/art/Test942.java",
735 "944-transform-classloaders/src/art/Test944.java",
736 "945-obsolete-native/src/art/Test945.java",
737 "947-reflect-method/src/art/Test947.java",
738 "951-threaded-obsolete/src/art/Test951.java",
739 "982-ok-no-retransform/src/art/Test982.java",
740 "983-source-transform-verify/src/art/Test983.java",
741 "984-obsolete-invoke/src/art/Test984.java",
742 "985-re-obsolete/src/art/Test985.java",
743 "986-native-method-bind/src/art/Test986.java",
744 "988-method-trace/src/art/Test988.java",
745 "988-method-trace/src/art/Test988Intrinsics.java",
746 "989-method-trace-throw/src/art/Test989.java",
747 "990-field-trace/src/art/Test990.java",
748 "991-field-trace-2/src/art/Test991.java",
749 "992-source-data/src/art/Test992.java",
750 "992-source-data/src/art/Target2.java",
751 "993-breakpoints/src/art/Test993.java",
752 "994-breakpoint-line/src/art/Test994.java",
753 "995-breakpoints-throw/src/art/Test995.java",
754 "996-breakpoint-obsolete/src/art/Test996.java",
755 "997-single-step/src/art/Test997.java",
756 "1900-track-alloc/src/art/Test1900.java",
757 "1901-get-bytecodes/src/art/Test1901.java",
758 "1902-suspend/src/art/Test1902.java",
759 "1903-suspend-self/src/art/Test1903.java",
760 "1904-double-suspend/src/art/Test1904.java",
761 "1906-suspend-list-me-first/src/art/Test1906.java",
762 "1907-suspend-list-self-twice/src/art/Test1907.java",
763 "1908-suspend-native-resume-self/src/art/Test1908.java",
764 "1909-per-agent-tls/src/art/Test1909.java",
765 "1910-transform-with-default/src/art/Test1910.java",
766 "1911-get-local-var-table/src/art/Test1911.java",
767 "1912-get-set-local-primitive/src/art/Test1912.java",
768 "1913-get-set-local-objects/src/art/Test1913.java",
769 "1914-get-local-instance/src/art/Test1914.java",
770 "1915-get-set-local-current-thread/src/art/Test1915.java",
771 "1916-get-set-current-frame/src/art/Test1916.java",
772 "1917-get-stack-frame/src/art/Test1917.java",
773 "1920-suspend-native-monitor/src/art/Test1920.java",
774 "1921-suspend-native-recursive-monitor/src/art/Test1921.java",
775 "1922-owned-monitors-info/src/art/Test1922.java",
776 "1923-frame-pop/src/art/Test1923.java",
777 "1924-frame-pop-toggle/src/art/Test1924.java",
778 "1925-self-frame-pop/src/art/Test1925.java",
779 "1926-missed-frame-pop/src/art/Test1926.java",
780 "1927-exception-event/src/art/Test1927.java",
781 "1928-exception-event-exception/src/art/Test1928.java",
782 "1930-monitor-info/src/art/Test1930.java",
783 "1931-monitor-events/src/art/Test1931.java",
784 "1932-monitor-events-misc/src/art/Test1932.java",
785 "1933-monitor-current-contended/src/art/Test1933.java",
786 "1934-jvmti-signal-thread/src/art/Test1934.java",
787 "1936-thread-end-events/src/art/Test1936.java",
788 "1937-transform-soft-fail/src/art/Test1937.java",
789 "1939-proxy-frames/src/art/Test1939.java",
790 "1941-dispose-stress/src/art/Test1941.java",
791 "1942-suspend-raw-monitor-exit/src/art/Test1942.java",
792 "1943-suspend-raw-monitor-wait/src/art/Test1943.java",
793 "1953-pop-frame/src/art/Test1953.java",
794 "1958-transform-try-jit/src/art/Test1958.java",
Alex Light40607862019-05-06 18:16:24 +0000795 "1962-multi-thread-events/src/art/Test1962.java",
Alex Lightfe0ce642020-01-07 13:14:18 -0800796 "1963-add-to-dex-classloader-in-memory/src/art/Test1963.java",
797 "1967-get-set-local-bad-slot/src/art/Test1967.java",
798 "1968-force-early-return/src/art/Test1968.java",
799 "1969-force-early-return-void/src/art/Test1969.java",
800 "1970-force-early-return-long/src/art/Test1970.java",
801 "1971-multi-force-early-return/src/art/Test1971.java",
802 "1974-resize-array/src/art/Test1974.java",
803 "1975-hello-structural-transformation/src/art/Test1975.java",
804 "1975-hello-structural-transformation/src/art/Transform1975.java",
805 "1976-hello-structural-static-methods/src/art/Test1976.java",
806 "1976-hello-structural-static-methods/src/art/Transform1976.java",
807 "1977-hello-structural-obsolescence/src/art/Test1977.java",
808 "1978-regular-obsolete-then-structural-obsolescence/src/art/Test1978.java",
809 "1979-threaded-structural-transformation/src/art/Test1979.java",
810 "1981-structural-redef-private-method-handles/src/art/Test1981.java",
811 // TODO Requires VarHandles to be un-@hide. See b/64382372
812 // "1981-structural-redef-private-method-handles/src/art/Test1981_Varhandles.java",
813 "1982-no-virtuals-structural-redefinition/src/art/Test1982.java",
814 "1983-structural-redefinition-failures/src/art/Test1983.java",
815 "1984-structural-redefine-field-trace/src/art/Test1984.java",
816 "1988-multi-structural-redefine/src/art/Test1988.java",
817 "1989-transform-bad-monitor/src/art/Test1989.java",
818 "1990-structural-bad-verify/src/art/Test1990.java",
819 "1991-hello-structural-retransform/src/art/Test1991.java",
820 "1992-retransform-no-such-field/src/art/Test1992.java",
821 "1994-final-virtual-structural/src/art/Test1994.java",
822 "1995-final-virtual-structural-multithread/src/art/Test1995.java",
823 "1996-final-override-virtual-structural/src/art/Test1996.java",
824 "1997-structural-shadow-method/src/art/Test1997.java",
825 "1998-structural-shadow-field/src/art/Test1998.java",
826 "1999-virtual-structural/src/art/Test1999.java",
827 "2001-virtual-structural-multithread/src-art/art/Test2001.java",
828 "2002-virtual-structural-initializing/src-art/art/Test2002.java",
829 "2003-double-virtual-structural/src/art/Test2003.java",
830 "2004-double-virtual-structural-abstract/src/art/Test2004.java",
831 "2005-pause-all-redefine-multithreaded/src/art/Test2005.java",
832 "2006-virtual-structural-finalizing/src-art/art/Test2006.java",
833 "2007-virtual-structural-finalizable/src-art/art/Test2007.java",
Sasha Smundakc7c5d532019-02-27 15:03:37 -0800834 ],
835}
836
837// CTS test runner in cts/hostsidetests/jvmti looks for an expected test
838// result for the test NN in the file results.NN.expected.txt while in the
839// source tree each expected test result is in the NN-xxxx/expected.txt.
840// Copy+rename them them to a temporary directory and them zip them.
841java_genrule {
Paul Duffine5621f52020-03-25 10:51:14 +0000842 name: "expected_cts_outputs_gen",
Sasha Smundakc7c5d532019-02-27 15:03:37 -0800843 srcs: [
844 "901-hello-ti-agent/expected.txt",
845 "902-hello-transformation/expected.txt",
846 "903-hello-tagging/expected.txt",
847 "904-object-allocation/expected.txt",
848 "905-object-free/expected.txt",
849 "906-iterate-heap/expected.txt",
850 "907-get-loaded-classes/expected.txt",
851 "908-gc-start-finish/expected.txt",
852 "910-methods/expected.txt",
Alex Light4681f202020-01-10 09:27:57 -0800853 "911-get-stack-trace/expected-cts-version.txt",
Sasha Smundakc7c5d532019-02-27 15:03:37 -0800854 "912-classes/expected.txt",
855 "913-heaps/expected.txt",
856 "914-hello-obsolescence/expected.txt",
857 "915-obsolete-2/expected.txt",
858 "917-fields-transformation/expected.txt",
859 "918-fields/expected.txt",
860 "919-obsolete-fields/expected.txt",
861 "920-objects/expected.txt",
862 "922-properties/expected.txt",
863 "923-monitors/expected.txt",
864 "924-threads/expected.txt",
865 "925-threadgroups/expected.txt",
866 "926-multi-obsolescence/expected.txt",
867 "927-timers/expected.txt",
868 "928-jni-table/expected.txt",
869 "930-hello-retransform/expected.txt",
870 "931-agent-thread/expected.txt",
871 "932-transform-saves/expected.txt",
872 "933-misc-events/expected.txt",
873 "940-recursive-obsolete/expected.txt",
874 "942-private-recursive/expected.txt",
875 "944-transform-classloaders/expected.txt",
876 "945-obsolete-native/expected.txt",
877 "947-reflect-method/expected.txt",
878 "951-threaded-obsolete/expected.txt",
879 "982-ok-no-retransform/expected.txt",
880 "983-source-transform-verify/expected.txt",
881 "984-obsolete-invoke/expected.txt",
882 "985-re-obsolete/expected.txt",
883 "986-native-method-bind/expected.txt",
884 "988-method-trace/expected.txt",
885 "989-method-trace-throw/expected.txt",
886 "990-field-trace/expected.txt",
887 "991-field-trace-2/expected.txt",
888 "992-source-data/expected.txt",
889 "993-breakpoints/expected.txt",
890 "994-breakpoint-line/expected.txt",
891 "995-breakpoints-throw/expected.txt",
892 "996-breakpoint-obsolete/expected.txt",
893 "997-single-step/expected.txt",
894 "1900-track-alloc/expected.txt",
895 "1901-get-bytecodes/expected.txt",
896 "1902-suspend/expected.txt",
897 "1903-suspend-self/expected.txt",
898 "1904-double-suspend/expected.txt",
899 "1906-suspend-list-me-first/expected.txt",
900 "1907-suspend-list-self-twice/expected.txt",
901 "1908-suspend-native-resume-self/expected.txt",
902 "1909-per-agent-tls/expected.txt",
903 "1910-transform-with-default/expected.txt",
904 "1911-get-local-var-table/expected.txt",
905 "1912-get-set-local-primitive/expected.txt",
906 "1913-get-set-local-objects/expected.txt",
907 "1914-get-local-instance/expected.txt",
908 "1915-get-set-local-current-thread/expected.txt",
909 "1916-get-set-current-frame/expected.txt",
910 "1917-get-stack-frame/expected.txt",
911 "1920-suspend-native-monitor/expected.txt",
912 "1921-suspend-native-recursive-monitor/expected.txt",
913 "1922-owned-monitors-info/expected.txt",
914 "1923-frame-pop/expected.txt",
915 "1924-frame-pop-toggle/expected.txt",
916 "1925-self-frame-pop/expected.txt",
917 "1926-missed-frame-pop/expected.txt",
918 "1927-exception-event/expected.txt",
919 "1928-exception-event-exception/expected.txt",
920 "1930-monitor-info/expected.txt",
921 "1931-monitor-events/expected.txt",
922 "1932-monitor-events-misc/expected.txt",
923 "1933-monitor-current-contended/expected.txt",
924 "1934-jvmti-signal-thread/expected.txt",
925 "1936-thread-end-events/expected.txt",
926 "1937-transform-soft-fail/expected.txt",
927 "1939-proxy-frames/expected.txt",
928 "1941-dispose-stress/expected.txt",
929 "1942-suspend-raw-monitor-exit/expected.txt",
930 "1943-suspend-raw-monitor-wait/expected.txt",
931 "1953-pop-frame/expected.txt",
932 "1958-transform-try-jit/expected.txt",
Alex Lightfe0ce642020-01-07 13:14:18 -0800933 "1962-multi-thread-events/expected.txt",
934 "1963-add-to-dex-classloader-in-memory/expected.txt",
935 "1967-get-set-local-bad-slot/expected.txt",
936 "1968-force-early-return/expected.txt",
937 "1969-force-early-return-void/expected.txt",
938 "1970-force-early-return-long/expected.txt",
939 "1971-multi-force-early-return/expected.txt",
940 "1974-resize-array/expected.txt",
941 "1975-hello-structural-transformation/expected.txt",
942 "1976-hello-structural-static-methods/expected.txt",
943 "1977-hello-structural-obsolescence/expected.txt",
944 "1978-regular-obsolete-then-structural-obsolescence/expected.txt",
945 "1979-threaded-structural-transformation/expected.txt",
946 // TODO Requires VarHandles to be un-@hide. See b/64382372
947 // "test/1981-structural-redef-private-method-handles/expected.txt",
948 "1981-structural-redef-private-method-handles/expected_no_mh.txt",
949 "1982-no-virtuals-structural-redefinition/expected.txt",
Alex Light5c7f3672020-01-27 15:23:30 -0800950 // JNI-id use can change the outcome of this test on device.
951 "1983-structural-redefinition-failures/expected-cts.txt",
Alex Lightfe0ce642020-01-07 13:14:18 -0800952 "1984-structural-redefine-field-trace/expected.txt",
953 "1988-multi-structural-redefine/expected.txt",
954 "1989-transform-bad-monitor/expected.txt",
955 "1990-structural-bad-verify/expected.txt",
956 "1991-hello-structural-retransform/expected.txt",
957 "1992-retransform-no-such-field/expected.txt",
958 "1994-final-virtual-structural/expected.txt",
959 "1995-final-virtual-structural-multithread/expected.txt",
960 "1996-final-override-virtual-structural/expected.txt",
961 "1997-structural-shadow-method/expected.txt",
962 "1998-structural-shadow-field/expected.txt",
963 "1999-virtual-structural/expected.txt",
964 "2001-virtual-structural-multithread/expected.txt",
965 "2002-virtual-structural-initializing/expected.txt",
966 "2003-double-virtual-structural/expected.txt",
967 "2004-double-virtual-structural-abstract/expected.txt",
968 "2005-pause-all-redefine-multithreaded/expected.txt",
969 "2006-virtual-structural-finalizing/expected.txt",
970 "2007-virtual-structural-finalizable/expected.txt",
Sasha Smundakc7c5d532019-02-27 15:03:37 -0800971 ],
972 out: ["expected_cts_outputs.jar"],
973 tools: ["soong_zip"],
974 cmd: "rm -rf $(genDir)/res && mkdir -p $(genDir)/res && " +
975 "for f in $(in); do x=$${f#art/test/}; " +
976 "cp $$f $(genDir)/res/results.$${x%%-*}.expected.txt; done && " +
977 "$(location soong_zip) -o $(out) -C $(genDir)/res -D $(genDir)/res",
978}
David Srbecky8c8f1482020-02-05 20:17:10 +0000979
Paul Duffine5621f52020-03-25 10:51:14 +0000980// Wrap the expected_cts_outputs_gen inside a java library to make it easy
981// to export as a member of a module_exports.
982java_library {
983 name: "expected_cts_outputs",
984 visibility: [
985 "//art/build/sdk",
986 "//cts/hostsidetests/jvmti:__subpackages__",
987 ],
988 static_libs: [
989 "expected_cts_outputs_gen",
990 ],
991 sdk_version: "core_current",
992}
993
David Srbeckyee257162020-02-28 15:50:13 +0000994art_cc_test {
David Srbeckyf61e0612020-08-14 16:13:35 +0100995 name: "ArtGtestsTargetInstallApex",
David Srbeckyee257162020-02-28 15:50:13 +0000996 data: [
997 // We need the ART testing apex, which contains all gtest binaries.
David Srbeckyf61e0612020-08-14 16:13:35 +0100998 // Note that due to build system and linker constraints the gtests must be in the apex.
David Srbeckyee257162020-02-28 15:50:13 +0000999 ":com.android.art.testing",
David Srbeckyee257162020-02-28 15:50:13 +00001000 ],
David Srbeckyf61e0612020-08-14 16:13:35 +01001001 // It seems that only device-tests build can create a valid apex.
Roland Levillain423aefc2020-09-01 18:42:22 +01001002 test_suites: [
1003 "device-tests",
1004 "mts",
1005 ],
David Srbeckyf61e0612020-08-14 16:13:35 +01001006 test_config: "art-gtests-target-install-apex.xml",
Roland Levillain423aefc2020-09-01 18:42:22 +01001007
1008 // Support multilib variants (using different suffix per sub-architecture), which is needed on
1009 // build targets with secondary architectures, as the MTS test suite packaging logic flattens
1010 // all test artifacts into a single `testcases` directory.
1011 compile_multilib: "both",
1012 multilib: {
1013 lib32: {
1014 suffix: "32",
1015 },
1016 lib64: {
1017 suffix: "64",
1018 },
1019 },
David Srbeckyf61e0612020-08-14 16:13:35 +01001020}
1021
1022art_cc_test {
1023 name: "ArtGtestsTargetChroot",
1024 data: [
1025 // We need the ART testing apex, which contains all gtest binaries.
1026 // Note that due to build system and linker constraints the gtests must be in the apex.
1027 ":com.android.art.testing",
1028 ],
1029 test_suites: ["general-tests"],
1030 test_config: "art-gtests-target-chroot.xml",
David Srbeckyee257162020-02-28 15:50:13 +00001031}
1032
David Srbecky8c8f1482020-02-05 20:17:10 +00001033filegroup {
1034 name: "art-gtest-jars",
1035 srcs: [
1036 ":art-gtest-jars-AbstractMethod",
1037 ":art-gtest-jars-AllFields",
1038 ":art-gtest-jars-DefaultMethods",
1039 ":art-gtest-jars-DexToDexDecompiler",
1040 ":art-gtest-jars-ErroneousA",
1041 ":art-gtest-jars-ErroneousB",
1042 ":art-gtest-jars-ErroneousInit",
Vladimir Markofdd46842020-03-25 14:57:17 +00001043 ":art-gtest-jars-Extension1",
1044 ":art-gtest-jars-Extension2",
David Srbecky8c8f1482020-02-05 20:17:10 +00001045 ":art-gtest-jars-ForClassLoaderA",
1046 ":art-gtest-jars-ForClassLoaderB",
1047 ":art-gtest-jars-ForClassLoaderC",
1048 ":art-gtest-jars-ForClassLoaderD",
1049 ":art-gtest-jars-ExceptionHandle",
1050 ":art-gtest-jars-GetMethodSignature",
1051 ":art-gtest-jars-HiddenApi",
1052 ":art-gtest-jars-HiddenApiSignatures",
1053 ":art-gtest-jars-HiddenApiStubs",
1054 ":art-gtest-jars-ImageLayoutA",
1055 ":art-gtest-jars-ImageLayoutB",
1056 ":art-gtest-jars-IMTA",
1057 ":art-gtest-jars-IMTB",
1058 ":art-gtest-jars-Instrumentation",
1059 ":art-gtest-jars-Interfaces",
1060 ":art-gtest-jars-Lookup",
1061 ":art-gtest-jars-Main",
1062 ":art-gtest-jars-ManyMethods",
1063 ":art-gtest-jars-MethodTypes",
1064 ":art-gtest-jars-MultiDex",
1065 ":art-gtest-jars-MultiDexModifiedSecondary",
1066 ":art-gtest-jars-MyClass",
1067 ":art-gtest-jars-MyClassNatives",
1068 ":art-gtest-jars-Nested",
1069 ":art-gtest-jars-NonStaticLeafMethods",
1070 ":art-gtest-jars-Packages",
1071 ":art-gtest-jars-ProtoCompare",
1072 ":art-gtest-jars-ProtoCompare2",
1073 ":art-gtest-jars-ProfileTestMultiDex",
1074 ":art-gtest-jars-StaticLeafMethods",
1075 ":art-gtest-jars-Statics",
1076 ":art-gtest-jars-StaticsFromCode",
1077 ":art-gtest-jars-StringLiterals",
1078 ":art-gtest-jars-Transaction",
1079 ":art-gtest-jars-XandY",
1080 ":art-gtest-jars-MainEmptyUncompressed",
1081 ":art-gtest-jars-MainEmptyUncompressedAligned",
1082 ":art-gtest-jars-MainStripped",
1083 ":art-gtest-jars-MainUncompressedAligned",
1084 ":art-gtest-jars-MultiDexUncompressedAligned",
1085 ":art-gtest-jars-VerifierDeps",
1086 ":art-gtest-jars-VerifierDepsMulti",
1087 ":art-gtest-jars-VerifySoftFailDuringClinit",
1088 ],
1089}
1090
1091java_defaults {
1092 name: "art-gtest-jars-defaults",
1093 installable: true,
1094 dex_preopt: {
1095 enabled: false,
1096 },
1097 sdk_version: "core_platform",
David Srbecky4a88a5a2020-05-05 16:21:57 +01001098 uncompress_dex: false,
David Srbecky8c8f1482020-02-05 20:17:10 +00001099}
1100
1101// The following modules are just trivial compilations (non-trivial cases are the end).
1102
1103java_library {
1104 name: "art-gtest-jars-AbstractMethod",
1105 srcs: ["AbstractMethod/**/*.java"],
1106 defaults: ["art-gtest-jars-defaults"],
1107}
1108
1109java_library {
1110 name: "art-gtest-jars-AllFields",
1111 srcs: ["AllFields/**/*.java"],
1112 defaults: ["art-gtest-jars-defaults"],
1113}
1114
1115java_library {
1116 name: "art-gtest-jars-DefaultMethods",
1117 srcs: ["DefaultMethods/**/*.java"],
1118 defaults: ["art-gtest-jars-defaults"],
1119}
1120
1121java_library {
1122 name: "art-gtest-jars-DexToDexDecompiler",
1123 srcs: ["DexToDexDecompiler/**/*.java"],
1124 defaults: ["art-gtest-jars-defaults"],
1125}
1126
1127java_library {
1128 name: "art-gtest-jars-ErroneousA",
1129 srcs: ["ErroneousA/**/*.java"],
1130 defaults: ["art-gtest-jars-defaults"],
1131}
1132
1133java_library {
1134 name: "art-gtest-jars-ErroneousB",
1135 srcs: ["ErroneousB/**/*.java"],
1136 defaults: ["art-gtest-jars-defaults"],
1137}
1138
1139java_library {
1140 name: "art-gtest-jars-ErroneousInit",
1141 srcs: ["ErroneousInit/**/*.java"],
1142 defaults: ["art-gtest-jars-defaults"],
1143}
1144
1145java_library {
Vladimir Markofdd46842020-03-25 14:57:17 +00001146 name: "art-gtest-jars-Extension1",
1147 srcs: ["Extension1/**/*.java"],
1148 defaults: ["art-gtest-jars-defaults"],
1149}
1150
1151java_library {
1152 name: "art-gtest-jars-Extension2",
1153 srcs: ["Extension2/**/*.java"],
1154 defaults: ["art-gtest-jars-defaults"],
1155}
1156
1157java_library {
David Srbecky8c8f1482020-02-05 20:17:10 +00001158 name: "art-gtest-jars-ForClassLoaderA",
1159 srcs: ["ForClassLoaderA/**/*.java"],
1160 defaults: ["art-gtest-jars-defaults"],
1161}
1162
1163java_library {
1164 name: "art-gtest-jars-ForClassLoaderB",
1165 srcs: ["ForClassLoaderB/**/*.java"],
1166 defaults: ["art-gtest-jars-defaults"],
1167}
1168
1169java_library {
1170 name: "art-gtest-jars-ForClassLoaderC",
1171 srcs: ["ForClassLoaderC/**/*.java"],
1172 defaults: ["art-gtest-jars-defaults"],
1173}
1174
1175java_library {
1176 name: "art-gtest-jars-ForClassLoaderD",
1177 srcs: ["ForClassLoaderD/**/*.java"],
1178 defaults: ["art-gtest-jars-defaults"],
1179}
1180
1181java_library {
1182 name: "art-gtest-jars-ExceptionHandle",
1183 srcs: ["ExceptionHandle/**/*.java"],
1184 defaults: ["art-gtest-jars-defaults"],
1185}
1186
1187java_library {
1188 name: "art-gtest-jars-GetMethodSignature",
1189 srcs: ["GetMethodSignature/**/*.java"],
1190 defaults: ["art-gtest-jars-defaults"],
1191}
1192
1193java_library {
1194 name: "art-gtest-jars-HiddenApi",
1195 srcs: ["HiddenApi/**/*.java"],
1196 defaults: ["art-gtest-jars-defaults"],
1197}
1198
1199java_library {
1200 name: "art-gtest-jars-HiddenApiSignatures",
1201 srcs: ["HiddenApiSignatures/**/*.java"],
1202 defaults: ["art-gtest-jars-defaults"],
1203}
1204
1205java_library {
1206 name: "art-gtest-jars-HiddenApiStubs",
1207 srcs: ["HiddenApiStubs/**/*.java"],
1208 defaults: ["art-gtest-jars-defaults"],
1209}
1210
1211java_library {
1212 name: "art-gtest-jars-ImageLayoutA",
1213 srcs: ["ImageLayoutA/**/*.java"],
1214 defaults: ["art-gtest-jars-defaults"],
1215}
1216
1217java_library {
1218 name: "art-gtest-jars-ImageLayoutB",
1219 srcs: ["ImageLayoutB/**/*.java"],
1220 defaults: ["art-gtest-jars-defaults"],
1221}
1222
1223java_library {
1224 name: "art-gtest-jars-IMTA",
1225 srcs: ["IMTA/**/*.java"],
1226 defaults: ["art-gtest-jars-defaults"],
1227}
1228
1229java_library {
1230 name: "art-gtest-jars-IMTB",
1231 srcs: ["IMTB/**/*.java"],
1232 defaults: ["art-gtest-jars-defaults"],
1233}
1234
1235java_library {
1236 name: "art-gtest-jars-Instrumentation",
1237 srcs: ["Instrumentation/**/*.java"],
1238 defaults: ["art-gtest-jars-defaults"],
1239}
1240
1241java_library {
1242 name: "art-gtest-jars-Interfaces",
1243 srcs: ["Interfaces/**/*.java"],
1244 defaults: ["art-gtest-jars-defaults"],
1245}
1246
1247java_library {
1248 name: "art-gtest-jars-Lookup",
1249 srcs: ["Lookup/**/*.java"],
1250 defaults: ["art-gtest-jars-defaults"],
1251}
1252
1253java_library {
1254 name: "art-gtest-jars-Main",
1255 srcs: ["Main/**/*.java"],
1256 defaults: ["art-gtest-jars-defaults"],
1257}
1258
1259java_library {
1260 name: "art-gtest-jars-ManyMethods",
1261 srcs: ["ManyMethods/**/*.java"],
1262 defaults: ["art-gtest-jars-defaults"],
1263}
1264
1265java_library {
1266 name: "art-gtest-jars-MethodTypes",
1267 srcs: ["MethodTypes/**/*.java"],
1268 defaults: ["art-gtest-jars-defaults"],
1269}
1270
1271java_library {
1272 name: "art-gtest-jars-MyClass",
1273 srcs: ["MyClass/**/*.java"],
1274 defaults: ["art-gtest-jars-defaults"],
1275}
1276
1277java_library {
1278 name: "art-gtest-jars-MyClassNatives",
1279 srcs: ["MyClassNatives/**/*.java"],
1280 defaults: ["art-gtest-jars-defaults"],
1281}
1282
1283java_library {
1284 name: "art-gtest-jars-Nested",
1285 srcs: ["Nested/**/*.java"],
1286 defaults: ["art-gtest-jars-defaults"],
1287}
1288
1289java_library {
1290 name: "art-gtest-jars-NonStaticLeafMethods",
1291 srcs: ["NonStaticLeafMethods/**/*.java"],
1292 defaults: ["art-gtest-jars-defaults"],
1293}
1294
1295java_library {
1296 name: "art-gtest-jars-Packages",
1297 srcs: ["Packages/**/*.java"],
1298 defaults: ["art-gtest-jars-defaults"],
1299}
1300
1301java_library {
1302 name: "art-gtest-jars-ProtoCompare",
1303 srcs: ["ProtoCompare/**/*.java"],
1304 defaults: ["art-gtest-jars-defaults"],
1305}
1306
1307java_library {
1308 name: "art-gtest-jars-ProtoCompare2",
1309 srcs: ["ProtoCompare2/**/*.java"],
1310 defaults: ["art-gtest-jars-defaults"],
1311}
1312
1313java_library {
1314 name: "art-gtest-jars-StaticLeafMethods",
1315 srcs: ["StaticLeafMethods/**/*.java"],
1316 defaults: ["art-gtest-jars-defaults"],
1317}
1318
1319java_library {
1320 name: "art-gtest-jars-Statics",
1321 srcs: ["Statics/**/*.java"],
1322 defaults: ["art-gtest-jars-defaults"],
1323}
1324
1325java_library {
1326 name: "art-gtest-jars-StaticsFromCode",
1327 srcs: ["StaticsFromCode/**/*.java"],
1328 defaults: ["art-gtest-jars-defaults"],
1329}
1330
1331java_library {
1332 name: "art-gtest-jars-StringLiterals",
1333 srcs: ["StringLiterals/**/*.java"],
1334 defaults: ["art-gtest-jars-defaults"],
1335}
1336
1337java_library {
1338 name: "art-gtest-jars-Transaction",
1339 srcs: ["Transaction/**/*.java"],
1340 defaults: ["art-gtest-jars-defaults"],
1341}
1342
1343java_library {
1344 name: "art-gtest-jars-XandY",
1345 srcs: ["XandY/**/*.java"],
1346 defaults: ["art-gtest-jars-defaults"],
1347}
1348
1349// The following cases are non-trivial.
1350
1351// Uncompress classes.dex files in the jar file.
1352genrule_defaults {
1353 name: "art-gtest-jars-uncompress-defaults",
1354 cmd: "$(location zip2zip) -i $(in) -o $(out) -0 'classes*.dex'",
1355 tools: ["zip2zip"],
1356}
1357
1358// Ensure the files are at least 4 byte aligned.
1359genrule_defaults {
1360 name: "art-gtest-jars-align-defaults",
1361 cmd: "$(location zipalign) 4 $(in) $(out)",
1362 tools: ["zipalign"],
1363}
1364
1365// Assemble jar file from smali source.
1366genrule_defaults {
1367 name: "art-gtest-jars-smali-defaults",
1368 cmd: "$(location smali) assemble --output $(out) $(in)",
1369 tools: ["smali"],
1370}
1371
1372// A copy of Main with the classes.dex stripped for the oat file assistant tests.
1373genrule {
1374 name: "art-gtest-jars-MainStripped",
1375 srcs: [":art-gtest-jars-Main"],
1376 cmd: "$(location zip2zip) -i $(in) -o $(out) -x 'classes*.dex'",
1377 out: ["art-gtest-jars-MainStripped.jar"],
1378 tools: ["zip2zip"],
1379}
1380
1381// An empty.dex that is empty and uncompressed for the dex2oat tests.
1382genrule {
1383 name: "art-gtest-jars-MainEmptyUncompressed",
1384 srcs: ["Main/empty.dex"],
1385 cmd: "$(location soong_zip) -j -L 0 -o $(out) -f $(in)",
1386 out: ["art-gtest-jars-MainEmptyUncompressed.jar"],
1387 tools: ["soong_zip"],
1388}
1389
1390// An empty.dex that is empty and uncompressed and aligned for the dex2oat tests.
1391genrule {
1392 name: "art-gtest-jars-MainEmptyUncompressedAligned",
1393 defaults: ["art-gtest-jars-align-defaults"],
1394 srcs: [":art-gtest-jars-MainEmptyUncompressed"],
1395 out: ["art-gtest-jars-MainEmptyUncompressedAligned.jar"],
1396}
1397
1398// A copy of Main with the classes.dex uncompressed for the dex2oat tests.
1399genrule {
1400 name: "art-gtest-jars-MainUncompressed",
1401 defaults: ["art-gtest-jars-uncompress-defaults"],
1402 srcs: [":art-gtest-jars-Main"],
1403 out: ["art-gtest-jars-MainUncompressed.jar"],
1404}
1405
1406// A copy of Main with the classes.dex uncompressed and aligned for the dex2oat tests.
1407genrule {
1408 name: "art-gtest-jars-MainUncompressedAligned",
1409 defaults: ["art-gtest-jars-align-defaults"],
1410 srcs: [":art-gtest-jars-MainUncompressed"],
1411 out: ["art-gtest-jars-MainUncompressedAligned.jar"],
1412}
1413
1414java_library {
1415 name: "art-gtest-jars-MultiDex",
1416 srcs: ["MultiDex/**/*.java"],
1417 defaults: ["art-gtest-jars-defaults"],
1418 min_sdk_version: "19",
1419 dxflags: [
1420 "--main-dex-list",
1421 "art/test/MultiDex/main.list",
1422 ],
1423}
1424
1425// A copy of MultiDex with the classes.dex uncompressed for the OatFile tests.
1426genrule {
1427 name: "art-gtest-jars-MultiDexUncompressed",
1428 defaults: ["art-gtest-jars-uncompress-defaults"],
1429 srcs: [":art-gtest-jars-MultiDex"],
1430 out: ["art-gtest-jars-MultiDexUncompressed.jar"],
1431}
1432
1433// A copy of MultiDex with the classes.dex uncompressed and aligned for the OatFile tests.
1434genrule {
1435 name: "art-gtest-jars-MultiDexUncompressedAligned",
1436 defaults: ["art-gtest-jars-align-defaults"],
1437 srcs: [":art-gtest-jars-MultiDexUncompressed"],
1438 out: ["art-gtest-jars-MultiDexUncompressedAligned.jar"],
1439}
1440
1441java_library {
1442 name: "art-gtest-jars-MultiDexModifiedSecondary",
1443 srcs: ["MultiDexModifiedSecondary/**/*.java"],
1444 defaults: ["art-gtest-jars-defaults"],
1445 min_sdk_version: "19",
1446 dxflags: [
1447 "--main-dex-list",
1448 "art/test/MultiDexModifiedSecondary/main.list",
1449 ],
1450}
1451
1452java_library {
1453 name: "art-gtest-jars-ProfileTestMultiDex",
1454 srcs: ["ProfileTestMultiDex/**/*.java"],
1455 defaults: ["art-gtest-jars-defaults"],
1456 min_sdk_version: "19",
1457 dxflags: [
1458 "--main-dex-list",
1459 "art/test/ProfileTestMultiDex/main.list",
1460 ],
1461}
1462
David Srbeckyedda3ca2020-07-08 00:41:08 +01001463// Smali compiled files.
1464// Since they are not compiled by javac, we use different extension for them.
1465// The .jar extension for them would cause subtle failures in the test infra,
1466// which finds and opens all jar files and expects them to be valid zip files.
1467
David Srbecky8c8f1482020-02-05 20:17:10 +00001468genrule {
1469 name: "art-gtest-jars-VerifierDeps",
1470 defaults: ["art-gtest-jars-smali-defaults"],
1471 srcs: ["VerifierDeps/**/*.smali"],
David Srbeckyedda3ca2020-07-08 00:41:08 +01001472 out: ["art-gtest-jars-VerifierDeps.dex"],
David Srbecky8c8f1482020-02-05 20:17:10 +00001473}
1474
1475genrule {
1476 name: "art-gtest-jars-VerifierDepsMulti",
1477 defaults: ["art-gtest-jars-smali-defaults"],
1478 srcs: ["VerifierDepsMulti/**/*.smali"],
David Srbeckyedda3ca2020-07-08 00:41:08 +01001479 out: ["art-gtest-jars-VerifierDepsMulti.dex"],
David Srbecky8c8f1482020-02-05 20:17:10 +00001480}
1481
1482genrule {
1483 name: "art-gtest-jars-VerifySoftFailDuringClinit",
1484 defaults: ["art-gtest-jars-smali-defaults"],
1485 srcs: ["VerifySoftFailDuringClinit/**/*.smali"],
David Srbeckyedda3ca2020-07-08 00:41:08 +01001486 out: ["art-gtest-jars-VerifySoftFailDuringClinit.dex"],
David Srbecky8c8f1482020-02-05 20:17:10 +00001487}
David Srbecky4a88a5a2020-05-05 16:21:57 +01001488
1489genrule {
1490 name: "art-gtest-jars-LinkageTest",
1491 defaults: ["art-gtest-jars-smali-defaults"],
1492 srcs: ["LinkageTest/*.smali"],
David Srbeckyedda3ca2020-07-08 00:41:08 +01001493 out: ["art-gtest-jars-LinkageTest.dex"],
David Srbecky4a88a5a2020-05-05 16:21:57 +01001494}