summaryrefslogtreecommitdiff
path: root/rust/testing.go
diff options
context:
space:
mode:
Diffstat (limited to 'rust/testing.go')
-rw-r--r--rust/testing.go53
1 files changed, 32 insertions, 21 deletions
diff --git a/rust/testing.go b/rust/testing.go
index a33d948db..6ee49a971 100644
--- a/rust/testing.go
+++ b/rust/testing.go
@@ -43,26 +43,34 @@ var PrepareForTestWithRustDefaultModules = android.GroupFixturePreparers(
// Preparer that will allow use of all rust modules fully.
var PrepareForIntegrationTestWithRust = android.GroupFixturePreparers(
PrepareForTestWithRustDefaultModules,
-)
-
-var PrepareForTestWithRustIncludeVndk = android.GroupFixturePreparers(
- PrepareForIntegrationTestWithRust,
- cc.PrepareForTestWithCcIncludeVndk,
+ cc.PrepareForIntegrationTestWithCc,
)
func GatherRequiredDepsForTest() string {
bp := `
rust_prebuilt_library {
- name: "libstd",
- crate_name: "std",
- rlib: {
- srcs: ["libstd.rlib"],
- },
- dylib: {
- srcs: ["libstd.so"],
- },
- host_supported: true,
- sysroot: true,
+ name: "libstd",
+ crate_name: "std",
+ rlib: {
+ srcs: ["libstd/libstd.rlib"],
+ },
+ dylib: {
+ srcs: ["libstd/libstd.so"],
+ },
+ host_supported: true,
+ sysroot: true,
+ }
+ rust_prebuilt_library {
+ name: "libcore.sysroot",
+ crate_name: "core",
+ rlib: {
+ srcs: ["libcore/libcore.rlib"],
+ },
+ dylib: {
+ srcs: ["libcore/libcore.so"],
+ },
+ host_supported: true,
+ sysroot: true,
}
//////////////////////////////
// Device module requirements
@@ -75,6 +83,7 @@ func GatherRequiredDepsForTest() string {
apex_available: ["//apex_available:platform", "//apex_available:anyapex"],
min_sdk_version: "29",
vendor_available: true,
+ host_supported: true,
recovery_available: true,
llndk: {
symbol_file: "liblog.map.txt",
@@ -127,7 +136,7 @@ func GatherRequiredDepsForTest() string {
min_sdk_version: "29",
}
rust_library {
- name: "libprotobuf_deprecated",
+ name: "libprotobuf",
crate_name: "protobuf",
srcs: ["foo.rs"],
host_supported: true,
@@ -176,12 +185,15 @@ func registerRequiredBuildComponentsForTest(ctx android.RegistrationContext) {
ctx.RegisterModuleType("rust_library_host_dylib", RustLibraryDylibHostFactory)
ctx.RegisterModuleType("rust_library_host_rlib", RustLibraryRlibHostFactory)
ctx.RegisterModuleType("rust_fuzz", RustFuzzFactory)
+ ctx.RegisterModuleType("rust_fuzz_host", RustFuzzHostFactory)
ctx.RegisterModuleType("rust_ffi", RustFFIFactory)
ctx.RegisterModuleType("rust_ffi_shared", RustFFISharedFactory)
- ctx.RegisterModuleType("rust_ffi_static", RustFFIStaticFactory)
+ ctx.RegisterModuleType("rust_ffi_rlib", RustFFIRlibFactory)
+ ctx.RegisterModuleType("rust_ffi_static", RustFFIRlibFactory)
ctx.RegisterModuleType("rust_ffi_host", RustFFIHostFactory)
ctx.RegisterModuleType("rust_ffi_host_shared", RustFFISharedHostFactory)
- ctx.RegisterModuleType("rust_ffi_host_static", RustFFIStaticHostFactory)
+ ctx.RegisterModuleType("rust_ffi_host_rlib", RustFFIRlibHostFactory)
+ ctx.RegisterModuleType("rust_ffi_host_static", RustFFIRlibHostFactory)
ctx.RegisterModuleType("rust_proc_macro", ProcMacroFactory)
ctx.RegisterModuleType("rust_protobuf", RustProtobufFactory)
ctx.RegisterModuleType("rust_protobuf_host", RustProtobufHostFactory)
@@ -194,10 +206,9 @@ func registerRequiredBuildComponentsForTest(ctx android.RegistrationContext) {
ctx.BottomUp("rust_stdlinkage", LibstdMutator).Parallel()
ctx.BottomUp("rust_begin", BeginMutator).Parallel()
})
- ctx.RegisterSingletonType("rust_project_generator", rustProjectGeneratorSingleton)
- ctx.RegisterSingletonType("kythe_rust_extract", kytheExtractRustFactory)
+ ctx.RegisterParallelSingletonType("rust_project_generator", rustProjectGeneratorSingleton)
+ ctx.RegisterParallelSingletonType("kythe_rust_extract", kytheExtractRustFactory)
ctx.PostDepsMutators(func(ctx android.RegisterMutatorsContext) {
ctx.BottomUp("rust_sanitizers", rustSanitizerRuntimeMutator).Parallel()
})
- registerRustSnapshotModules(ctx)
}