Introduce a Testing Runtime APEX (test) module including ART gtests.
Define a new flavor of the Runtime APEX, having the same contents
as the Debug Runtime APEX plus ART gtests that have dependencies
on Runtime APEX internal libraries.
Previously, when these ART gtests were built and installed in
the data partition, they would depend on "legacy" ART internal
libraries being installed in the system partition (not the ones
from the Runtime APEX). As we plan to remove these ART libraries
from the system partition, we needed a way to be able to build
and install device ART gtests without triggering the installation
of these legacy ART internal libraries.
This Testing Runtime APEX is meant to be used for ART testing only,
and should never be included in any product.
This change adds build rules for the Testing Runtime APEX (and
corresponding unit tests), but does not replace the Debug Runtime APEX
for device testing yet (this will be implemented in a follow-up
change).
Also rename `art_apex_test` module type as `art_apex_test_host`.
Test: m com.android.runtime.testing
Test: art/build/apex/runtests.sh
Test: art/build/apex/art_apex_test.py
Bug: 129534335
Change-Id: I8d70bdcf7c6253dd5bc8786a702f130d444c3cb6
diff --git a/build/art.go b/build/art.go
index 14ba7d5..e6157b4 100644
--- a/build/art.go
+++ b/build/art.go
@@ -318,10 +318,10 @@
// changes this to 'prefer32' on all host binaries. Since HOST_PREFER_32_BIT is
// only used for testing we can just disable the module.
// See b/120617876 for more information.
- android.RegisterModuleType("art_apex_test", artTestApexBundleFactory)
+ android.RegisterModuleType("art_apex_test_host", artHostTestApexBundleFactory)
}
-func artTestApexBundleFactory() android.Module {
+func artHostTestApexBundleFactory() android.Module {
module := apex.ApexBundleFactory( /*testApex*/ true)
android.AddLoadHook(module, func(ctx android.LoadHookContext) {
if envTrue(ctx, "HOST_PREFER_32_BIT") {