Don't set LD_LIBRARY_PATH to the ART module for any tests.

It makes us mix together the linker namespaces for system and the ART
module, which is only safe to do if we can guarantee that both are
built at the same time.

In many cases it's not necessary after gtests got statically linked in
https://r.android.com/2623410.

Fix remaining dynamically linked tests:

- Remove unnecessary libartbase dependency from
  art_standalone_libdexfile_external_tests and
  art_standalone_libdexfile_support_tests.

- Link internal libs statically into art_standalone_artd_tests,
  art_standalone_libartservice_tests, art_standalone_libarttools_tests,
  and art_standalone_odrefresh_tests.

This carries over part of (and extends) https://r.android.com/2886226,
which wasn't merged into main.

Test: Apply https://r.android.com/2966686
      Build a platform image and boot a device with it.
      Revert https://r.android.com/2966686
      banchan com.android.art
      m dist
      adb install out/dist/com.android.art.apex
      adb reboot
      atest art_standalone_artd_tests art_standalone_cmdline_tests \
        art_standalone_compiler_tests art_standalone_dex2oat_cts_tests \
        art_standalone_dex2oat_tests art_standalone_dexdump_tests \
        art_standalone_dexlist_tests \
        art_standalone_dexopt_chroot_setup_tests \
        art_standalone_dexoptanalyzer_tests \
        art_standalone_dexpreopt_tests \
        art_standalone_disassembler_tests \
        art_standalone_libartbase_tests \
        art_standalone_libartpalette_tests \
        art_standalone_libartservice_tests \
        art_standalone_libarttools_tests \
        art_standalone_libdexfile_external_tests \
        art_standalone_libdexfile_support_tests \
        art_standalone_libdexfile_tests \
        art_standalone_libprofile_tests art_standalone_oatdump_tests \
        art_standalone_odrefresh_tests art_standalone_profman_tests \
        art_standalone_runtime_tests art_standalone_sigchain_tests \
        art_libdexfile_external_tests art_libdexfile_support_tests
Test: find out/target/product/vsoc_x86_64/testcases/ -executable \
        -type f | xargs readelf -d | egrep -B10 \
'libandroidio.so|libart-dexlayout.so|libart-disassembler.so|libart.so|libartbase.so|libartpalette.so|libartservice.so|libarttools.so|libdt_fd_forward.so|libdt_socket.so|libjavacore.so|libjdwp.so|libnativebridge.so|libopenjdk.so|libopenjdkjvm.so|libopenjdkjvmti.so|libperfetto_hprof.so|libprofile.so|libsigchain.so'
      check that there are no matches in the standalone tests
Test: atest art_artd_tests art_libartservice_tests \
        art_libarttools_tests art_odrefresh_tests
      no new test failures
Bug: 247108425

Change-Id: I291c49a730c187630bf81b1b055ad0a7776150ec
19 files changed