1// 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 17// ART gtests. 18 19art_cc_defaults { 20 name: "art_test_defaults", 21 host_supported: true, 22 target: { 23 android_arm: { 24 relative_install_path: "art/arm", 25 }, 26 android_arm64: { 27 relative_install_path: "art/arm64", 28 }, 29 android_x86: { 30 relative_install_path: "art/x86", 31 }, 32 android_x86_64: { 33 relative_install_path: "art/x86_64", 34 }, 35 darwin: { 36 enabled: false, 37 }, 38 }, 39 cflags: [ 40 "-Wno-frame-larger-than=", 41 ], 42 apex_available: [ 43 "com.android.art.debug", 44 ], 45} 46 47art_cc_defaults { 48 name: "art_gtest_defaults", 49 // These really are gtests, but the gtest library comes from libart-gtest.so 50 gtest: false, 51 defaults: [ 52 "art_test_defaults", 53 "art_debug_defaults", 54 "art_defaults", 55 ], 56 57 test_suites: ["general-tests"], 58 test_options: { 59 test_suite_tag: ["art-host-gtest"], 60 }, 61 62 shared_libs: [ 63 "libartd", 64 "libartd-disassembler", 65 "libvixld", 66 "libart-gtest", 67 "libdexfiled", 68 "libprofiled", 69 "libartbased", 70 71 "libbase", 72 "libnativehelper", 73 "libz", 74 ], 75 whole_static_libs: [ 76 "libsigchain", 77 ], 78 79 target: { 80 linux: { 81 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 ], 89 cflags: [ 90 // gtest issue 91 "-Wno-used-but-marked-unused", 92 "-Wno-deprecated", 93 "-Wno-missing-noreturn", 94 ], 95 }, 96 host: { 97 shared_libs: [ 98 "libziparchive", 99 ], 100 }, 101 android: { 102 shared_libs: [ 103 "liblog", 104 ], 105 }, 106 }, 107} 108 109art_cc_defaults { 110 name: "libart-gtest-defaults", 111 host_supported: true, 112 defaults: [ 113 "art_debug_defaults", 114 "art_defaults", 115 ], 116 shared_libs: [ 117 "libartd", 118 "libartd-compiler", 119 "libdexfiled", 120 "libprofiled", 121 "libartbased", 122 "liblog", 123 ], 124 static_libs: [ 125 "libgtest_isolated", 126 ], 127 target: { 128 android32: { 129 cflags: ["-DART_TARGET_NATIVETEST_DIR=/data/nativetest/art"], 130 }, 131 android64: { 132 cflags: ["-DART_TARGET_NATIVETEST_DIR=/data/nativetest64/art"], 133 }, 134 linux: { 135 cflags: [ 136 // gtest issue 137 "-Wno-used-but-marked-unused", 138 "-Wno-deprecated", 139 "-Wno-missing-noreturn", 140 ], 141 }, 142 darwin: { 143 enabled: false, 144 }, 145 }, 146 apex_available: [ 147 "com.android.art.debug", 148 ], 149} 150 151art_cc_library { 152 name: "libart-gtest", 153 host_supported: true, 154 defaults: [ 155 "art_debug_defaults", 156 "art_defaults", 157 ], 158 srcs: [ 159 "common/gtest_main.cc", 160 ], 161 whole_static_libs: [ 162 "libart-compiler-gtest", 163 "libart-runtime-gtest", 164 "libartbase-art-gtest", 165 "libgtest_isolated", 166 ], 167 shared_libs: [ 168 "libartd", 169 "libartd-compiler", 170 "libdexfiled", 171 "libprofiled", 172 "libartbased", 173 "libbase", 174 "libbacktrace", 175 "liblog", 176 ], 177 target: { 178 darwin: { 179 enabled: false, 180 }, 181 }, 182 apex_available: [ 183 "com.android.art.debug", 184 ], 185} 186 187// ART run-tests. 188 189filegroup { 190 name: "art-run-test-template", 191 srcs: [ 192 "AndroidTestTemplate.xml", 193 ], 194} 195 196java_defaults { 197 name: "art-run-test-defaults", 198 199 // Compile against the "core" bootclasspath, not the "default" one (current 200 // platform) -- use the same settings as Libcore tests (see e.g. the 201 // definition of module `core-tests` in libcore/JavaLibrary.bp). 202 // 203 // Note: The legacy way to build ART run-tests uses the 204 // `javac_with_bootclasspath` function defined in `test/etc/default-build`. 205 // See also `tools/javac-helper.sh`. 206 sdk_version: "none", 207 system_modules: "core-all-system-modules", 208 209 // Some ART run-tests contain constructs which break ErrorProne checks; 210 // disable them on `errorprone` builds. 211 errorprone: { 212 javacflags: ["-XepDisableAllChecks"], 213 }, 214 215 data: ["expected.txt"], 216 test_config_template: ":art-run-test-template", 217 test_suites: ["general-tests"], 218} 219 220art_cc_test_library { 221 name: "libarttest", 222 defaults: ["libarttest-defaults"], 223 shared_libs: [ 224 "libart", 225 "libdexfile", 226 "libprofile", 227 "libartbase", 228 ], 229} 230 231art_cc_test_library { 232 name: "libarttestd", 233 defaults: [ 234 "art_debug_defaults", 235 "libarttest-defaults", 236 ], 237 shared_libs: [ 238 "libartd", 239 "libdexfiled", 240 "libprofiled", 241 "libartbased", 242 ], 243} 244 245art_cc_defaults { 246 name: "libnativebridgetest-defaults", 247 defaults: [ 248 "art_test_defaults", 249 "art_defaults", 250 ], 251 header_libs: ["libnativebridge-headers"], 252 srcs: ["115-native-bridge/nativebridge.cc"], 253} 254 255art_cc_test_library { 256 name: "libnativebridgetest", 257 shared_libs: ["libart"], 258 defaults: [ 259 "libnativebridgetest-defaults", 260 ], 261} 262 263art_cc_test_library { 264 name: "libnativebridgetestd", 265 shared_libs: ["libartd"], 266 defaults: [ 267 "libnativebridgetest-defaults", 268 "art_debug_defaults", 269 ], 270} 271 272// ART JVMTI run-tests. 273 274cc_defaults { 275 name: "libartagent-defaults", 276 defaults: [ 277 "art_test_defaults", 278 "art_defaults", 279 ], 280 shared_libs: [ 281 "libbacktrace", 282 "libbase", 283 "libnativehelper", 284 ], 285} 286 287art_cc_test_library { 288 name: "libartagent", 289 srcs: ["900-hello-plugin/load_unload.cc"], 290 defaults: ["libartagent-defaults"], 291 shared_libs: [ 292 "libart", 293 "libdexfile", 294 "libprofile", 295 "libartbase", 296 ], 297} 298 299art_cc_test_library { 300 name: "libartagentd", 301 srcs: ["900-hello-plugin/load_unload.cc"], 302 defaults: [ 303 "art_debug_defaults", 304 "libartagent-defaults", 305 ], 306 shared_libs: [ 307 "libartd", 308 "libdexfiled", 309 "libprofiled", 310 "libartbased", 311 ], 312} 313 314art_cc_defaults { 315 name: "libtiagent-base-defaults", 316 defaults: [ 317 "art_test_defaults", 318 "art_defaults", 319 // Not derived from libartagent-defaults for NDK. 320 ], 321 srcs: [ 322 // These are the ART-independent parts. 323 "ti-agent/agent_common.cc", 324 "ti-agent/agent_startup.cc", 325 "ti-agent/jni_binder.cc", 326 "ti-agent/jvmti_helper.cc", 327 "ti-agent/test_env.cc", 328 "ti-agent/breakpoint_helper.cc", 329 "ti-agent/common_helper.cc", 330 "ti-agent/early_return_helper.cc", 331 "ti-agent/frame_pop_helper.cc", 332 "ti-agent/locals_helper.cc", 333 "ti-agent/monitors_helper.cc", 334 "ti-agent/redefinition_helper.cc", 335 "ti-agent/suspension_helper.cc", 336 "ti-agent/suspend_event_helper.cc", 337 "ti-agent/stack_trace_helper.cc", 338 "ti-agent/threads_helper.cc", 339 "ti-agent/trace_helper.cc", 340 "ti-agent/exceptions_helper.cc", 341 // This is the list of non-special OnLoad things and excludes BCI and anything that depends 342 // on ART internals. 343 "903-hello-tagging/tagging.cc", 344 "904-object-allocation/tracking.cc", 345 "905-object-free/tracking_free.cc", 346 "906-iterate-heap/iterate_heap.cc", 347 "907-get-loaded-classes/get_loaded_classes.cc", 348 "908-gc-start-finish/gc_callbacks.cc", 349 "910-methods/methods.cc", 350 "911-get-stack-trace/stack_trace.cc", 351 "912-classes/classes.cc", 352 "913-heaps/heaps.cc", 353 "918-fields/fields.cc", 354 "920-objects/objects.cc", 355 "922-properties/properties.cc", 356 "923-monitors/monitors.cc", 357 "924-threads/threads.cc", 358 "925-threadgroups/threadgroups.cc", 359 "927-timers/timers.cc", 360 "928-jni-table/jni_table.cc", 361 "929-search/search.cc", 362 "931-agent-thread/agent_thread.cc", 363 "933-misc-events/misc_events.cc", 364 "945-obsolete-native/obsolete_native.cc", 365 "983-source-transform-verify/source_transform.cc", 366 "984-obsolete-invoke/obsolete_invoke.cc", 367 "986-native-method-bind/native_bind.cc", 368 "987-agent-bind/agent_bind.cc", 369 "988-method-trace/trace_fib.cc", 370 "989-method-trace-throw/method_trace.cc", 371 "991-field-trace-2/field_trace.cc", 372 "992-source-data/source_file.cc", 373 "993-breakpoints/breakpoints.cc", 374 "996-breakpoint-obsolete/obsolete_breakpoints.cc", 375 "1900-track-alloc/alloc.cc", 376 "1901-get-bytecodes/bytecodes.cc", 377 "1905-suspend-native/native_suspend.cc", 378 "1908-suspend-native-resume-self/native_suspend_resume.cc", 379 "1909-per-agent-tls/agent_tls.cc", 380 "1914-get-local-instance/local_instance.cc", 381 "1919-vminit-thread-start-timing/vminit.cc", 382 "1920-suspend-native-monitor/native_suspend_monitor.cc", 383 "1921-suspend-native-recursive-monitor/native_suspend_recursive_monitor.cc", 384 "1922-owned-monitors-info/owned_monitors.cc", 385 "1924-frame-pop-toggle/frame_pop_toggle.cc", 386 "1926-missed-frame-pop/frame_pop_missed.cc", 387 "1927-exception-event/exception_event.cc", 388 "1930-monitor-info/monitor.cc", 389 "1932-monitor-events-misc/monitor_misc.cc", 390 "1934-jvmti-signal-thread/signal_threads.cc", 391 "1939-proxy-frames/local_instance.cc", 392 "1941-dispose-stress/dispose_stress.cc", 393 "1942-suspend-raw-monitor-exit/native_suspend_monitor.cc", 394 "1943-suspend-raw-monitor-wait/native_suspend_monitor.cc", 395 "1946-list-descriptors/descriptors.cc", 396 "1950-unprepared-transform/unprepared_transform.cc", 397 "1951-monitor-enter-no-suspend/raw_monitor.cc", 398 "1953-pop-frame/pop_frame.cc", 399 "1957-error-ext/lasterror.cc", 400 // TODO Renumber 401 "1962-multi-thread-events/multi_thread_events.cc", 402 "1963-add-to-dex-classloader-in-memory/add_to_loader.cc", 403 "1968-force-early-return/force_early_return.cc", 404 "1969-force-early-return-void/force_early_return_void.cc", 405 "1970-force-early-return-long/force_early_return_long.cc", 406 "1974-resize-array/resize_array.cc", 407 "1975-hello-structural-transformation/structural_transform.cc", 408 "1976-hello-structural-static-methods/structural_transform_methods.cc", 409 "2005-pause-all-redefine-multithreaded/pause-all.cc", 410 "2009-structural-local-ref/local-ref.cc", 411 "2035-structural-native-method/structural-native.cc", 412 ], 413 // Use NDK-compatible headers for ctstiagent. 414 header_libs: [ 415 "libopenjdkjvmti_headers", 416 ], 417 local_include_dirs: ["ti-agent"], 418} 419 420art_cc_defaults { 421 name: "libtiagent-defaults", 422 defaults: [ 423 "libtiagent-base-defaults", 424 "libartagent-defaults", 425 ], 426 srcs: [ 427 // This is to get the IsInterpreted native method. 428 "common/stack_inspect.cc", 429 "common/runtime_state.cc", 430 "ti-agent/common_load.cc", 431 // This includes the remaining test functions. We should try to refactor things to 432 // make this list smaller. 433 "901-hello-ti-agent/basics.cc", 434 "909-attach-agent/attach.cc", 435 "912-classes/classes_art.cc", 436 "936-search-onload/search_onload.cc", 437 "980-redefine-object/redef_object.cc", 438 "983-source-transform-verify/source_transform_art.cc", 439 "1940-ddms-ext/ddm_ext.cc", 440 // "1952-pop-frame-jit/pop_frame.cc", 441 "1959-redefine-object-instrument/fake_redef_object.cc", 442 "1960-obsolete-jit-multithread-native/native_say_hi.cc", 443 "1964-add-to-dex-classloader-file/add_to_loader.cc", 444 "1963-add-to-dex-classloader-in-memory/check_memfd_create.cc", 445 "2012-structural-redefinition-failures-jni-id/set-jni-id-used.cc", 446 "2031-zygote-compiled-frame-deopt/native-wait.cc", 447 ], 448 static_libs: [ 449 "libz", 450 "slicer_no_rtti", 451 ], 452} 453 454art_cc_test_library { 455 name: "libtiagent", 456 defaults: ["libtiagent-defaults"], 457 shared_libs: [ 458 "libart", 459 "libdexfile", 460 "libprofile", 461 "libartbase", 462 ], 463} 464 465art_cc_test_library { 466 name: "libtiagentd", 467 defaults: [ 468 "art_debug_defaults", 469 "libtiagent-defaults", 470 ], 471 shared_libs: [ 472 "libartd", 473 "libdexfiled", 474 "libprofiled", 475 "libartbased", 476 ], 477} 478 479cc_library_static { 480 name: "libctstiagent", 481 defaults: ["libtiagent-base-defaults"], 482 visibility: [ 483 "//cts/hostsidetests/jvmti:__subpackages__", 484 ], 485 host_supported: false, 486 srcs: [ 487 "983-source-transform-verify/source_transform_slicer.cc", 488 ], 489 whole_static_libs: [ 490 "slicer_ndk_no_rtti", 491 ], 492 static_libs: [ 493 "libbase_ndk", 494 ], 495 shared_libs: [ 496 "libz", // for slicer (using adler32). 497 ], 498 sdk_version: "current", 499 stl: "c++_static", 500 header_libs: [ 501 "jni_headers", 502 // This is needed to resolve the base/ header file in libdexfile. Unfortunately there are 503 // many problems with how we export headers that are making doing this the 'right' way 504 // difficult. 505 // TODO: move those headers to art/ rather than under runtime. 506 "libart_runtime_headers_ndk", 507 ], 508 export_include_dirs: ["ti-agent"], 509} 510 511art_cc_defaults { 512 name: "libtistress-srcs", 513 defaults: ["libartagent-defaults"], 514 srcs: [ 515 "ti-stress/stress.cc", 516 ], 517 header_libs: ["libopenjdkjvmti_headers"], 518} 519 520art_cc_defaults { 521 name: "libtistress-defaults", 522 defaults: ["libtistress-srcs"], 523 shared_libs: [ 524 "slicer_no_rtti", 525 "libz", // for slicer (using adler32). 526 ], 527} 528 529art_cc_test_library { 530 name: "libtistress", 531 defaults: ["libtistress-defaults"], 532 shared_libs: [ 533 "libartbase", 534 "libz", 535 ], 536} 537 538art_cc_test_library { 539 name: "libtistressd", 540 defaults: [ 541 "art_debug_defaults", 542 "libtistress-defaults", 543 ], 544 shared_libs: [ 545 "libartbased", 546 "libz", 547 ], 548} 549 550art_cc_defaults { 551 name: "libtistress-shared-defaults", 552 defaults: [ 553 "libtistress-srcs", 554 ], 555 static_libs: ["slicer_no_rtti"], 556} 557 558art_cc_test_library { 559 name: "libtistresss", 560 defaults: ["libtistress-shared-defaults"], 561 shared_libs: [ 562 "libartbase", 563 "libz", 564 ], 565} 566 567art_cc_test_library { 568 name: "libtistressds", 569 defaults: [ 570 "libtistress-shared-defaults", 571 ], 572 shared_libs: [ 573 "libartbased", 574 "libz", 575 ], 576} 577 578cc_defaults { 579 name: "libarttest-defaults", 580 defaults: [ 581 "art_test_defaults", 582 "art_defaults", 583 ], 584 srcs: [ 585 "004-JniTest/jni_test.cc", 586 "004-ReferenceMap/stack_walk_refmap_jni.cc", 587 "004-SignalTest/signaltest.cc", 588 "004-StackWalk/stack_walk_jni.cc", 589 "004-ThreadStress/thread_stress.cc", 590 "004-UnsafeTest/unsafe_test.cc", 591 "044-proxy/native_proxy.cc", 592 "051-thread/thread_test.cc", 593 "1337-gc-coverage/gc_coverage.cc", 594 "136-daemon-jni-shutdown/daemon_jni_shutdown.cc", 595 "137-cfi/cfi.cc", 596 "139-register-natives/regnative.cc", 597 "141-class-unload/jni_unload.cc", 598 "148-multithread-gc-annotations/gc_coverage.cc", 599 "149-suspend-all-stress/suspend_all.cc", 600 "154-gc-loop/heap_interface.cc", 601 "167-visit-locks/visit_locks.cc", 602 "169-threadgroup-jni/jni_daemon_thread.cc", 603 "172-app-image-twice/debug_print_class.cc", 604 "177-visibly-initialized-deadlock/visibly_initialized.cc", 605 "178-app-image-native-method/native_methods.cc", 606 "179-nonvirtual-jni/nonvirtual-call.cc", 607 "1945-proxy-method-arguments/get_args.cc", 608 "203-multi-checkpoint/multi_checkpoint.cc", 609 "305-other-fault-handler/fault_handler.cc", 610 "454-get-vreg/get_vreg_jni.cc", 611 "457-regs/regs_jni.cc", 612 "461-get-reference-vreg/get_reference_vreg_jni.cc", 613 "466-get-live-vreg/get_live_vreg_jni.cc", 614 "497-inlining-and-class-loader/clear_dex_cache.cc", 615 "543-env-long-ref/env_long_ref.cc", 616 "566-polymorphic-inlining/polymorphic_inline.cc", 617 "570-checker-osr/osr.cc", 618 "595-profile-saving/profile-saving.cc", 619 "596-app-images/app_images.cc", 620 "596-monitor-inflation/monitor_inflation.cc", 621 "597-deopt-new-string/deopt.cc", 622 "616-cha-unloading/cha_unload.cc", 623 "626-const-class-linking/clear_dex_cache_types.cc", 624 "642-fp-callees/fp_callees.cc", 625 "647-jni-get-field-id/get_field_id.cc", 626 "656-annotation-lookup-generic-jni/test.cc", 627 "661-oat-writer-layout/oat_writer_layout.cc", 628 "664-aget-verifier/aget-verifier.cc", 629 "667-jit-jni-stub/jit_jni_stub_test.cc", 630 "674-hiddenapi/hiddenapi.cc", 631 "692-vdex-inmem-loader/vdex_inmem_loader.cc", 632 "708-jit-cache-churn/jit.cc", 633 "720-thread-priority/thread_priority.cc", 634 "800-smali/jni.cc", 635 "909-attach-agent/disallow_debugging.cc", 636 "1001-app-image-regions/app_image_regions.cc", 637 "1002-notify-startup/startup_interface.cc", 638 "1947-breakpoint-redefine-deopt/check_deopt.cc", 639 "1972-jni-id-swap-indices/jni_id.cc", 640 "1985-structural-redefine-stack-scope/stack_scope.cc", 641 "2011-stack-walk-concurrent-instrument/stack_walk_concurrent.cc", 642 "2031-zygote-compiled-frame-deopt/native-wait.cc", 643 "2033-shutdown-mechanics/native_shutdown.cc", 644 "2036-jni-filechannel/jni_filechannel.cc", 645 "common/runtime_state.cc", 646 "common/stack_inspect.cc", 647 ], 648 shared_libs: [ 649 "libbacktrace", 650 "libbase", 651 "libnativehelper", 652 ], 653} 654 655java_library { 656 name: "art_cts_jvmti_test_library", 657 visibility: [ 658 "//cts/hostsidetests/jvmti:__subpackages__", 659 ], 660 srcs: [ 661 // shim classes. We use one that exposes the common functionality. 662 "jvmti-common/Redefinition.java", 663 "jvmti-common/Main.java", 664 "jvmti-common/Trace.java", 665 "jvmti-common/Breakpoint.java", 666 "jvmti-common/Suspension.java", 667 "jvmti-common/Locals.java", 668 "jvmti-common/StackTrace.java", 669 "jvmti-common/FramePop.java", 670 "jvmti-common/Exceptions.java", 671 "jvmti-common/Monitors.java", 672 "jvmti-common/NonStandardExit.java", 673 "jvmti-common/Threads.java", 674 "jvmti-common/SuspendEvents.java", 675 676 // Actual test classes. 677 "901-hello-ti-agent/src/art/Test901.java", 678 "902-hello-transformation/src/art/Test902.java", 679 "903-hello-tagging/src/art/Test903.java", 680 "904-object-allocation/src/art/Test904.java", 681 "905-object-free/src/art/Test905.java", 682 "906-iterate-heap/src/art/Test906.java", 683 "907-get-loaded-classes/src/art/Test907.java", 684 "907-get-loaded-classes/src/art/Cerr.java", 685 "908-gc-start-finish/src/art/Test908.java", 686 "910-methods/src/art/Test910.java", 687 "911-get-stack-trace/src/art/Test911.java", 688 "911-get-stack-trace/src/art/AllTraces.java", 689 "911-get-stack-trace/src/art/ControlData.java", 690 "911-get-stack-trace/src/art/Frames.java", 691 "911-get-stack-trace/src/art/OtherThread.java", 692 "911-get-stack-trace/src/art/PrintThread.java", 693 "911-get-stack-trace/src/art/Recurse.java", 694 "911-get-stack-trace/src/art/SameThread.java", 695 "911-get-stack-trace/src/art/ThreadListTraces.java", 696 "912-classes/src-art/art/Test912.java", 697 "912-classes/src-art/art/DexData.java", 698 "913-heaps/src/art/Test913.java", 699 "914-hello-obsolescence/src/art/Test914.java", 700 "915-obsolete-2/src/art/Test915.java", 701 "917-fields-transformation/src/art/Test917.java", 702 "918-fields/src/art/Test918.java", 703 "919-obsolete-fields/src/art/Test919.java", 704 "920-objects/src/art/Test920.java", 705 "922-properties/src/art/Test922.java", 706 "923-monitors/src/art/Test923.java", 707 "924-threads/src/art/Test924.java", 708 "925-threadgroups/src/art/Test925.java", 709 "926-multi-obsolescence/src/art/Test926.java", 710 "927-timers/src/art/Test927.java", 711 "928-jni-table/src/art/Test928.java", 712 "930-hello-retransform/src/art/Test930.java", 713 "931-agent-thread/src/art/Test931.java", 714 "932-transform-saves/src/art/Test932.java", 715 "933-misc-events/src/art/Test933.java", 716 "940-recursive-obsolete/src/art/Test940.java", 717 "942-private-recursive/src/art/Test942.java", 718 "944-transform-classloaders/src/art/Test944.java", 719 "945-obsolete-native/src/art/Test945.java", 720 "947-reflect-method/src/art/Test947.java", 721 "951-threaded-obsolete/src/art/Test951.java", 722 "982-ok-no-retransform/src/art/Test982.java", 723 "983-source-transform-verify/src/art/Test983.java", 724 "984-obsolete-invoke/src/art/Test984.java", 725 "985-re-obsolete/src/art/Test985.java", 726 "986-native-method-bind/src/art/Test986.java", 727 "988-method-trace/src/art/Test988.java", 728 "988-method-trace/src/art/Test988Intrinsics.java", 729 "989-method-trace-throw/src/art/Test989.java", 730 "990-field-trace/src/art/Test990.java", 731 "991-field-trace-2/src/art/Test991.java", 732 "992-source-data/src/art/Test992.java", 733 "992-source-data/src/art/Target2.java", 734 "993-breakpoints/src/art/Test993.java", 735 "994-breakpoint-line/src/art/Test994.java", 736 "995-breakpoints-throw/src/art/Test995.java", 737 "996-breakpoint-obsolete/src/art/Test996.java", 738 "997-single-step/src/art/Test997.java", 739 "1900-track-alloc/src/art/Test1900.java", 740 "1901-get-bytecodes/src/art/Test1901.java", 741 "1902-suspend/src/art/Test1902.java", 742 "1903-suspend-self/src/art/Test1903.java", 743 "1904-double-suspend/src/art/Test1904.java", 744 "1906-suspend-list-me-first/src/art/Test1906.java", 745 "1907-suspend-list-self-twice/src/art/Test1907.java", 746 "1908-suspend-native-resume-self/src/art/Test1908.java", 747 "1909-per-agent-tls/src/art/Test1909.java", 748 "1910-transform-with-default/src/art/Test1910.java", 749 "1911-get-local-var-table/src/art/Test1911.java", 750 "1912-get-set-local-primitive/src/art/Test1912.java", 751 "1913-get-set-local-objects/src/art/Test1913.java", 752 "1914-get-local-instance/src/art/Test1914.java", 753 "1915-get-set-local-current-thread/src/art/Test1915.java", 754 "1916-get-set-current-frame/src/art/Test1916.java", 755 "1917-get-stack-frame/src/art/Test1917.java", 756 "1920-suspend-native-monitor/src/art/Test1920.java", 757 "1921-suspend-native-recursive-monitor/src/art/Test1921.java", 758 "1922-owned-monitors-info/src/art/Test1922.java", 759 "1923-frame-pop/src/art/Test1923.java", 760 "1924-frame-pop-toggle/src/art/Test1924.java", 761 "1925-self-frame-pop/src/art/Test1925.java", 762 "1926-missed-frame-pop/src/art/Test1926.java", 763 "1927-exception-event/src/art/Test1927.java", 764 "1928-exception-event-exception/src/art/Test1928.java", 765 "1930-monitor-info/src/art/Test1930.java", 766 "1931-monitor-events/src/art/Test1931.java", 767 "1932-monitor-events-misc/src/art/Test1932.java", 768 "1933-monitor-current-contended/src/art/Test1933.java", 769 "1934-jvmti-signal-thread/src/art/Test1934.java", 770 "1936-thread-end-events/src/art/Test1936.java", 771 "1937-transform-soft-fail/src/art/Test1937.java", 772 "1939-proxy-frames/src/art/Test1939.java", 773 "1941-dispose-stress/src/art/Test1941.java", 774 "1942-suspend-raw-monitor-exit/src/art/Test1942.java", 775 "1943-suspend-raw-monitor-wait/src/art/Test1943.java", 776 "1953-pop-frame/src/art/Test1953.java", 777 "1958-transform-try-jit/src/art/Test1958.java", 778 "1962-multi-thread-events/src/art/Test1962.java", 779 "1963-add-to-dex-classloader-in-memory/src/art/Test1963.java", 780 "1967-get-set-local-bad-slot/src/art/Test1967.java", 781 "1968-force-early-return/src/art/Test1968.java", 782 "1969-force-early-return-void/src/art/Test1969.java", 783 "1970-force-early-return-long/src/art/Test1970.java", 784 "1971-multi-force-early-return/src/art/Test1971.java", 785 "1974-resize-array/src/art/Test1974.java", 786 "1975-hello-structural-transformation/src/art/Test1975.java", 787 "1975-hello-structural-transformation/src/art/Transform1975.java", 788 "1976-hello-structural-static-methods/src/art/Test1976.java", 789 "1976-hello-structural-static-methods/src/art/Transform1976.java", 790 "1977-hello-structural-obsolescence/src/art/Test1977.java", 791 "1978-regular-obsolete-then-structural-obsolescence/src/art/Test1978.java", 792 "1979-threaded-structural-transformation/src/art/Test1979.java", 793 "1981-structural-redef-private-method-handles/src/art/Test1981.java", 794 // TODO Requires VarHandles to be un-@hide. See b/64382372 795 // "1981-structural-redef-private-method-handles/src/art/Test1981_Varhandles.java", 796 "1982-no-virtuals-structural-redefinition/src/art/Test1982.java", 797 "1983-structural-redefinition-failures/src/art/Test1983.java", 798 "1984-structural-redefine-field-trace/src/art/Test1984.java", 799 "1988-multi-structural-redefine/src/art/Test1988.java", 800 "1989-transform-bad-monitor/src/art/Test1989.java", 801 "1990-structural-bad-verify/src/art/Test1990.java", 802 "1991-hello-structural-retransform/src/art/Test1991.java", 803 "1992-retransform-no-such-field/src/art/Test1992.java", 804 "1994-final-virtual-structural/src/art/Test1994.java", 805 "1995-final-virtual-structural-multithread/src/art/Test1995.java", 806 "1996-final-override-virtual-structural/src/art/Test1996.java", 807 "1997-structural-shadow-method/src/art/Test1997.java", 808 "1998-structural-shadow-field/src/art/Test1998.java", 809 "1999-virtual-structural/src/art/Test1999.java", 810 "2001-virtual-structural-multithread/src-art/art/Test2001.java", 811 "2002-virtual-structural-initializing/src-art/art/Test2002.java", 812 "2003-double-virtual-structural/src/art/Test2003.java", 813 "2004-double-virtual-structural-abstract/src/art/Test2004.java", 814 "2005-pause-all-redefine-multithreaded/src/art/Test2005.java", 815 "2006-virtual-structural-finalizing/src-art/art/Test2006.java", 816 "2007-virtual-structural-finalizable/src-art/art/Test2007.java", 817 ], 818} 819 820// CTS test runner in cts/hostsidetests/jvmti looks for an expected test 821// result for the test NN in the file results.NN.expected.txt while in the 822// source tree each expected test result is in the NN-xxxx/expected.txt. 823// Copy+rename them them to a temporary directory and them zip them. 824java_genrule { 825 name: "expected_cts_outputs_gen", 826 srcs: [ 827 "901-hello-ti-agent/expected.txt", 828 "902-hello-transformation/expected.txt", 829 "903-hello-tagging/expected.txt", 830 "904-object-allocation/expected.txt", 831 "905-object-free/expected.txt", 832 "906-iterate-heap/expected.txt", 833 "907-get-loaded-classes/expected.txt", 834 "908-gc-start-finish/expected.txt", 835 "910-methods/expected.txt", 836 "911-get-stack-trace/expected-cts-version.txt", 837 "912-classes/expected.txt", 838 "913-heaps/expected.txt", 839 "914-hello-obsolescence/expected.txt", 840 "915-obsolete-2/expected.txt", 841 "917-fields-transformation/expected.txt", 842 "918-fields/expected.txt", 843 "919-obsolete-fields/expected.txt", 844 "920-objects/expected.txt", 845 "922-properties/expected.txt", 846 "923-monitors/expected.txt", 847 "924-threads/expected.txt", 848 "925-threadgroups/expected.txt", 849 "926-multi-obsolescence/expected.txt", 850 "927-timers/expected.txt", 851 "928-jni-table/expected.txt", 852 "930-hello-retransform/expected.txt", 853 "931-agent-thread/expected.txt", 854 "932-transform-saves/expected.txt", 855 "933-misc-events/expected.txt", 856 "940-recursive-obsolete/expected.txt", 857 "942-private-recursive/expected.txt", 858 "944-transform-classloaders/expected.txt", 859 "945-obsolete-native/expected.txt", 860 "947-reflect-method/expected.txt", 861 "951-threaded-obsolete/expected.txt", 862 "982-ok-no-retransform/expected.txt", 863 "983-source-transform-verify/expected.txt", 864 "984-obsolete-invoke/expected.txt", 865 "985-re-obsolete/expected.txt", 866 "986-native-method-bind/expected.txt", 867 "988-method-trace/expected.txt", 868 "989-method-trace-throw/expected.txt", 869 "990-field-trace/expected.txt", 870 "991-field-trace-2/expected.txt", 871 "992-source-data/expected.txt", 872 "993-breakpoints/expected.txt", 873 "994-breakpoint-line/expected.txt", 874 "995-breakpoints-throw/expected.txt", 875 "996-breakpoint-obsolete/expected.txt", 876 "997-single-step/expected.txt", 877 "1900-track-alloc/expected.txt", 878 "1901-get-bytecodes/expected.txt", 879 "1902-suspend/expected.txt", 880 "1903-suspend-self/expected.txt", 881 "1904-double-suspend/expected.txt", 882 "1906-suspend-list-me-first/expected.txt", 883 "1907-suspend-list-self-twice/expected.txt", 884 "1908-suspend-native-resume-self/expected.txt", 885 "1909-per-agent-tls/expected.txt", 886 "1910-transform-with-default/expected.txt", 887 "1911-get-local-var-table/expected.txt", 888 "1912-get-set-local-primitive/expected.txt", 889 "1913-get-set-local-objects/expected.txt", 890 "1914-get-local-instance/expected.txt", 891 "1915-get-set-local-current-thread/expected.txt", 892 "1916-get-set-current-frame/expected.txt", 893 "1917-get-stack-frame/expected.txt", 894 "1920-suspend-native-monitor/expected.txt", 895 "1921-suspend-native-recursive-monitor/expected.txt", 896 "1922-owned-monitors-info/expected.txt", 897 "1923-frame-pop/expected.txt", 898 "1924-frame-pop-toggle/expected.txt", 899 "1925-self-frame-pop/expected.txt", 900 "1926-missed-frame-pop/expected.txt", 901 "1927-exception-event/expected.txt", 902 "1928-exception-event-exception/expected.txt", 903 "1930-monitor-info/expected.txt", 904 "1931-monitor-events/expected.txt", 905 "1932-monitor-events-misc/expected.txt", 906 "1933-monitor-current-contended/expected.txt", 907 "1934-jvmti-signal-thread/expected.txt", 908 "1936-thread-end-events/expected.txt", 909 "1937-transform-soft-fail/expected.txt", 910 "1939-proxy-frames/expected.txt", 911 "1941-dispose-stress/expected.txt", 912 "1942-suspend-raw-monitor-exit/expected.txt", 913 "1943-suspend-raw-monitor-wait/expected.txt", 914 "1953-pop-frame/expected.txt", 915 "1958-transform-try-jit/expected.txt", 916 "1962-multi-thread-events/expected.txt", 917 "1963-add-to-dex-classloader-in-memory/expected.txt", 918 "1967-get-set-local-bad-slot/expected.txt", 919 "1968-force-early-return/expected.txt", 920 "1969-force-early-return-void/expected.txt", 921 "1970-force-early-return-long/expected.txt", 922 "1971-multi-force-early-return/expected.txt", 923 "1974-resize-array/expected.txt", 924 "1975-hello-structural-transformation/expected.txt", 925 "1976-hello-structural-static-methods/expected.txt", 926 "1977-hello-structural-obsolescence/expected.txt", 927 "1978-regular-obsolete-then-structural-obsolescence/expected.txt", 928 "1979-threaded-structural-transformation/expected.txt", 929 // TODO Requires VarHandles to be un-@hide. See b/64382372 930 // "test/1981-structural-redef-private-method-handles/expected.txt", 931 "1981-structural-redef-private-method-handles/expected_no_mh.txt", 932 "1982-no-virtuals-structural-redefinition/expected.txt", 933 // JNI-id use can change the outcome of this test on device. 934 "1983-structural-redefinition-failures/expected-cts.txt", 935 "1984-structural-redefine-field-trace/expected.txt", 936 "1988-multi-structural-redefine/expected.txt", 937 "1989-transform-bad-monitor/expected.txt", 938 "1990-structural-bad-verify/expected.txt", 939 "1991-hello-structural-retransform/expected.txt", 940 "1992-retransform-no-such-field/expected.txt", 941 "1994-final-virtual-structural/expected.txt", 942 "1995-final-virtual-structural-multithread/expected.txt", 943 "1996-final-override-virtual-structural/expected.txt", 944 "1997-structural-shadow-method/expected.txt", 945 "1998-structural-shadow-field/expected.txt", 946 "1999-virtual-structural/expected.txt", 947 "2001-virtual-structural-multithread/expected.txt", 948 "2002-virtual-structural-initializing/expected.txt", 949 "2003-double-virtual-structural/expected.txt", 950 "2004-double-virtual-structural-abstract/expected.txt", 951 "2005-pause-all-redefine-multithreaded/expected.txt", 952 "2006-virtual-structural-finalizing/expected.txt", 953 "2007-virtual-structural-finalizable/expected.txt", 954 ], 955 out: ["expected_cts_outputs.jar"], 956 tools: ["soong_zip"], 957 cmd: "rm -rf $(genDir)/res && mkdir -p $(genDir)/res && " + 958 "for f in $(in); do x=$${f#art/test/}; " + 959 "cp $$f $(genDir)/res/results.$${x%%-*}.expected.txt; done && " + 960 "$(location soong_zip) -o $(out) -C $(genDir)/res -D $(genDir)/res", 961} 962 963// Wrap the expected_cts_outputs_gen inside a java library to make it easy 964// to export as a member of a module_exports. 965java_library { 966 name: "expected_cts_outputs", 967 visibility: [ 968 "//art/build/sdk", 969 "//cts/hostsidetests/jvmti:__subpackages__", 970 ], 971 static_libs: [ 972 "expected_cts_outputs_gen", 973 ], 974 sdk_version: "core_current", 975} 976 977art_cc_test { 978 name: "ArtGtestsTarget", 979 data: [ 980 // We need the ART testing apex, which contains all gtest binaries. 981 // Note that due to linker constraints the gtests must be in the apex. 982 ":com.android.art.testing", 983 ":art-gtest-jars", 984 ], 985 test_suites: ["device-tests"], 986 test_config: "gtests-target.xml", 987} 988 989filegroup { 990 name: "art-gtest-jars", 991 srcs: [ 992 ":art-gtest-jars-AbstractMethod", 993 ":art-gtest-jars-AllFields", 994 ":art-gtest-jars-DefaultMethods", 995 ":art-gtest-jars-DexToDexDecompiler", 996 ":art-gtest-jars-ErroneousA", 997 ":art-gtest-jars-ErroneousB", 998 ":art-gtest-jars-ErroneousInit", 999 ":art-gtest-jars-Extension1", 1000 ":art-gtest-jars-Extension2", 1001 ":art-gtest-jars-ForClassLoaderA", 1002 ":art-gtest-jars-ForClassLoaderB", 1003 ":art-gtest-jars-ForClassLoaderC", 1004 ":art-gtest-jars-ForClassLoaderD", 1005 ":art-gtest-jars-ExceptionHandle", 1006 ":art-gtest-jars-GetMethodSignature", 1007 ":art-gtest-jars-HiddenApi", 1008 ":art-gtest-jars-HiddenApiSignatures", 1009 ":art-gtest-jars-HiddenApiStubs", 1010 ":art-gtest-jars-ImageLayoutA", 1011 ":art-gtest-jars-ImageLayoutB", 1012 ":art-gtest-jars-IMTA", 1013 ":art-gtest-jars-IMTB", 1014 ":art-gtest-jars-Instrumentation", 1015 ":art-gtest-jars-Interfaces", 1016 ":art-gtest-jars-Lookup", 1017 ":art-gtest-jars-Main", 1018 ":art-gtest-jars-ManyMethods", 1019 ":art-gtest-jars-MethodTypes", 1020 ":art-gtest-jars-MultiDex", 1021 ":art-gtest-jars-MultiDexModifiedSecondary", 1022 ":art-gtest-jars-MyClass", 1023 ":art-gtest-jars-MyClassNatives", 1024 ":art-gtest-jars-Nested", 1025 ":art-gtest-jars-NonStaticLeafMethods", 1026 ":art-gtest-jars-Packages", 1027 ":art-gtest-jars-ProtoCompare", 1028 ":art-gtest-jars-ProtoCompare2", 1029 ":art-gtest-jars-ProfileTestMultiDex", 1030 ":art-gtest-jars-StaticLeafMethods", 1031 ":art-gtest-jars-Statics", 1032 ":art-gtest-jars-StaticsFromCode", 1033 ":art-gtest-jars-StringLiterals", 1034 ":art-gtest-jars-Transaction", 1035 ":art-gtest-jars-XandY", 1036 ":art-gtest-jars-MainEmptyUncompressed", 1037 ":art-gtest-jars-MainEmptyUncompressedAligned", 1038 ":art-gtest-jars-MainStripped", 1039 ":art-gtest-jars-MainUncompressedAligned", 1040 ":art-gtest-jars-MultiDexUncompressedAligned", 1041 ":art-gtest-jars-VerifierDeps", 1042 ":art-gtest-jars-VerifierDepsMulti", 1043 ":art-gtest-jars-VerifySoftFailDuringClinit", 1044 ], 1045} 1046 1047java_defaults { 1048 name: "art-gtest-jars-defaults", 1049 installable: true, 1050 dex_preopt: { 1051 enabled: false, 1052 }, 1053 sdk_version: "core_platform", 1054 uncompress_dex: false, 1055} 1056 1057// The following modules are just trivial compilations (non-trivial cases are the end). 1058 1059java_library { 1060 name: "art-gtest-jars-AbstractMethod", 1061 srcs: ["AbstractMethod/**/*.java"], 1062 defaults: ["art-gtest-jars-defaults"], 1063} 1064 1065java_library { 1066 name: "art-gtest-jars-AllFields", 1067 srcs: ["AllFields/**/*.java"], 1068 defaults: ["art-gtest-jars-defaults"], 1069} 1070 1071java_library { 1072 name: "art-gtest-jars-DefaultMethods", 1073 srcs: ["DefaultMethods/**/*.java"], 1074 defaults: ["art-gtest-jars-defaults"], 1075} 1076 1077java_library { 1078 name: "art-gtest-jars-DexToDexDecompiler", 1079 srcs: ["DexToDexDecompiler/**/*.java"], 1080 defaults: ["art-gtest-jars-defaults"], 1081} 1082 1083java_library { 1084 name: "art-gtest-jars-ErroneousA", 1085 srcs: ["ErroneousA/**/*.java"], 1086 defaults: ["art-gtest-jars-defaults"], 1087} 1088 1089java_library { 1090 name: "art-gtest-jars-ErroneousB", 1091 srcs: ["ErroneousB/**/*.java"], 1092 defaults: ["art-gtest-jars-defaults"], 1093} 1094 1095java_library { 1096 name: "art-gtest-jars-ErroneousInit", 1097 srcs: ["ErroneousInit/**/*.java"], 1098 defaults: ["art-gtest-jars-defaults"], 1099} 1100 1101java_library { 1102 name: "art-gtest-jars-Extension1", 1103 srcs: ["Extension1/**/*.java"], 1104 defaults: ["art-gtest-jars-defaults"], 1105} 1106 1107java_library { 1108 name: "art-gtest-jars-Extension2", 1109 srcs: ["Extension2/**/*.java"], 1110 defaults: ["art-gtest-jars-defaults"], 1111} 1112 1113java_library { 1114 name: "art-gtest-jars-ForClassLoaderA", 1115 srcs: ["ForClassLoaderA/**/*.java"], 1116 defaults: ["art-gtest-jars-defaults"], 1117} 1118 1119java_library { 1120 name: "art-gtest-jars-ForClassLoaderB", 1121 srcs: ["ForClassLoaderB/**/*.java"], 1122 defaults: ["art-gtest-jars-defaults"], 1123} 1124 1125java_library { 1126 name: "art-gtest-jars-ForClassLoaderC", 1127 srcs: ["ForClassLoaderC/**/*.java"], 1128 defaults: ["art-gtest-jars-defaults"], 1129} 1130 1131java_library { 1132 name: "art-gtest-jars-ForClassLoaderD", 1133 srcs: ["ForClassLoaderD/**/*.java"], 1134 defaults: ["art-gtest-jars-defaults"], 1135} 1136 1137java_library { 1138 name: "art-gtest-jars-ExceptionHandle", 1139 srcs: ["ExceptionHandle/**/*.java"], 1140 defaults: ["art-gtest-jars-defaults"], 1141} 1142 1143java_library { 1144 name: "art-gtest-jars-GetMethodSignature", 1145 srcs: ["GetMethodSignature/**/*.java"], 1146 defaults: ["art-gtest-jars-defaults"], 1147} 1148 1149java_library { 1150 name: "art-gtest-jars-HiddenApi", 1151 srcs: ["HiddenApi/**/*.java"], 1152 defaults: ["art-gtest-jars-defaults"], 1153} 1154 1155java_library { 1156 name: "art-gtest-jars-HiddenApiSignatures", 1157 srcs: ["HiddenApiSignatures/**/*.java"], 1158 defaults: ["art-gtest-jars-defaults"], 1159} 1160 1161java_library { 1162 name: "art-gtest-jars-HiddenApiStubs", 1163 srcs: ["HiddenApiStubs/**/*.java"], 1164 defaults: ["art-gtest-jars-defaults"], 1165} 1166 1167java_library { 1168 name: "art-gtest-jars-ImageLayoutA", 1169 srcs: ["ImageLayoutA/**/*.java"], 1170 defaults: ["art-gtest-jars-defaults"], 1171} 1172 1173java_library { 1174 name: "art-gtest-jars-ImageLayoutB", 1175 srcs: ["ImageLayoutB/**/*.java"], 1176 defaults: ["art-gtest-jars-defaults"], 1177} 1178 1179java_library { 1180 name: "art-gtest-jars-IMTA", 1181 srcs: ["IMTA/**/*.java"], 1182 defaults: ["art-gtest-jars-defaults"], 1183} 1184 1185java_library { 1186 name: "art-gtest-jars-IMTB", 1187 srcs: ["IMTB/**/*.java"], 1188 defaults: ["art-gtest-jars-defaults"], 1189} 1190 1191java_library { 1192 name: "art-gtest-jars-Instrumentation", 1193 srcs: ["Instrumentation/**/*.java"], 1194 defaults: ["art-gtest-jars-defaults"], 1195} 1196 1197java_library { 1198 name: "art-gtest-jars-Interfaces", 1199 srcs: ["Interfaces/**/*.java"], 1200 defaults: ["art-gtest-jars-defaults"], 1201} 1202 1203java_library { 1204 name: "art-gtest-jars-Lookup", 1205 srcs: ["Lookup/**/*.java"], 1206 defaults: ["art-gtest-jars-defaults"], 1207} 1208 1209java_library { 1210 name: "art-gtest-jars-Main", 1211 srcs: ["Main/**/*.java"], 1212 defaults: ["art-gtest-jars-defaults"], 1213} 1214 1215java_library { 1216 name: "art-gtest-jars-ManyMethods", 1217 srcs: ["ManyMethods/**/*.java"], 1218 defaults: ["art-gtest-jars-defaults"], 1219} 1220 1221java_library { 1222 name: "art-gtest-jars-MethodTypes", 1223 srcs: ["MethodTypes/**/*.java"], 1224 defaults: ["art-gtest-jars-defaults"], 1225} 1226 1227java_library { 1228 name: "art-gtest-jars-MyClass", 1229 srcs: ["MyClass/**/*.java"], 1230 defaults: ["art-gtest-jars-defaults"], 1231} 1232 1233java_library { 1234 name: "art-gtest-jars-MyClassNatives", 1235 srcs: ["MyClassNatives/**/*.java"], 1236 defaults: ["art-gtest-jars-defaults"], 1237} 1238 1239java_library { 1240 name: "art-gtest-jars-Nested", 1241 srcs: ["Nested/**/*.java"], 1242 defaults: ["art-gtest-jars-defaults"], 1243} 1244 1245java_library { 1246 name: "art-gtest-jars-NonStaticLeafMethods", 1247 srcs: ["NonStaticLeafMethods/**/*.java"], 1248 defaults: ["art-gtest-jars-defaults"], 1249} 1250 1251java_library { 1252 name: "art-gtest-jars-Packages", 1253 srcs: ["Packages/**/*.java"], 1254 defaults: ["art-gtest-jars-defaults"], 1255} 1256 1257java_library { 1258 name: "art-gtest-jars-ProtoCompare", 1259 srcs: ["ProtoCompare/**/*.java"], 1260 defaults: ["art-gtest-jars-defaults"], 1261} 1262 1263java_library { 1264 name: "art-gtest-jars-ProtoCompare2", 1265 srcs: ["ProtoCompare2/**/*.java"], 1266 defaults: ["art-gtest-jars-defaults"], 1267} 1268 1269java_library { 1270 name: "art-gtest-jars-StaticLeafMethods", 1271 srcs: ["StaticLeafMethods/**/*.java"], 1272 defaults: ["art-gtest-jars-defaults"], 1273} 1274 1275java_library { 1276 name: "art-gtest-jars-Statics", 1277 srcs: ["Statics/**/*.java"], 1278 defaults: ["art-gtest-jars-defaults"], 1279} 1280 1281java_library { 1282 name: "art-gtest-jars-StaticsFromCode", 1283 srcs: ["StaticsFromCode/**/*.java"], 1284 defaults: ["art-gtest-jars-defaults"], 1285} 1286 1287java_library { 1288 name: "art-gtest-jars-StringLiterals", 1289 srcs: ["StringLiterals/**/*.java"], 1290 defaults: ["art-gtest-jars-defaults"], 1291} 1292 1293java_library { 1294 name: "art-gtest-jars-Transaction", 1295 srcs: ["Transaction/**/*.java"], 1296 defaults: ["art-gtest-jars-defaults"], 1297} 1298 1299java_library { 1300 name: "art-gtest-jars-XandY", 1301 srcs: ["XandY/**/*.java"], 1302 defaults: ["art-gtest-jars-defaults"], 1303} 1304 1305// The following cases are non-trivial. 1306 1307// Uncompress classes.dex files in the jar file. 1308genrule_defaults { 1309 name: "art-gtest-jars-uncompress-defaults", 1310 cmd: "$(location zip2zip) -i $(in) -o $(out) -0 'classes*.dex'", 1311 tools: ["zip2zip"], 1312} 1313 1314// Ensure the files are at least 4 byte aligned. 1315genrule_defaults { 1316 name: "art-gtest-jars-align-defaults", 1317 cmd: "$(location zipalign) 4 $(in) $(out)", 1318 tools: ["zipalign"], 1319} 1320 1321// Assemble jar file from smali source. 1322genrule_defaults { 1323 name: "art-gtest-jars-smali-defaults", 1324 cmd: "$(location smali) assemble --output $(out) $(in)", 1325 tools: ["smali"], 1326} 1327 1328// A copy of Main with the classes.dex stripped for the oat file assistant tests. 1329genrule { 1330 name: "art-gtest-jars-MainStripped", 1331 srcs: [":art-gtest-jars-Main"], 1332 cmd: "$(location zip2zip) -i $(in) -o $(out) -x 'classes*.dex'", 1333 out: ["art-gtest-jars-MainStripped.jar"], 1334 tools: ["zip2zip"], 1335} 1336 1337// An empty.dex that is empty and uncompressed for the dex2oat tests. 1338genrule { 1339 name: "art-gtest-jars-MainEmptyUncompressed", 1340 srcs: ["Main/empty.dex"], 1341 cmd: "$(location soong_zip) -j -L 0 -o $(out) -f $(in)", 1342 out: ["art-gtest-jars-MainEmptyUncompressed.jar"], 1343 tools: ["soong_zip"], 1344} 1345 1346// An empty.dex that is empty and uncompressed and aligned for the dex2oat tests. 1347genrule { 1348 name: "art-gtest-jars-MainEmptyUncompressedAligned", 1349 defaults: ["art-gtest-jars-align-defaults"], 1350 srcs: [":art-gtest-jars-MainEmptyUncompressed"], 1351 out: ["art-gtest-jars-MainEmptyUncompressedAligned.jar"], 1352} 1353 1354// A copy of Main with the classes.dex uncompressed for the dex2oat tests. 1355genrule { 1356 name: "art-gtest-jars-MainUncompressed", 1357 defaults: ["art-gtest-jars-uncompress-defaults"], 1358 srcs: [":art-gtest-jars-Main"], 1359 out: ["art-gtest-jars-MainUncompressed.jar"], 1360} 1361 1362// A copy of Main with the classes.dex uncompressed and aligned for the dex2oat tests. 1363genrule { 1364 name: "art-gtest-jars-MainUncompressedAligned", 1365 defaults: ["art-gtest-jars-align-defaults"], 1366 srcs: [":art-gtest-jars-MainUncompressed"], 1367 out: ["art-gtest-jars-MainUncompressedAligned.jar"], 1368} 1369 1370java_library { 1371 name: "art-gtest-jars-MultiDex", 1372 srcs: ["MultiDex/**/*.java"], 1373 defaults: ["art-gtest-jars-defaults"], 1374 min_sdk_version: "19", 1375 dxflags: [ 1376 "--main-dex-list", 1377 "art/test/MultiDex/main.list", 1378 ], 1379} 1380 1381// A copy of MultiDex with the classes.dex uncompressed for the OatFile tests. 1382genrule { 1383 name: "art-gtest-jars-MultiDexUncompressed", 1384 defaults: ["art-gtest-jars-uncompress-defaults"], 1385 srcs: [":art-gtest-jars-MultiDex"], 1386 out: ["art-gtest-jars-MultiDexUncompressed.jar"], 1387} 1388 1389// A copy of MultiDex with the classes.dex uncompressed and aligned for the OatFile tests. 1390genrule { 1391 name: "art-gtest-jars-MultiDexUncompressedAligned", 1392 defaults: ["art-gtest-jars-align-defaults"], 1393 srcs: [":art-gtest-jars-MultiDexUncompressed"], 1394 out: ["art-gtest-jars-MultiDexUncompressedAligned.jar"], 1395} 1396 1397java_library { 1398 name: "art-gtest-jars-MultiDexModifiedSecondary", 1399 srcs: ["MultiDexModifiedSecondary/**/*.java"], 1400 defaults: ["art-gtest-jars-defaults"], 1401 min_sdk_version: "19", 1402 dxflags: [ 1403 "--main-dex-list", 1404 "art/test/MultiDexModifiedSecondary/main.list", 1405 ], 1406} 1407 1408java_library { 1409 name: "art-gtest-jars-ProfileTestMultiDex", 1410 srcs: ["ProfileTestMultiDex/**/*.java"], 1411 defaults: ["art-gtest-jars-defaults"], 1412 min_sdk_version: "19", 1413 dxflags: [ 1414 "--main-dex-list", 1415 "art/test/ProfileTestMultiDex/main.list", 1416 ], 1417} 1418 1419// Smali compiled files. 1420// Since they are not compiled by javac, we use different extension for them. 1421// The .jar extension for them would cause subtle failures in the test infra, 1422// which finds and opens all jar files and expects them to be valid zip files. 1423 1424genrule { 1425 name: "art-gtest-jars-VerifierDeps", 1426 defaults: ["art-gtest-jars-smali-defaults"], 1427 srcs: ["VerifierDeps/**/*.smali"], 1428 out: ["art-gtest-jars-VerifierDeps.dex"], 1429} 1430 1431genrule { 1432 name: "art-gtest-jars-VerifierDepsMulti", 1433 defaults: ["art-gtest-jars-smali-defaults"], 1434 srcs: ["VerifierDepsMulti/**/*.smali"], 1435 out: ["art-gtest-jars-VerifierDepsMulti.dex"], 1436} 1437 1438genrule { 1439 name: "art-gtest-jars-VerifySoftFailDuringClinit", 1440 defaults: ["art-gtest-jars-smali-defaults"], 1441 srcs: ["VerifySoftFailDuringClinit/**/*.smali"], 1442 out: ["art-gtest-jars-VerifySoftFailDuringClinit.dex"], 1443} 1444 1445genrule { 1446 name: "art-gtest-jars-LinkageTest", 1447 defaults: ["art-gtest-jars-smali-defaults"], 1448 srcs: ["LinkageTest/*.smali"], 1449 out: ["art-gtest-jars-LinkageTest.dex"], 1450} 1451