Convert art runtests to Android.bp
Build the art runtest libraries with Android.bp. The host test
libraries move from out/host/linux-x86/lib[64] to
out/host/linux-x86/nativetest[64], and the device test libraires from
/data/artest/${TARGET_ARCH} to /data/nativetest[64]/art/${TARGET_ARCH},
which requires adding nativetest to the library search path, and fixing
some tests to support multiple entries in library search paths.
Test: m -j test-art-host
Test: m -j test-art-target
Change-Id: I2118a3292f22f275954ddd7cdd4e12287fe47808
diff --git a/build/art.go b/build/art.go
index f2efbfe..f5547cc 100644
--- a/build/art.go
+++ b/build/art.go
@@ -204,6 +204,7 @@
soong.RegisterModuleType("art_cc_library", artLibrary)
soong.RegisterModuleType("art_cc_binary", artBinary)
soong.RegisterModuleType("art_cc_test", artTest)
+ soong.RegisterModuleType("art_cc_test_library", artTestLibrary)
soong.RegisterModuleType("art_cc_defaults", artDefaultsFactory)
soong.RegisterModuleType("art_global_defaults", artGlobalDefaultsFactory)
}
@@ -253,6 +254,17 @@
return module, props
}
+func artTestLibrary() (blueprint.Module, []interface{}) {
+ test := cc.NewTestLibrary(android.HostAndDeviceSupported)
+ module, props := test.Init()
+
+ props = installCodegenCustomizer(module, props, false)
+
+ android.AddLoadHook(module, prefer32Bit)
+ android.AddInstallHook(module, testInstall)
+ return module, props
+}
+
func envDefault(ctx android.BaseContext, key string, defaultValue string) string {
ret := ctx.AConfig().Getenv(key)
if ret == "" {