summaryrefslogtreecommitdiff
path: root/rust/testing.go
diff options
context:
space:
mode:
Diffstat (limited to 'rust/testing.go')
-rw-r--r--rust/testing.go26
1 files changed, 25 insertions, 1 deletions
diff --git a/rust/testing.go b/rust/testing.go
index 430b40bfd..80e414871 100644
--- a/rust/testing.go
+++ b/rust/testing.go
@@ -44,7 +44,28 @@ func GatherRequiredDepsForTest() string {
},
host_supported: true,
}
-
+ rust_prebuilt_library {
+ name: "libstd_x86_64-apple-darwin",
+ crate_name: "std",
+ rlib: {
+ srcs: ["libstd.rlib"],
+ },
+ dylib: {
+ srcs: ["libstd.so"],
+ },
+ host_supported: true,
+ }
+ rust_prebuilt_library {
+ name: "libtest_x86_64-apple-darwin",
+ crate_name: "test",
+ rlib: {
+ srcs: ["libtest.rlib"],
+ },
+ dylib: {
+ srcs: ["libtest.so"],
+ },
+ host_supported: true,
+ }
//////////////////////////////
// Device module requirements
@@ -77,10 +98,13 @@ func GatherRequiredDepsForTest() string {
func CreateTestContext() *android.TestContext {
ctx := android.NewTestArchContext()
+ android.RegisterPrebuiltMutators(ctx)
+ ctx.PreArchMutators(android.RegisterDefaultsPreArchMutators)
cc.RegisterRequiredBuildComponentsForTest(ctx)
ctx.RegisterModuleType("genrule", genrule.GenRuleFactory)
ctx.RegisterModuleType("rust_binary", RustBinaryFactory)
ctx.RegisterModuleType("rust_binary_host", RustBinaryHostFactory)
+ ctx.RegisterModuleType("rust_bindgen", RustBindgenFactory)
ctx.RegisterModuleType("rust_test", RustTestFactory)
ctx.RegisterModuleType("rust_test_host", RustTestHostFactory)
ctx.RegisterModuleType("rust_library", RustLibraryFactory)