blob: 6efd4e05dc842e078b0b6dbc9b11b9c00c8f345c [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 Srbecky22872da2020-06-25 15:23:15 +010057 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 Levillaina8049c62019-11-01 16:11:20 +0000189filegroup {
190 name: "art-run-test-template",
191 srcs: [
192 "AndroidTestTemplate.xml",
193 ],
194}
195
Roland Levillain79d90922020-02-04 15:41:45 +0000196java_defaults {
197 name: "art-run-test-defaults",
198 // Compile against the "core" bootclasspath, not the "default" one (current
199 // platform). See also function `javac_with_bootclasspath` in
200 // `test/etc/default-build`, as well as `art/test/etc/default-build`).
201 sdk_version: "core_platform",
202 data: ["expected.txt"],
203 test_config_template: ":art-run-test-template",
204 test_suites: ["general-tests"],
205}
206
Roland Levillain962a1102019-11-01 16:20:33 +0000207art_cc_test_library {
208 name: "libarttest",
209 defaults: ["libarttest-defaults"],
210 shared_libs: [
211 "libart",
212 "libdexfile",
213 "libprofile",
214 "libartbase",
215 ],
216}
217
218art_cc_test_library {
219 name: "libarttestd",
220 defaults: [
221 "art_debug_defaults",
222 "libarttest-defaults",
223 ],
224 shared_libs: [
225 "libartd",
226 "libdexfiled",
227 "libprofiled",
228 "libartbased",
229 ],
230}
231
232art_cc_defaults {
233 name: "libnativebridgetest-defaults",
234 defaults: [
235 "art_test_defaults",
236 "art_defaults",
237 ],
238 header_libs: ["libnativebridge-headers"],
239 srcs: ["115-native-bridge/nativebridge.cc"],
240}
241
242art_cc_test_library {
243 name: "libnativebridgetest",
244 shared_libs: ["libart"],
245 defaults: [
246 "libnativebridgetest-defaults",
247 ],
248}
249
250art_cc_test_library {
251 name: "libnativebridgetestd",
252 shared_libs: ["libartd"],
253 defaults: [
254 "libnativebridgetest-defaults",
255 "art_debug_defaults",
256 ],
257}
258
259// ART JVMTI run-tests.
260
Colin Crossafd3c9e2016-09-16 13:47:21 -0700261cc_defaults {
262 name: "libartagent-defaults",
263 defaults: [
Colin Crossafd3c9e2016-09-16 13:47:21 -0700264 "art_test_defaults",
Andreas Gampe5115efb2017-05-24 16:55:54 -0700265 "art_defaults",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700266 ],
267 shared_libs: [
268 "libbacktrace",
Andreas Gampe3fec9ac2016-09-13 10:47:28 -0700269 "libbase",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700270 "libnativehelper",
271 ],
Colin Crossafd3c9e2016-09-16 13:47:21 -0700272}
273
274art_cc_test_library {
275 name: "libartagent",
276 srcs: ["900-hello-plugin/load_unload.cc"],
277 defaults: ["libartagent-defaults"],
Andreas Gampe9462a562018-02-20 09:35:21 -0800278 shared_libs: [
279 "libart",
280 "libdexfile",
David Sehr82d046e2018-04-23 08:14:19 -0700281 "libprofile",
David Sehr1f010162018-05-15 08:59:32 -0700282 "libartbase",
Andreas Gampe9462a562018-02-20 09:35:21 -0800283 ],
Colin Crossafd3c9e2016-09-16 13:47:21 -0700284}
285
286art_cc_test_library {
287 name: "libartagentd",
288 srcs: ["900-hello-plugin/load_unload.cc"],
289 defaults: [
Colin Crossafd3c9e2016-09-16 13:47:21 -0700290 "art_debug_defaults",
Andreas Gampe5115efb2017-05-24 16:55:54 -0700291 "libartagent-defaults",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700292 ],
Andreas Gampe9462a562018-02-20 09:35:21 -0800293 shared_libs: [
294 "libartd",
295 "libdexfiled",
David Sehr82d046e2018-04-23 08:14:19 -0700296 "libprofiled",
David Sehr1f010162018-05-15 08:59:32 -0700297 "libartbased",
Andreas Gampe9462a562018-02-20 09:35:21 -0800298 ],
Colin Crossafd3c9e2016-09-16 13:47:21 -0700299}
300
Andreas Gampee54d9922016-10-11 19:55:37 -0700301art_cc_defaults {
Dan Willemsen2ca27802017-09-27 14:57:43 -0700302 name: "libtiagent-base-defaults",
Andreas Gampecb5125d2018-02-20 09:36:54 -0800303 defaults: [
304 "art_test_defaults",
305 "art_defaults",
306 // Not derived from libartagent-defaults for NDK.
307 ],
Colin Crossafd3c9e2016-09-16 13:47:21 -0700308 srcs: [
Andreas Gampe027444b2017-03-31 12:49:07 -0700309 // These are the ART-independent parts.
Andreas Gampe46651672017-04-07 09:00:04 -0700310 "ti-agent/agent_common.cc",
Andreas Gampe027444b2017-03-31 12:49:07 -0700311 "ti-agent/agent_startup.cc",
Andreas Gampe3f46c962017-03-30 10:26:59 -0700312 "ti-agent/jni_binder.cc",
313 "ti-agent/jvmti_helper.cc",
314 "ti-agent/test_env.cc",
Alex Lightd0d65962017-06-30 11:13:33 -0700315 "ti-agent/breakpoint_helper.cc",
Alex Light78d63412017-04-14 16:20:53 -0700316 "ti-agent/common_helper.cc",
Alex Lightb7c640d2019-03-20 15:52:13 -0700317 "ti-agent/early_return_helper.cc",
Alex Lighte814f9d2017-07-31 16:14:39 -0700318 "ti-agent/frame_pop_helper.cc",
Alex Light47d49b82017-07-25 14:06:34 -0700319 "ti-agent/locals_helper.cc",
Alex Lightce568642017-09-05 16:54:25 -0700320 "ti-agent/monitors_helper.cc",
Alex Lightd0d65962017-06-30 11:13:33 -0700321 "ti-agent/redefinition_helper.cc",
Alex Light88fd7202017-06-30 08:31:59 -0700322 "ti-agent/suspension_helper.cc",
Alex Lightb4e65072019-04-25 15:10:32 -0700323 "ti-agent/suspend_event_helper.cc",
Alex Light47d49b82017-07-25 14:06:34 -0700324 "ti-agent/stack_trace_helper.cc",
Alex Light54d39dc2017-09-25 17:00:16 -0700325 "ti-agent/threads_helper.cc",
Alex Lightd0d65962017-06-30 11:13:33 -0700326 "ti-agent/trace_helper.cc",
Alex Light9fb1ab12017-09-05 09:32:49 -0700327 "ti-agent/exceptions_helper.cc",
Andreas Gampe027444b2017-03-31 12:49:07 -0700328 // This is the list of non-special OnLoad things and excludes BCI and anything that depends
329 // on ART internals.
Andreas Gampe6dee92e2016-09-12 19:58:13 -0700330 "903-hello-tagging/tagging.cc",
Andreas Gampe27fa96c2016-10-07 15:05:24 -0700331 "904-object-allocation/tracking.cc",
Andreas Gampecc13b222016-10-10 19:09:09 -0700332 "905-object-free/tracking_free.cc",
Andreas Gampee54d9922016-10-11 19:55:37 -0700333 "906-iterate-heap/iterate_heap.cc",
Andreas Gampeaa8b60c2016-10-12 12:51:25 -0700334 "907-get-loaded-classes/get_loaded_classes.cc",
Andreas Gampe9b8c5882016-10-21 15:27:46 -0700335 "908-gc-start-finish/gc_callbacks.cc",
Andreas Gampe3c252f02016-10-27 18:25:17 -0700336 "910-methods/methods.cc",
Andreas Gampeb5eb94a2016-10-27 19:23:09 -0700337 "911-get-stack-trace/stack_trace.cc",
Andreas Gamped5f2ccc2017-04-19 13:37:48 -0700338 "912-classes/classes.cc",
Andreas Gampee0f8ed92017-04-13 16:52:23 -0700339 "913-heaps/heaps.cc",
Andreas Gampeab2f0d02017-01-05 17:23:45 -0800340 "918-fields/fields.cc",
Andreas Gampe50a4e492017-01-06 18:00:20 -0800341 "920-objects/objects.cc",
Andreas Gampe1bdaf732017-01-09 19:21:06 -0800342 "922-properties/properties.cc",
Andreas Gampe319dbe82017-01-09 16:42:21 -0800343 "923-monitors/monitors.cc",
Andreas Gampeaf13ab92017-01-11 20:57:40 -0800344 "924-threads/threads.cc",
Andreas Gamped18d9e22017-01-16 16:08:45 +0000345 "925-threadgroups/threadgroups.cc",
Andreas Gampe35bcf812017-01-13 16:24:17 -0800346 "927-timers/timers.cc",
Andreas Gampe6f8e4f02017-01-16 18:18:14 -0800347 "928-jni-table/jni_table.cc",
Andreas Gampece7732b2017-01-17 15:50:26 -0800348 "929-search/search.cc",
Andreas Gampe732b0ac2017-01-18 15:23:39 -0800349 "931-agent-thread/agent_thread.cc",
Andreas Gampeeb0cea12017-01-23 08:50:04 -0800350 "933-misc-events/misc_events.cc",
Alex Light78d63412017-04-14 16:20:53 -0700351 "945-obsolete-native/obsolete_native.cc",
Alex Light8fd08562018-02-13 10:09:03 -0800352 "983-source-transform-verify/source_transform.cc",
Alex Light78d63412017-04-14 16:20:53 -0700353 "984-obsolete-invoke/obsolete_invoke.cc",
Alex Lightd78ddec2017-04-18 15:20:38 -0700354 "986-native-method-bind/native_bind.cc",
Alex Light65af20b2017-04-20 09:15:08 -0700355 "987-agent-bind/agent_bind.cc",
Alex Lighte85595e2018-08-17 15:54:34 -0700356 "988-method-trace/trace_fib.cc",
Alex Lightb7edcda2017-04-27 13:20:31 -0700357 "989-method-trace-throw/method_trace.cc",
Alex Light7c958492017-06-16 08:59:19 -0700358 "991-field-trace-2/field_trace.cc",
Alex Light6fa7b812017-06-16 09:04:29 -0700359 "992-source-data/source_file.cc",
Alex Lightc38c3692017-06-27 15:45:14 -0700360 "993-breakpoints/breakpoints.cc",
361 "996-breakpoint-obsolete/obsolete_breakpoints.cc",
Alex Light8ddfd9f2017-07-05 16:33:46 -0700362 "1900-track-alloc/alloc.cc",
Alex Light4c174282017-07-05 10:18:18 -0700363 "1901-get-bytecodes/bytecodes.cc",
Alex Light88fd7202017-06-30 08:31:59 -0700364 "1905-suspend-native/native_suspend.cc",
365 "1908-suspend-native-resume-self/native_suspend_resume.cc",
Alex Light092a4042017-07-12 08:46:44 -0700366 "1909-per-agent-tls/agent_tls.cc",
Alex Light47d49b82017-07-25 14:06:34 -0700367 "1914-get-local-instance/local_instance.cc",
Alex Light1d8a9742017-08-17 11:12:06 -0700368 "1919-vminit-thread-start-timing/vminit.cc",
Alex Light23aa7482017-08-16 10:01:13 -0700369 "1920-suspend-native-monitor/native_suspend_monitor.cc",
370 "1921-suspend-native-recursive-monitor/native_suspend_recursive_monitor.cc",
Alex Light88e1ddd2017-08-21 13:09:55 -0700371 "1922-owned-monitors-info/owned_monitors.cc",
Alex Lighte814f9d2017-07-31 16:14:39 -0700372 "1924-frame-pop-toggle/frame_pop_toggle.cc",
373 "1926-missed-frame-pop/frame_pop_missed.cc",
Alex Lightce568642017-09-05 16:54:25 -0700374 "1927-exception-event/exception_event.cc",
375 "1930-monitor-info/monitor.cc",
Dan Willemsen2ca27802017-09-27 14:57:43 -0700376 "1932-monitor-events-misc/monitor_misc.cc",
Alex Light54d39dc2017-09-25 17:00:16 -0700377 "1934-jvmti-signal-thread/signal_threads.cc",
Alex Light3dea2122017-10-11 15:56:48 +0000378 "1939-proxy-frames/local_instance.cc",
Alex Lightb284f8d2017-11-21 00:00:48 +0000379 "1941-dispose-stress/dispose_stress.cc",
Alex Light4d77daf2018-01-04 11:51:14 -0800380 "1942-suspend-raw-monitor-exit/native_suspend_monitor.cc",
381 "1943-suspend-raw-monitor-wait/native_suspend_monitor.cc",
Alex Lightc7588752018-02-20 11:15:54 -0800382 "1946-list-descriptors/descriptors.cc",
Alex Light9e7859c2018-04-05 13:49:43 -0700383 "1950-unprepared-transform/unprepared_transform.cc",
Alex Lightc98f83e2018-07-26 08:28:36 -0700384 "1951-monitor-enter-no-suspend/raw_monitor.cc",
Alex Light0aa7a5a2018-10-10 15:58:14 +0000385 "1953-pop-frame/pop_frame.cc",
Alex Lightae45cbb2018-10-18 15:49:56 -0700386 "1957-error-ext/lasterror.cc",
Alex Lightb7c640d2019-03-20 15:52:13 -0700387 // TODO Renumber
Alex Light40607862019-05-06 18:16:24 +0000388 "1962-multi-thread-events/multi_thread_events.cc",
Alex Light639e73b2019-05-17 21:44:36 +0000389 "1963-add-to-dex-classloader-in-memory/add_to_loader.cc",
Alex Lightb7c640d2019-03-20 15:52:13 -0700390 "1968-force-early-return/force_early_return.cc",
391 "1969-force-early-return-void/force_early_return_void.cc",
392 "1970-force-early-return-long/force_early_return_long.cc",
Alex Lightc14ec8f2019-07-18 16:08:41 -0700393 "1974-resize-array/resize_array.cc",
Nicolas Geoffray4ac0e152019-09-18 06:14:50 +0000394 "1975-hello-structural-transformation/structural_transform.cc",
395 "1976-hello-structural-static-methods/structural_transform_methods.cc",
Alex Light80777ed2019-12-17 17:07:33 +0000396 "2005-pause-all-redefine-multithreaded/pause-all.cc",
Alex Light72325b62020-01-09 17:49:45 -0800397 "2009-structural-local-ref/local-ref.cc",
Alex Light16527e82020-06-08 09:21:12 -0700398 "2035-structural-native-method/structural-native.cc",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700399 ],
Andreas Gampecb5125d2018-02-20 09:36:54 -0800400 // Use NDK-compatible headers for ctstiagent.
Alex Light8c2b9292017-11-09 13:21:01 -0800401 header_libs: [
Alex Light8c2b9292017-11-09 13:21:01 -0800402 "libopenjdkjvmti_headers",
403 ],
Paul Duffin4345aac2019-07-17 15:51:54 +0100404 local_include_dirs: ["ti-agent"],
Andreas Gampee54d9922016-10-11 19:55:37 -0700405}
406
Andreas Gampe027444b2017-03-31 12:49:07 -0700407art_cc_defaults {
408 name: "libtiagent-defaults",
Andreas Gampecb5125d2018-02-20 09:36:54 -0800409 defaults: [
410 "libtiagent-base-defaults",
411 "libartagent-defaults",
412 ],
Andreas Gampe027444b2017-03-31 12:49:07 -0700413 srcs: [
414 // This is to get the IsInterpreted native method.
415 "common/stack_inspect.cc",
416 "common/runtime_state.cc",
Alex Light78d63412017-04-14 16:20:53 -0700417 "ti-agent/common_load.cc",
Andreas Gampe027444b2017-03-31 12:49:07 -0700418 // This includes the remaining test functions. We should try to refactor things to
419 // make this list smaller.
Andreas Gampe027444b2017-03-31 12:49:07 -0700420 "901-hello-ti-agent/basics.cc",
421 "909-attach-agent/attach.cc",
Andreas Gamped5f2ccc2017-04-19 13:37:48 -0700422 "912-classes/classes_art.cc",
Andreas Gampe027444b2017-03-31 12:49:07 -0700423 "936-search-onload/search_onload.cc",
Alex Lightfbee3982018-05-24 10:28:46 -0700424 "980-redefine-object/redef_object.cc",
Andreas Gampe59484b92018-02-14 14:00:46 -0800425 "983-source-transform-verify/source_transform_art.cc",
Alex Light8c2b9292017-11-09 13:21:01 -0800426 "1940-ddms-ext/ddm_ext.cc",
Alex Light0aa7a5a2018-10-10 15:58:14 +0000427 // "1952-pop-frame-jit/pop_frame.cc",
Alex Lightfc81d802018-12-07 13:39:05 -0800428 "1959-redefine-object-instrument/fake_redef_object.cc",
Alex Lighte7a33542019-04-10 14:22:49 -0700429 "1960-obsolete-jit-multithread-native/native_say_hi.cc",
Alex Light639e73b2019-05-17 21:44:36 +0000430 "1964-add-to-dex-classloader-file/add_to_loader.cc",
Alex Light098e7a62019-05-21 16:57:10 -0700431 "1963-add-to-dex-classloader-in-memory/check_memfd_create.cc",
Alex Light3f0dca12020-01-27 17:20:28 -0800432 "2012-structural-redefinition-failures-jni-id/set-jni-id-used.cc",
Alex Light280e6c32020-03-03 13:52:07 -0800433 "2031-zygote-compiled-frame-deopt/native-wait.cc",
Andreas Gampe027444b2017-03-31 12:49:07 -0700434 ],
Alex Lightfbee3982018-05-24 10:28:46 -0700435 static_libs: [
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000436 "libz",
Andreas Gampe7e057ec2019-03-04 13:11:22 -0800437 "slicer_no_rtti",
Alex Lightfbee3982018-05-24 10:28:46 -0700438 ],
Andreas Gampe027444b2017-03-31 12:49:07 -0700439}
440
Andreas Gampee54d9922016-10-11 19:55:37 -0700441art_cc_test_library {
442 name: "libtiagent",
443 defaults: ["libtiagent-defaults"],
David Sehrfcbe15c2018-02-15 09:41:13 -0800444 shared_libs: [
445 "libart",
446 "libdexfile",
David Sehr82d046e2018-04-23 08:14:19 -0700447 "libprofile",
David Sehr1f010162018-05-15 08:59:32 -0700448 "libartbase",
David Sehrfcbe15c2018-02-15 09:41:13 -0800449 ],
Colin Crossafd3c9e2016-09-16 13:47:21 -0700450}
451
452art_cc_test_library {
453 name: "libtiagentd",
454 defaults: [
Colin Crossafd3c9e2016-09-16 13:47:21 -0700455 "art_debug_defaults",
Andreas Gampe5115efb2017-05-24 16:55:54 -0700456 "libtiagent-defaults",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700457 ],
David Sehrfcbe15c2018-02-15 09:41:13 -0800458 shared_libs: [
459 "libartd",
460 "libdexfiled",
David Sehr82d046e2018-04-23 08:14:19 -0700461 "libprofiled",
David Sehr1f010162018-05-15 08:59:32 -0700462 "libartbased",
David Sehrfcbe15c2018-02-15 09:41:13 -0800463 ],
Colin Crossafd3c9e2016-09-16 13:47:21 -0700464}
465
Andreas Gampe59484b92018-02-14 14:00:46 -0800466cc_library_static {
Andreas Gamped0ed0d92018-02-12 15:03:36 -0800467 name: "libctstiagent",
468 defaults: ["libtiagent-base-defaults"],
Martin Stjernholmb4abe0a2019-05-17 19:22:55 +0100469 visibility: [
470 "//cts/hostsidetests/jvmti:__subpackages__",
471 ],
Andreas Gampe59484b92018-02-14 14:00:46 -0800472 host_supported: false,
473 srcs: [
474 "983-source-transform-verify/source_transform_slicer.cc",
475 ],
Andreas Gamped0ed0d92018-02-12 15:03:36 -0800476 whole_static_libs: [
Andreas Gampe7e057ec2019-03-04 13:11:22 -0800477 "slicer_ndk_no_rtti",
Andreas Gamped0ed0d92018-02-12 15:03:36 -0800478 ],
479 static_libs: [
Andreas Gampecb5125d2018-02-20 09:36:54 -0800480 "libbase_ndk",
Andreas Gamped0ed0d92018-02-12 15:03:36 -0800481 ],
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000482 shared_libs: [
Andreas Gampe0dc93b12019-05-15 10:30:22 -0700483 "libz", // for slicer (using adler32).
Nicolas Geoffray65ed42a2018-10-30 12:33:04 +0000484 ],
Andreas Gampecb5125d2018-02-20 09:36:54 -0800485 sdk_version: "current",
486 stl: "c++_static",
Paul Duffin4345aac2019-07-17 15:51:54 +0100487 header_libs: [
488 "jni_headers",
Alex Light8fd08562018-02-13 10:09:03 -0800489 // This is needed to resolve the base/ header file in libdexfile. Unfortunately there are
490 // many problems with how we export headers that are making doing this the 'right' way
491 // difficult.
492 // TODO: move those headers to art/ rather than under runtime.
Paul Duffin4345aac2019-07-17 15:51:54 +0100493 "libart_runtime_headers_ndk",
Alex Light8fd08562018-02-13 10:09:03 -0800494 ],
Andreas Gamped0ed0d92018-02-12 15:03:36 -0800495 export_include_dirs: ["ti-agent"],
496}
497
Alex Light8f2c6d42017-04-10 16:27:35 -0700498art_cc_defaults {
Alex Light88659142018-05-15 10:53:06 -0700499 name: "libtistress-srcs",
Alex Light8f2c6d42017-04-10 16:27:35 -0700500 defaults: ["libartagent-defaults"],
501 srcs: [
502 "ti-stress/stress.cc",
503 ],
Alex Light88659142018-05-15 10:53:06 -0700504 header_libs: ["libopenjdkjvmti_headers"],
505}
506
507art_cc_defaults {
508 name: "libtistress-defaults",
509 defaults: ["libtistress-srcs"],
Alex Light8f2c6d42017-04-10 16:27:35 -0700510 shared_libs: [
Andreas Gampe7e057ec2019-03-04 13:11:22 -0800511 "slicer_no_rtti",
Vladimir Markoe8a83af2020-01-29 10:14:44 +0000512 "libz", // for slicer (using adler32).
Alex Light8f2c6d42017-04-10 16:27:35 -0700513 ],
Alex Light8f2c6d42017-04-10 16:27:35 -0700514}
515
516art_cc_test_library {
517 name: "libtistress",
Dan Willemsen2ca27802017-09-27 14:57:43 -0700518 defaults: ["libtistress-defaults"],
Vladimir Markoe8a83af2020-01-29 10:14:44 +0000519 shared_libs: [
520 "libartbase",
521 "libz",
522 ],
Alex Light8f2c6d42017-04-10 16:27:35 -0700523}
524
525art_cc_test_library {
526 name: "libtistressd",
527 defaults: [
Alex Light8f2c6d42017-04-10 16:27:35 -0700528 "art_debug_defaults",
Andreas Gampe5115efb2017-05-24 16:55:54 -0700529 "libtistress-defaults",
Alex Light8f2c6d42017-04-10 16:27:35 -0700530 ],
Vladimir Markoe8a83af2020-01-29 10:14:44 +0000531 shared_libs: [
532 "libartbased",
533 "libz",
534 ],
Alex Light88659142018-05-15 10:53:06 -0700535}
536
537art_cc_defaults {
Vladimir Markoe8a83af2020-01-29 10:14:44 +0000538 name: "libtistress-shared-defaults",
Andreas Gampeec5ed062018-01-26 16:20:02 -0800539 defaults: [
540 "libtistress-srcs",
Alex Light88659142018-05-15 10:53:06 -0700541 ],
Andreas Gampe7e057ec2019-03-04 13:11:22 -0800542 static_libs: ["slicer_no_rtti"],
Alex Light88659142018-05-15 10:53:06 -0700543}
544
545art_cc_test_library {
546 name: "libtistresss",
Vladimir Markoe8a83af2020-01-29 10:14:44 +0000547 defaults: ["libtistress-shared-defaults"],
548 shared_libs: [
549 "libartbase",
550 "libz",
551 ],
Alex Light88659142018-05-15 10:53:06 -0700552}
553
554art_cc_test_library {
555 name: "libtistressds",
556 defaults: [
Vladimir Markoe8a83af2020-01-29 10:14:44 +0000557 "libtistress-shared-defaults",
Alex Light88659142018-05-15 10:53:06 -0700558 ],
Vladimir Markoe8a83af2020-01-29 10:14:44 +0000559 shared_libs: [
560 "libartbased",
561 "libz",
562 ],
Alex Light8f2c6d42017-04-10 16:27:35 -0700563}
564
Colin Crossafd3c9e2016-09-16 13:47:21 -0700565cc_defaults {
566 name: "libarttest-defaults",
567 defaults: [
Colin Crossafd3c9e2016-09-16 13:47:21 -0700568 "art_test_defaults",
Andreas Gampe5115efb2017-05-24 16:55:54 -0700569 "art_defaults",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700570 ],
571 srcs: [
Colin Crossafd3c9e2016-09-16 13:47:21 -0700572 "004-JniTest/jni_test.cc",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700573 "004-ReferenceMap/stack_walk_refmap_jni.cc",
Roland Levillainad0777d2018-02-12 20:00:18 +0000574 "004-SignalTest/signaltest.cc",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700575 "004-StackWalk/stack_walk_jni.cc",
576 "004-ThreadStress/thread_stress.cc",
577 "004-UnsafeTest/unsafe_test.cc",
578 "044-proxy/native_proxy.cc",
579 "051-thread/thread_test.cc",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700580 "1337-gc-coverage/gc_coverage.cc",
581 "136-daemon-jni-shutdown/daemon_jni_shutdown.cc",
582 "137-cfi/cfi.cc",
583 "139-register-natives/regnative.cc",
584 "141-class-unload/jni_unload.cc",
585 "148-multithread-gc-annotations/gc_coverage.cc",
586 "149-suspend-all-stress/suspend_all.cc",
Mathieu Chartier72a32892017-01-24 09:40:56 -0800587 "154-gc-loop/heap_interface.cc",
Andreas Gampeaaf0d382017-11-27 14:10:21 -0800588 "167-visit-locks/visit_locks.cc",
Andreas Gampe56776012018-01-26 17:40:55 -0800589 "169-threadgroup-jni/jni_daemon_thread.cc",
Mathieu Chartieradc90862018-05-11 13:03:06 -0700590 "172-app-image-twice/debug_print_class.cc",
Vladimir Marko422a9eb2019-08-01 12:54:07 +0100591 "177-visibly-initialized-deadlock/visibly_initialized.cc",
Vladimir Marko7dac8642019-11-06 17:09:30 +0000592 "178-app-image-native-method/native_methods.cc",
Alex Lighta2efd2a2020-05-19 09:44:49 -0700593 "179-nonvirtual-jni/nonvirtual-call.cc",
Roland Levillainad0777d2018-02-12 20:00:18 +0000594 "1945-proxy-method-arguments/get_args.cc",
Andreas Gampeaaf0d382017-11-27 14:10:21 -0800595 "203-multi-checkpoint/multi_checkpoint.cc",
Alex Lightf4ed7e82018-01-17 11:52:36 -0800596 "305-other-fault-handler/fault_handler.cc",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700597 "454-get-vreg/get_vreg_jni.cc",
598 "457-regs/regs_jni.cc",
599 "461-get-reference-vreg/get_reference_vreg_jni.cc",
600 "466-get-live-vreg/get_live_vreg_jni.cc",
601 "497-inlining-and-class-loader/clear_dex_cache.cc",
602 "543-env-long-ref/env_long_ref.cc",
603 "566-polymorphic-inlining/polymorphic_inline.cc",
604 "570-checker-osr/osr.cc",
605 "595-profile-saving/profile-saving.cc",
606 "596-app-images/app_images.cc",
Hans Boehm6fe97e02016-05-04 18:35:57 -0700607 "596-monitor-inflation/monitor_inflation.cc",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700608 "597-deopt-new-string/deopt.cc",
Alexey Grebenkinbe4c2bd2018-02-01 19:09:59 +0300609 "616-cha-unloading/cha_unload.cc",
Vladimir Markoc5798bf2016-12-09 10:20:54 +0000610 "626-const-class-linking/clear_dex_cache_types.cc",
Nicolas Geoffray13a797b2017-03-15 16:41:31 +0000611 "642-fp-callees/fp_callees.cc",
Vladimir Marko5fdd7782017-04-20 11:26:03 +0100612 "647-jni-get-field-id/get_field_id.cc",
Roland Levillain0d2323e2017-06-26 18:14:39 +0100613 "656-annotation-lookup-generic-jni/test.cc",
Igor Murashkin545412b2017-08-17 15:26:54 -0700614 "661-oat-writer-layout/oat_writer_layout.cc",
615 "664-aget-verifier/aget-verifier.cc",
Vladimir Marko2196c652017-11-30 16:16:07 +0000616 "667-jit-jni-stub/jit_jni_stub_test.cc",
David Brazdil11b67b22018-01-18 16:41:40 +0000617 "674-hiddenapi/hiddenapi.cc",
David Brazdil331a5e12019-04-01 22:46:16 +0000618 "692-vdex-inmem-loader/vdex_inmem_loader.cc",
Dan Willemsen2ca27802017-09-27 14:57:43 -0700619 "708-jit-cache-churn/jit.cc",
Nicolas Geoffrayfa595882019-08-06 17:40:09 +0100620 "720-thread-priority/thread_priority.cc",
Alexey Grebenkince750492018-05-31 23:42:20 +0300621 "800-smali/jni.cc",
Alex Lightf889c702018-02-23 15:25:45 -0800622 "909-attach-agent/disallow_debugging.cc",
Mathieu Chartier00fbe4f2019-01-02 16:52:38 -0800623 "1001-app-image-regions/app_image_regions.cc",
Mathieu Chartier175ce3d2019-03-06 16:54:24 -0800624 "1002-notify-startup/startup_interface.cc",
Alex Lighte34fe442018-02-21 17:35:55 -0800625 "1947-breakpoint-redefine-deopt/check_deopt.cc",
Alex Lightf3677472019-06-26 16:31:53 -0700626 "1972-jni-id-swap-indices/jni_id.cc",
Alex Light55eccdf2019-10-07 13:51:13 +0000627 "1985-structural-redefine-stack-scope/stack_scope.cc",
Nicolas Geoffraye91e7952020-01-23 10:15:56 +0000628 "2011-stack-walk-concurrent-instrument/stack_walk_concurrent.cc",
Alex Light280e6c32020-03-03 13:52:07 -0800629 "2031-zygote-compiled-frame-deopt/native-wait.cc",
Hans Boehm672295a2020-04-16 21:31:17 -0700630 "2033-shutdown-mechanics/native_shutdown.cc",
Roland Levillainad0777d2018-02-12 20:00:18 +0000631 "common/runtime_state.cc",
632 "common/stack_inspect.cc",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700633 ],
634 shared_libs: [
635 "libbacktrace",
Andreas Gampe3fec9ac2016-09-13 10:47:28 -0700636 "libbase",
Colin Crossafd3c9e2016-09-16 13:47:21 -0700637 "libnativehelper",
638 ],
Colin Crossafd3c9e2016-09-16 13:47:21 -0700639}
640
Paul Duffin2506eff2020-04-07 11:32:24 +0100641java_library {
Sasha Smundakc7c5d532019-02-27 15:03:37 -0800642 name: "art_cts_jvmti_test_library",
Martin Stjernholmb4abe0a2019-05-17 19:22:55 +0100643 visibility: [
644 "//cts/hostsidetests/jvmti:__subpackages__",
645 ],
Sasha Smundakc7c5d532019-02-27 15:03:37 -0800646 srcs: [
647 // shim classes. We use one that exposes the common functionality.
Alex Light23ca8fb2019-05-10 11:27:02 -0700648 "jvmti-common/Redefinition.java",
649 "jvmti-common/Main.java",
650 "jvmti-common/Trace.java",
651 "jvmti-common/Breakpoint.java",
652 "jvmti-common/Suspension.java",
653 "jvmti-common/Locals.java",
654 "jvmti-common/StackTrace.java",
655 "jvmti-common/FramePop.java",
656 "jvmti-common/Exceptions.java",
657 "jvmti-common/Monitors.java",
Alex Lightfe0ce642020-01-07 13:14:18 -0800658 "jvmti-common/NonStandardExit.java",
Alex Light23ca8fb2019-05-10 11:27:02 -0700659 "jvmti-common/Threads.java",
660 "jvmti-common/SuspendEvents.java",
Sasha Smundakc7c5d532019-02-27 15:03:37 -0800661
662 // Actual test classes.
663 "901-hello-ti-agent/src/art/Test901.java",
664 "902-hello-transformation/src/art/Test902.java",
665 "903-hello-tagging/src/art/Test903.java",
666 "904-object-allocation/src/art/Test904.java",
667 "905-object-free/src/art/Test905.java",
668 "906-iterate-heap/src/art/Test906.java",
669 "907-get-loaded-classes/src/art/Test907.java",
670 "907-get-loaded-classes/src/art/Cerr.java",
671 "908-gc-start-finish/src/art/Test908.java",
672 "910-methods/src/art/Test910.java",
673 "911-get-stack-trace/src/art/Test911.java",
674 "911-get-stack-trace/src/art/AllTraces.java",
675 "911-get-stack-trace/src/art/ControlData.java",
676 "911-get-stack-trace/src/art/Frames.java",
677 "911-get-stack-trace/src/art/OtherThread.java",
678 "911-get-stack-trace/src/art/PrintThread.java",
679 "911-get-stack-trace/src/art/Recurse.java",
680 "911-get-stack-trace/src/art/SameThread.java",
681 "911-get-stack-trace/src/art/ThreadListTraces.java",
682 "912-classes/src-art/art/Test912.java",
683 "912-classes/src-art/art/DexData.java",
684 "913-heaps/src/art/Test913.java",
685 "914-hello-obsolescence/src/art/Test914.java",
686 "915-obsolete-2/src/art/Test915.java",
687 "917-fields-transformation/src/art/Test917.java",
688 "918-fields/src/art/Test918.java",
689 "919-obsolete-fields/src/art/Test919.java",
690 "920-objects/src/art/Test920.java",
691 "922-properties/src/art/Test922.java",
692 "923-monitors/src/art/Test923.java",
693 "924-threads/src/art/Test924.java",
694 "925-threadgroups/src/art/Test925.java",
695 "926-multi-obsolescence/src/art/Test926.java",
696 "927-timers/src/art/Test927.java",
697 "928-jni-table/src/art/Test928.java",
698 "930-hello-retransform/src/art/Test930.java",
699 "931-agent-thread/src/art/Test931.java",
700 "932-transform-saves/src/art/Test932.java",
701 "933-misc-events/src/art/Test933.java",
702 "940-recursive-obsolete/src/art/Test940.java",
703 "942-private-recursive/src/art/Test942.java",
704 "944-transform-classloaders/src/art/Test944.java",
705 "945-obsolete-native/src/art/Test945.java",
706 "947-reflect-method/src/art/Test947.java",
707 "951-threaded-obsolete/src/art/Test951.java",
708 "982-ok-no-retransform/src/art/Test982.java",
709 "983-source-transform-verify/src/art/Test983.java",
710 "984-obsolete-invoke/src/art/Test984.java",
711 "985-re-obsolete/src/art/Test985.java",
712 "986-native-method-bind/src/art/Test986.java",
713 "988-method-trace/src/art/Test988.java",
714 "988-method-trace/src/art/Test988Intrinsics.java",
715 "989-method-trace-throw/src/art/Test989.java",
716 "990-field-trace/src/art/Test990.java",
717 "991-field-trace-2/src/art/Test991.java",
718 "992-source-data/src/art/Test992.java",
719 "992-source-data/src/art/Target2.java",
720 "993-breakpoints/src/art/Test993.java",
721 "994-breakpoint-line/src/art/Test994.java",
722 "995-breakpoints-throw/src/art/Test995.java",
723 "996-breakpoint-obsolete/src/art/Test996.java",
724 "997-single-step/src/art/Test997.java",
725 "1900-track-alloc/src/art/Test1900.java",
726 "1901-get-bytecodes/src/art/Test1901.java",
727 "1902-suspend/src/art/Test1902.java",
728 "1903-suspend-self/src/art/Test1903.java",
729 "1904-double-suspend/src/art/Test1904.java",
730 "1906-suspend-list-me-first/src/art/Test1906.java",
731 "1907-suspend-list-self-twice/src/art/Test1907.java",
732 "1908-suspend-native-resume-self/src/art/Test1908.java",
733 "1909-per-agent-tls/src/art/Test1909.java",
734 "1910-transform-with-default/src/art/Test1910.java",
735 "1911-get-local-var-table/src/art/Test1911.java",
736 "1912-get-set-local-primitive/src/art/Test1912.java",
737 "1913-get-set-local-objects/src/art/Test1913.java",
738 "1914-get-local-instance/src/art/Test1914.java",
739 "1915-get-set-local-current-thread/src/art/Test1915.java",
740 "1916-get-set-current-frame/src/art/Test1916.java",
741 "1917-get-stack-frame/src/art/Test1917.java",
742 "1920-suspend-native-monitor/src/art/Test1920.java",
743 "1921-suspend-native-recursive-monitor/src/art/Test1921.java",
744 "1922-owned-monitors-info/src/art/Test1922.java",
745 "1923-frame-pop/src/art/Test1923.java",
746 "1924-frame-pop-toggle/src/art/Test1924.java",
747 "1925-self-frame-pop/src/art/Test1925.java",
748 "1926-missed-frame-pop/src/art/Test1926.java",
749 "1927-exception-event/src/art/Test1927.java",
750 "1928-exception-event-exception/src/art/Test1928.java",
751 "1930-monitor-info/src/art/Test1930.java",
752 "1931-monitor-events/src/art/Test1931.java",
753 "1932-monitor-events-misc/src/art/Test1932.java",
754 "1933-monitor-current-contended/src/art/Test1933.java",
755 "1934-jvmti-signal-thread/src/art/Test1934.java",
756 "1936-thread-end-events/src/art/Test1936.java",
757 "1937-transform-soft-fail/src/art/Test1937.java",
758 "1939-proxy-frames/src/art/Test1939.java",
759 "1941-dispose-stress/src/art/Test1941.java",
760 "1942-suspend-raw-monitor-exit/src/art/Test1942.java",
761 "1943-suspend-raw-monitor-wait/src/art/Test1943.java",
762 "1953-pop-frame/src/art/Test1953.java",
763 "1958-transform-try-jit/src/art/Test1958.java",
Alex Light40607862019-05-06 18:16:24 +0000764 "1962-multi-thread-events/src/art/Test1962.java",
Alex Lightfe0ce642020-01-07 13:14:18 -0800765 "1963-add-to-dex-classloader-in-memory/src/art/Test1963.java",
766 "1967-get-set-local-bad-slot/src/art/Test1967.java",
767 "1968-force-early-return/src/art/Test1968.java",
768 "1969-force-early-return-void/src/art/Test1969.java",
769 "1970-force-early-return-long/src/art/Test1970.java",
770 "1971-multi-force-early-return/src/art/Test1971.java",
771 "1974-resize-array/src/art/Test1974.java",
772 "1975-hello-structural-transformation/src/art/Test1975.java",
773 "1975-hello-structural-transformation/src/art/Transform1975.java",
774 "1976-hello-structural-static-methods/src/art/Test1976.java",
775 "1976-hello-structural-static-methods/src/art/Transform1976.java",
776 "1977-hello-structural-obsolescence/src/art/Test1977.java",
777 "1978-regular-obsolete-then-structural-obsolescence/src/art/Test1978.java",
778 "1979-threaded-structural-transformation/src/art/Test1979.java",
779 "1981-structural-redef-private-method-handles/src/art/Test1981.java",
780 // TODO Requires VarHandles to be un-@hide. See b/64382372
781 // "1981-structural-redef-private-method-handles/src/art/Test1981_Varhandles.java",
782 "1982-no-virtuals-structural-redefinition/src/art/Test1982.java",
783 "1983-structural-redefinition-failures/src/art/Test1983.java",
784 "1984-structural-redefine-field-trace/src/art/Test1984.java",
785 "1988-multi-structural-redefine/src/art/Test1988.java",
786 "1989-transform-bad-monitor/src/art/Test1989.java",
787 "1990-structural-bad-verify/src/art/Test1990.java",
788 "1991-hello-structural-retransform/src/art/Test1991.java",
789 "1992-retransform-no-such-field/src/art/Test1992.java",
790 "1994-final-virtual-structural/src/art/Test1994.java",
791 "1995-final-virtual-structural-multithread/src/art/Test1995.java",
792 "1996-final-override-virtual-structural/src/art/Test1996.java",
793 "1997-structural-shadow-method/src/art/Test1997.java",
794 "1998-structural-shadow-field/src/art/Test1998.java",
795 "1999-virtual-structural/src/art/Test1999.java",
796 "2001-virtual-structural-multithread/src-art/art/Test2001.java",
797 "2002-virtual-structural-initializing/src-art/art/Test2002.java",
798 "2003-double-virtual-structural/src/art/Test2003.java",
799 "2004-double-virtual-structural-abstract/src/art/Test2004.java",
800 "2005-pause-all-redefine-multithreaded/src/art/Test2005.java",
801 "2006-virtual-structural-finalizing/src-art/art/Test2006.java",
802 "2007-virtual-structural-finalizable/src-art/art/Test2007.java",
Sasha Smundakc7c5d532019-02-27 15:03:37 -0800803 ],
804}
805
806// CTS test runner in cts/hostsidetests/jvmti looks for an expected test
807// result for the test NN in the file results.NN.expected.txt while in the
808// source tree each expected test result is in the NN-xxxx/expected.txt.
809// Copy+rename them them to a temporary directory and them zip them.
810java_genrule {
Paul Duffine5621f52020-03-25 10:51:14 +0000811 name: "expected_cts_outputs_gen",
Sasha Smundakc7c5d532019-02-27 15:03:37 -0800812 srcs: [
813 "901-hello-ti-agent/expected.txt",
814 "902-hello-transformation/expected.txt",
815 "903-hello-tagging/expected.txt",
816 "904-object-allocation/expected.txt",
817 "905-object-free/expected.txt",
818 "906-iterate-heap/expected.txt",
819 "907-get-loaded-classes/expected.txt",
820 "908-gc-start-finish/expected.txt",
821 "910-methods/expected.txt",
Alex Light4681f202020-01-10 09:27:57 -0800822 "911-get-stack-trace/expected-cts-version.txt",
Sasha Smundakc7c5d532019-02-27 15:03:37 -0800823 "912-classes/expected.txt",
824 "913-heaps/expected.txt",
825 "914-hello-obsolescence/expected.txt",
826 "915-obsolete-2/expected.txt",
827 "917-fields-transformation/expected.txt",
828 "918-fields/expected.txt",
829 "919-obsolete-fields/expected.txt",
830 "920-objects/expected.txt",
831 "922-properties/expected.txt",
832 "923-monitors/expected.txt",
833 "924-threads/expected.txt",
834 "925-threadgroups/expected.txt",
835 "926-multi-obsolescence/expected.txt",
836 "927-timers/expected.txt",
837 "928-jni-table/expected.txt",
838 "930-hello-retransform/expected.txt",
839 "931-agent-thread/expected.txt",
840 "932-transform-saves/expected.txt",
841 "933-misc-events/expected.txt",
842 "940-recursive-obsolete/expected.txt",
843 "942-private-recursive/expected.txt",
844 "944-transform-classloaders/expected.txt",
845 "945-obsolete-native/expected.txt",
846 "947-reflect-method/expected.txt",
847 "951-threaded-obsolete/expected.txt",
848 "982-ok-no-retransform/expected.txt",
849 "983-source-transform-verify/expected.txt",
850 "984-obsolete-invoke/expected.txt",
851 "985-re-obsolete/expected.txt",
852 "986-native-method-bind/expected.txt",
853 "988-method-trace/expected.txt",
854 "989-method-trace-throw/expected.txt",
855 "990-field-trace/expected.txt",
856 "991-field-trace-2/expected.txt",
857 "992-source-data/expected.txt",
858 "993-breakpoints/expected.txt",
859 "994-breakpoint-line/expected.txt",
860 "995-breakpoints-throw/expected.txt",
861 "996-breakpoint-obsolete/expected.txt",
862 "997-single-step/expected.txt",
863 "1900-track-alloc/expected.txt",
864 "1901-get-bytecodes/expected.txt",
865 "1902-suspend/expected.txt",
866 "1903-suspend-self/expected.txt",
867 "1904-double-suspend/expected.txt",
868 "1906-suspend-list-me-first/expected.txt",
869 "1907-suspend-list-self-twice/expected.txt",
870 "1908-suspend-native-resume-self/expected.txt",
871 "1909-per-agent-tls/expected.txt",
872 "1910-transform-with-default/expected.txt",
873 "1911-get-local-var-table/expected.txt",
874 "1912-get-set-local-primitive/expected.txt",
875 "1913-get-set-local-objects/expected.txt",
876 "1914-get-local-instance/expected.txt",
877 "1915-get-set-local-current-thread/expected.txt",
878 "1916-get-set-current-frame/expected.txt",
879 "1917-get-stack-frame/expected.txt",
880 "1920-suspend-native-monitor/expected.txt",
881 "1921-suspend-native-recursive-monitor/expected.txt",
882 "1922-owned-monitors-info/expected.txt",
883 "1923-frame-pop/expected.txt",
884 "1924-frame-pop-toggle/expected.txt",
885 "1925-self-frame-pop/expected.txt",
886 "1926-missed-frame-pop/expected.txt",
887 "1927-exception-event/expected.txt",
888 "1928-exception-event-exception/expected.txt",
889 "1930-monitor-info/expected.txt",
890 "1931-monitor-events/expected.txt",
891 "1932-monitor-events-misc/expected.txt",
892 "1933-monitor-current-contended/expected.txt",
893 "1934-jvmti-signal-thread/expected.txt",
894 "1936-thread-end-events/expected.txt",
895 "1937-transform-soft-fail/expected.txt",
896 "1939-proxy-frames/expected.txt",
897 "1941-dispose-stress/expected.txt",
898 "1942-suspend-raw-monitor-exit/expected.txt",
899 "1943-suspend-raw-monitor-wait/expected.txt",
900 "1953-pop-frame/expected.txt",
901 "1958-transform-try-jit/expected.txt",
Alex Lightfe0ce642020-01-07 13:14:18 -0800902 "1962-multi-thread-events/expected.txt",
903 "1963-add-to-dex-classloader-in-memory/expected.txt",
904 "1967-get-set-local-bad-slot/expected.txt",
905 "1968-force-early-return/expected.txt",
906 "1969-force-early-return-void/expected.txt",
907 "1970-force-early-return-long/expected.txt",
908 "1971-multi-force-early-return/expected.txt",
909 "1974-resize-array/expected.txt",
910 "1975-hello-structural-transformation/expected.txt",
911 "1976-hello-structural-static-methods/expected.txt",
912 "1977-hello-structural-obsolescence/expected.txt",
913 "1978-regular-obsolete-then-structural-obsolescence/expected.txt",
914 "1979-threaded-structural-transformation/expected.txt",
915 // TODO Requires VarHandles to be un-@hide. See b/64382372
916 // "test/1981-structural-redef-private-method-handles/expected.txt",
917 "1981-structural-redef-private-method-handles/expected_no_mh.txt",
918 "1982-no-virtuals-structural-redefinition/expected.txt",
Alex Light5c7f3672020-01-27 15:23:30 -0800919 // JNI-id use can change the outcome of this test on device.
920 "1983-structural-redefinition-failures/expected-cts.txt",
Alex Lightfe0ce642020-01-07 13:14:18 -0800921 "1984-structural-redefine-field-trace/expected.txt",
922 "1988-multi-structural-redefine/expected.txt",
923 "1989-transform-bad-monitor/expected.txt",
924 "1990-structural-bad-verify/expected.txt",
925 "1991-hello-structural-retransform/expected.txt",
926 "1992-retransform-no-such-field/expected.txt",
927 "1994-final-virtual-structural/expected.txt",
928 "1995-final-virtual-structural-multithread/expected.txt",
929 "1996-final-override-virtual-structural/expected.txt",
930 "1997-structural-shadow-method/expected.txt",
931 "1998-structural-shadow-field/expected.txt",
932 "1999-virtual-structural/expected.txt",
933 "2001-virtual-structural-multithread/expected.txt",
934 "2002-virtual-structural-initializing/expected.txt",
935 "2003-double-virtual-structural/expected.txt",
936 "2004-double-virtual-structural-abstract/expected.txt",
937 "2005-pause-all-redefine-multithreaded/expected.txt",
938 "2006-virtual-structural-finalizing/expected.txt",
939 "2007-virtual-structural-finalizable/expected.txt",
Sasha Smundakc7c5d532019-02-27 15:03:37 -0800940 ],
941 out: ["expected_cts_outputs.jar"],
942 tools: ["soong_zip"],
943 cmd: "rm -rf $(genDir)/res && mkdir -p $(genDir)/res && " +
944 "for f in $(in); do x=$${f#art/test/}; " +
945 "cp $$f $(genDir)/res/results.$${x%%-*}.expected.txt; done && " +
946 "$(location soong_zip) -o $(out) -C $(genDir)/res -D $(genDir)/res",
947}
David Srbecky8c8f1482020-02-05 20:17:10 +0000948
Paul Duffine5621f52020-03-25 10:51:14 +0000949// Wrap the expected_cts_outputs_gen inside a java library to make it easy
950// to export as a member of a module_exports.
951java_library {
952 name: "expected_cts_outputs",
953 visibility: [
954 "//art/build/sdk",
955 "//cts/hostsidetests/jvmti:__subpackages__",
956 ],
957 static_libs: [
958 "expected_cts_outputs_gen",
959 ],
960 sdk_version: "core_current",
961}
962
David Srbeckyee257162020-02-28 15:50:13 +0000963art_cc_test {
964 name: "ArtGtestsTarget",
965 data: [
966 // We need the ART testing apex, which contains all gtest binaries.
967 // Note that due to linker constraints the gtests must be in the apex.
968 ":com.android.art.testing",
969 ":art-gtest-jars",
970 ],
David Srbecky72cf0a82020-06-11 19:26:49 +0000971 test_suites: ["device-tests"],
David Srbeckyee257162020-02-28 15:50:13 +0000972 test_config: "gtests-target.xml",
973}
974
David Srbecky8c8f1482020-02-05 20:17:10 +0000975filegroup {
976 name: "art-gtest-jars",
977 srcs: [
978 ":art-gtest-jars-AbstractMethod",
979 ":art-gtest-jars-AllFields",
980 ":art-gtest-jars-DefaultMethods",
981 ":art-gtest-jars-DexToDexDecompiler",
982 ":art-gtest-jars-ErroneousA",
983 ":art-gtest-jars-ErroneousB",
984 ":art-gtest-jars-ErroneousInit",
Vladimir Markofdd46842020-03-25 14:57:17 +0000985 ":art-gtest-jars-Extension1",
986 ":art-gtest-jars-Extension2",
David Srbecky8c8f1482020-02-05 20:17:10 +0000987 ":art-gtest-jars-ForClassLoaderA",
988 ":art-gtest-jars-ForClassLoaderB",
989 ":art-gtest-jars-ForClassLoaderC",
990 ":art-gtest-jars-ForClassLoaderD",
991 ":art-gtest-jars-ExceptionHandle",
992 ":art-gtest-jars-GetMethodSignature",
993 ":art-gtest-jars-HiddenApi",
994 ":art-gtest-jars-HiddenApiSignatures",
995 ":art-gtest-jars-HiddenApiStubs",
996 ":art-gtest-jars-ImageLayoutA",
997 ":art-gtest-jars-ImageLayoutB",
998 ":art-gtest-jars-IMTA",
999 ":art-gtest-jars-IMTB",
1000 ":art-gtest-jars-Instrumentation",
1001 ":art-gtest-jars-Interfaces",
1002 ":art-gtest-jars-Lookup",
1003 ":art-gtest-jars-Main",
1004 ":art-gtest-jars-ManyMethods",
1005 ":art-gtest-jars-MethodTypes",
1006 ":art-gtest-jars-MultiDex",
1007 ":art-gtest-jars-MultiDexModifiedSecondary",
1008 ":art-gtest-jars-MyClass",
1009 ":art-gtest-jars-MyClassNatives",
1010 ":art-gtest-jars-Nested",
1011 ":art-gtest-jars-NonStaticLeafMethods",
1012 ":art-gtest-jars-Packages",
1013 ":art-gtest-jars-ProtoCompare",
1014 ":art-gtest-jars-ProtoCompare2",
1015 ":art-gtest-jars-ProfileTestMultiDex",
1016 ":art-gtest-jars-StaticLeafMethods",
1017 ":art-gtest-jars-Statics",
1018 ":art-gtest-jars-StaticsFromCode",
1019 ":art-gtest-jars-StringLiterals",
1020 ":art-gtest-jars-Transaction",
1021 ":art-gtest-jars-XandY",
1022 ":art-gtest-jars-MainEmptyUncompressed",
1023 ":art-gtest-jars-MainEmptyUncompressedAligned",
1024 ":art-gtest-jars-MainStripped",
1025 ":art-gtest-jars-MainUncompressedAligned",
1026 ":art-gtest-jars-MultiDexUncompressedAligned",
1027 ":art-gtest-jars-VerifierDeps",
1028 ":art-gtest-jars-VerifierDepsMulti",
1029 ":art-gtest-jars-VerifySoftFailDuringClinit",
1030 ],
1031}
1032
1033java_defaults {
1034 name: "art-gtest-jars-defaults",
1035 installable: true,
1036 dex_preopt: {
1037 enabled: false,
1038 },
1039 sdk_version: "core_platform",
David Srbecky4a88a5a2020-05-05 16:21:57 +01001040 uncompress_dex: false,
David Srbecky8c8f1482020-02-05 20:17:10 +00001041}
1042
1043// The following modules are just trivial compilations (non-trivial cases are the end).
1044
1045java_library {
1046 name: "art-gtest-jars-AbstractMethod",
1047 srcs: ["AbstractMethod/**/*.java"],
1048 defaults: ["art-gtest-jars-defaults"],
1049}
1050
1051java_library {
1052 name: "art-gtest-jars-AllFields",
1053 srcs: ["AllFields/**/*.java"],
1054 defaults: ["art-gtest-jars-defaults"],
1055}
1056
1057java_library {
1058 name: "art-gtest-jars-DefaultMethods",
1059 srcs: ["DefaultMethods/**/*.java"],
1060 defaults: ["art-gtest-jars-defaults"],
1061}
1062
1063java_library {
1064 name: "art-gtest-jars-DexToDexDecompiler",
1065 srcs: ["DexToDexDecompiler/**/*.java"],
1066 defaults: ["art-gtest-jars-defaults"],
1067}
1068
1069java_library {
1070 name: "art-gtest-jars-ErroneousA",
1071 srcs: ["ErroneousA/**/*.java"],
1072 defaults: ["art-gtest-jars-defaults"],
1073}
1074
1075java_library {
1076 name: "art-gtest-jars-ErroneousB",
1077 srcs: ["ErroneousB/**/*.java"],
1078 defaults: ["art-gtest-jars-defaults"],
1079}
1080
1081java_library {
1082 name: "art-gtest-jars-ErroneousInit",
1083 srcs: ["ErroneousInit/**/*.java"],
1084 defaults: ["art-gtest-jars-defaults"],
1085}
1086
1087java_library {
Vladimir Markofdd46842020-03-25 14:57:17 +00001088 name: "art-gtest-jars-Extension1",
1089 srcs: ["Extension1/**/*.java"],
1090 defaults: ["art-gtest-jars-defaults"],
1091}
1092
1093java_library {
1094 name: "art-gtest-jars-Extension2",
1095 srcs: ["Extension2/**/*.java"],
1096 defaults: ["art-gtest-jars-defaults"],
1097}
1098
1099java_library {
David Srbecky8c8f1482020-02-05 20:17:10 +00001100 name: "art-gtest-jars-ForClassLoaderA",
1101 srcs: ["ForClassLoaderA/**/*.java"],
1102 defaults: ["art-gtest-jars-defaults"],
1103}
1104
1105java_library {
1106 name: "art-gtest-jars-ForClassLoaderB",
1107 srcs: ["ForClassLoaderB/**/*.java"],
1108 defaults: ["art-gtest-jars-defaults"],
1109}
1110
1111java_library {
1112 name: "art-gtest-jars-ForClassLoaderC",
1113 srcs: ["ForClassLoaderC/**/*.java"],
1114 defaults: ["art-gtest-jars-defaults"],
1115}
1116
1117java_library {
1118 name: "art-gtest-jars-ForClassLoaderD",
1119 srcs: ["ForClassLoaderD/**/*.java"],
1120 defaults: ["art-gtest-jars-defaults"],
1121}
1122
1123java_library {
1124 name: "art-gtest-jars-ExceptionHandle",
1125 srcs: ["ExceptionHandle/**/*.java"],
1126 defaults: ["art-gtest-jars-defaults"],
1127}
1128
1129java_library {
1130 name: "art-gtest-jars-GetMethodSignature",
1131 srcs: ["GetMethodSignature/**/*.java"],
1132 defaults: ["art-gtest-jars-defaults"],
1133}
1134
1135java_library {
1136 name: "art-gtest-jars-HiddenApi",
1137 srcs: ["HiddenApi/**/*.java"],
1138 defaults: ["art-gtest-jars-defaults"],
1139}
1140
1141java_library {
1142 name: "art-gtest-jars-HiddenApiSignatures",
1143 srcs: ["HiddenApiSignatures/**/*.java"],
1144 defaults: ["art-gtest-jars-defaults"],
1145}
1146
1147java_library {
1148 name: "art-gtest-jars-HiddenApiStubs",
1149 srcs: ["HiddenApiStubs/**/*.java"],
1150 defaults: ["art-gtest-jars-defaults"],
1151}
1152
1153java_library {
1154 name: "art-gtest-jars-ImageLayoutA",
1155 srcs: ["ImageLayoutA/**/*.java"],
1156 defaults: ["art-gtest-jars-defaults"],
1157}
1158
1159java_library {
1160 name: "art-gtest-jars-ImageLayoutB",
1161 srcs: ["ImageLayoutB/**/*.java"],
1162 defaults: ["art-gtest-jars-defaults"],
1163}
1164
1165java_library {
1166 name: "art-gtest-jars-IMTA",
1167 srcs: ["IMTA/**/*.java"],
1168 defaults: ["art-gtest-jars-defaults"],
1169}
1170
1171java_library {
1172 name: "art-gtest-jars-IMTB",
1173 srcs: ["IMTB/**/*.java"],
1174 defaults: ["art-gtest-jars-defaults"],
1175}
1176
1177java_library {
1178 name: "art-gtest-jars-Instrumentation",
1179 srcs: ["Instrumentation/**/*.java"],
1180 defaults: ["art-gtest-jars-defaults"],
1181}
1182
1183java_library {
1184 name: "art-gtest-jars-Interfaces",
1185 srcs: ["Interfaces/**/*.java"],
1186 defaults: ["art-gtest-jars-defaults"],
1187}
1188
1189java_library {
1190 name: "art-gtest-jars-Lookup",
1191 srcs: ["Lookup/**/*.java"],
1192 defaults: ["art-gtest-jars-defaults"],
1193}
1194
1195java_library {
1196 name: "art-gtest-jars-Main",
1197 srcs: ["Main/**/*.java"],
1198 defaults: ["art-gtest-jars-defaults"],
1199}
1200
1201java_library {
1202 name: "art-gtest-jars-ManyMethods",
1203 srcs: ["ManyMethods/**/*.java"],
1204 defaults: ["art-gtest-jars-defaults"],
1205}
1206
1207java_library {
1208 name: "art-gtest-jars-MethodTypes",
1209 srcs: ["MethodTypes/**/*.java"],
1210 defaults: ["art-gtest-jars-defaults"],
1211}
1212
1213java_library {
1214 name: "art-gtest-jars-MyClass",
1215 srcs: ["MyClass/**/*.java"],
1216 defaults: ["art-gtest-jars-defaults"],
1217}
1218
1219java_library {
1220 name: "art-gtest-jars-MyClassNatives",
1221 srcs: ["MyClassNatives/**/*.java"],
1222 defaults: ["art-gtest-jars-defaults"],
1223}
1224
1225java_library {
1226 name: "art-gtest-jars-Nested",
1227 srcs: ["Nested/**/*.java"],
1228 defaults: ["art-gtest-jars-defaults"],
1229}
1230
1231java_library {
1232 name: "art-gtest-jars-NonStaticLeafMethods",
1233 srcs: ["NonStaticLeafMethods/**/*.java"],
1234 defaults: ["art-gtest-jars-defaults"],
1235}
1236
1237java_library {
1238 name: "art-gtest-jars-Packages",
1239 srcs: ["Packages/**/*.java"],
1240 defaults: ["art-gtest-jars-defaults"],
1241}
1242
1243java_library {
1244 name: "art-gtest-jars-ProtoCompare",
1245 srcs: ["ProtoCompare/**/*.java"],
1246 defaults: ["art-gtest-jars-defaults"],
1247}
1248
1249java_library {
1250 name: "art-gtest-jars-ProtoCompare2",
1251 srcs: ["ProtoCompare2/**/*.java"],
1252 defaults: ["art-gtest-jars-defaults"],
1253}
1254
1255java_library {
1256 name: "art-gtest-jars-StaticLeafMethods",
1257 srcs: ["StaticLeafMethods/**/*.java"],
1258 defaults: ["art-gtest-jars-defaults"],
1259}
1260
1261java_library {
1262 name: "art-gtest-jars-Statics",
1263 srcs: ["Statics/**/*.java"],
1264 defaults: ["art-gtest-jars-defaults"],
1265}
1266
1267java_library {
1268 name: "art-gtest-jars-StaticsFromCode",
1269 srcs: ["StaticsFromCode/**/*.java"],
1270 defaults: ["art-gtest-jars-defaults"],
1271}
1272
1273java_library {
1274 name: "art-gtest-jars-StringLiterals",
1275 srcs: ["StringLiterals/**/*.java"],
1276 defaults: ["art-gtest-jars-defaults"],
1277}
1278
1279java_library {
1280 name: "art-gtest-jars-Transaction",
1281 srcs: ["Transaction/**/*.java"],
1282 defaults: ["art-gtest-jars-defaults"],
1283}
1284
1285java_library {
1286 name: "art-gtest-jars-XandY",
1287 srcs: ["XandY/**/*.java"],
1288 defaults: ["art-gtest-jars-defaults"],
1289}
1290
1291// The following cases are non-trivial.
1292
1293// Uncompress classes.dex files in the jar file.
1294genrule_defaults {
1295 name: "art-gtest-jars-uncompress-defaults",
1296 cmd: "$(location zip2zip) -i $(in) -o $(out) -0 'classes*.dex'",
1297 tools: ["zip2zip"],
1298}
1299
1300// Ensure the files are at least 4 byte aligned.
1301genrule_defaults {
1302 name: "art-gtest-jars-align-defaults",
1303 cmd: "$(location zipalign) 4 $(in) $(out)",
1304 tools: ["zipalign"],
1305}
1306
1307// Assemble jar file from smali source.
1308genrule_defaults {
1309 name: "art-gtest-jars-smali-defaults",
1310 cmd: "$(location smali) assemble --output $(out) $(in)",
1311 tools: ["smali"],
1312}
1313
1314// A copy of Main with the classes.dex stripped for the oat file assistant tests.
1315genrule {
1316 name: "art-gtest-jars-MainStripped",
1317 srcs: [":art-gtest-jars-Main"],
1318 cmd: "$(location zip2zip) -i $(in) -o $(out) -x 'classes*.dex'",
1319 out: ["art-gtest-jars-MainStripped.jar"],
1320 tools: ["zip2zip"],
1321}
1322
1323// An empty.dex that is empty and uncompressed for the dex2oat tests.
1324genrule {
1325 name: "art-gtest-jars-MainEmptyUncompressed",
1326 srcs: ["Main/empty.dex"],
1327 cmd: "$(location soong_zip) -j -L 0 -o $(out) -f $(in)",
1328 out: ["art-gtest-jars-MainEmptyUncompressed.jar"],
1329 tools: ["soong_zip"],
1330}
1331
1332// An empty.dex that is empty and uncompressed and aligned for the dex2oat tests.
1333genrule {
1334 name: "art-gtest-jars-MainEmptyUncompressedAligned",
1335 defaults: ["art-gtest-jars-align-defaults"],
1336 srcs: [":art-gtest-jars-MainEmptyUncompressed"],
1337 out: ["art-gtest-jars-MainEmptyUncompressedAligned.jar"],
1338}
1339
1340// A copy of Main with the classes.dex uncompressed for the dex2oat tests.
1341genrule {
1342 name: "art-gtest-jars-MainUncompressed",
1343 defaults: ["art-gtest-jars-uncompress-defaults"],
1344 srcs: [":art-gtest-jars-Main"],
1345 out: ["art-gtest-jars-MainUncompressed.jar"],
1346}
1347
1348// A copy of Main with the classes.dex uncompressed and aligned for the dex2oat tests.
1349genrule {
1350 name: "art-gtest-jars-MainUncompressedAligned",
1351 defaults: ["art-gtest-jars-align-defaults"],
1352 srcs: [":art-gtest-jars-MainUncompressed"],
1353 out: ["art-gtest-jars-MainUncompressedAligned.jar"],
1354}
1355
1356java_library {
1357 name: "art-gtest-jars-MultiDex",
1358 srcs: ["MultiDex/**/*.java"],
1359 defaults: ["art-gtest-jars-defaults"],
1360 min_sdk_version: "19",
1361 dxflags: [
1362 "--main-dex-list",
1363 "art/test/MultiDex/main.list",
1364 ],
1365}
1366
1367// A copy of MultiDex with the classes.dex uncompressed for the OatFile tests.
1368genrule {
1369 name: "art-gtest-jars-MultiDexUncompressed",
1370 defaults: ["art-gtest-jars-uncompress-defaults"],
1371 srcs: [":art-gtest-jars-MultiDex"],
1372 out: ["art-gtest-jars-MultiDexUncompressed.jar"],
1373}
1374
1375// A copy of MultiDex with the classes.dex uncompressed and aligned for the OatFile tests.
1376genrule {
1377 name: "art-gtest-jars-MultiDexUncompressedAligned",
1378 defaults: ["art-gtest-jars-align-defaults"],
1379 srcs: [":art-gtest-jars-MultiDexUncompressed"],
1380 out: ["art-gtest-jars-MultiDexUncompressedAligned.jar"],
1381}
1382
1383java_library {
1384 name: "art-gtest-jars-MultiDexModifiedSecondary",
1385 srcs: ["MultiDexModifiedSecondary/**/*.java"],
1386 defaults: ["art-gtest-jars-defaults"],
1387 min_sdk_version: "19",
1388 dxflags: [
1389 "--main-dex-list",
1390 "art/test/MultiDexModifiedSecondary/main.list",
1391 ],
1392}
1393
1394java_library {
1395 name: "art-gtest-jars-ProfileTestMultiDex",
1396 srcs: ["ProfileTestMultiDex/**/*.java"],
1397 defaults: ["art-gtest-jars-defaults"],
1398 min_sdk_version: "19",
1399 dxflags: [
1400 "--main-dex-list",
1401 "art/test/ProfileTestMultiDex/main.list",
1402 ],
1403}
1404
1405genrule {
1406 name: "art-gtest-jars-VerifierDeps",
1407 defaults: ["art-gtest-jars-smali-defaults"],
1408 srcs: ["VerifierDeps/**/*.smali"],
1409 out: ["art-gtest-jars-VerifierDeps.jar"],
1410}
1411
1412genrule {
1413 name: "art-gtest-jars-VerifierDepsMulti",
1414 defaults: ["art-gtest-jars-smali-defaults"],
1415 srcs: ["VerifierDepsMulti/**/*.smali"],
1416 out: ["art-gtest-jars-VerifierDepsMulti.jar"],
1417}
1418
1419genrule {
1420 name: "art-gtest-jars-VerifySoftFailDuringClinit",
1421 defaults: ["art-gtest-jars-smali-defaults"],
1422 srcs: ["VerifySoftFailDuringClinit/**/*.smali"],
1423 out: ["art-gtest-jars-VerifySoftFailDuringClinit.jar"],
1424}
David Srbecky4a88a5a2020-05-05 16:21:57 +01001425
1426genrule {
1427 name: "art-gtest-jars-LinkageTest",
1428 defaults: ["art-gtest-jars-smali-defaults"],
1429 srcs: ["LinkageTest/*.smali"],
1430 out: ["art-gtest-jars-LinkageTest.jar"],
1431}