Avoid dynamic lib dependencies on internal ART libraries in the
libartpalette and dex2oat CTS gtests.

We cannot use art_standalone_gtest_defaults. dex2oat_cts_test.cc rips
out the necessary bits from common_art_test.cc instead, with as few
changes as possible.

With this change we can reenable art_standalone_dex2oat_cts_tests
again (cf. b/288212464#comment5).

Merged-In set to a CL in main to avoid merging there - gtests are
already linked statically there.

Test: m art_standalone_libartpalette_tests \
        art_standalone_dex2oat_cts_tests
  Do `readelf -d` on the test binaries to check that only stable ABI
  libraries are in the NEEDED list.
Test: cts-tradefed run commandAndExit cts \
        -m art_standalone_dex2oat_cts_tests
  on a tm-release image.
Test: cts-tradefed run commandAndExit cts \
        -m art_standalone_libartpalette_tests
  on a tm-release image.
Bug: 306064090
Bug: 288212464
Change-Id: I1ff4174490ff50dbd2177cf5999fc6ef4bfbaa49
Merged-In: I75a844f53663385ef98351f60d3adb900157f5e5
Merged-In: I4a8d1eddaacf9e476f7d3d783edec0223cb39c04
5 files changed