Introduce an "external" variant of libarttest(d).so and use it to fix
and re-enable 817-hiddenapi.
817-hiddenapi and some other run tests have been disabled on target
since https://r.android.com/1689792. A problem has been that (at least
some of) those tests depended on libarttest(d).so being in
java.library.path, so that the .so could be e.g. found and copied from
there by the test.
That's not possible to get to work with libarttest(d).so, since we have
to "register" it with NATIVELOADER_DEFAULT_NAMESPACE_LIBS before
dalvikvm starts.
Instead introduce a new test library libarttest(d)_external.so that
takes the place libarttest(d) had before https://r.android.com/1689792.
I.e. it gets installed in /data/nativetest(64)/art/<arch>, which is
present on java.library.path. It will be loaded in the test's
classloader namespace rather than com_android_art, so it cannot access
ART internals. However, it can access symbols in libarttest(d).so, so
it's possible to export an (unstable) API there that the "external"
library can call across the linker namespace boundary.
Use this approach to fix 817-hiddenapi, and re-enable it again.
Note: Since libarttest(d)_external doesn't have direct access to ART
internal it ought not need to be split into -d and non-d variants. The
only reason that's still the case is that its variants need to depend
on the corresponding variants of libarttest(d).
Test: art/test/testrunner/testrunner.py --target --64 817
in armv8 target chroot
Test: art/test/testrunner/testrunner.py --host 817
Bug: 186654484
Change-Id: I13c186e8d086d07c2480e96a1c1f85651dac7d84
11 files changed