diff options
Diffstat (limited to 'rust/testing.go')
-rw-r--r-- | rust/testing.go | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/rust/testing.go b/rust/testing.go index 5be71c90e..75adcfce9 100644 --- a/rust/testing.go +++ b/rust/testing.go @@ -17,13 +17,12 @@ package rust import ( "android/soong/android" "android/soong/cc" - "android/soong/genrule" ) // Preparer that will define all cc module types and a limited set of mutators and singletons that // make those module types usable. var PrepareForTestWithRustBuildComponents = android.GroupFixturePreparers( - android.FixtureRegisterWithContext(RegisterRequiredBuildComponentsForTest), + android.FixtureRegisterWithContext(registerRequiredBuildComponentsForTest), ) // The directory in which rust test default modules will be defined. @@ -197,7 +196,7 @@ func GatherRequiredDepsForTest() string { return bp } -func RegisterRequiredBuildComponentsForTest(ctx android.RegistrationContext) { +func registerRequiredBuildComponentsForTest(ctx android.RegistrationContext) { ctx.RegisterModuleType("rust_binary", RustBinaryFactory) ctx.RegisterModuleType("rust_binary_host", RustBinaryHostFactory) ctx.RegisterModuleType("rust_bindgen", RustBindgenFactory) @@ -231,14 +230,3 @@ func RegisterRequiredBuildComponentsForTest(ctx android.RegistrationContext) { }) ctx.RegisterSingletonType("rust_project_generator", rustProjectGeneratorSingleton) } - -func CreateTestContext(config android.Config) *android.TestContext { - ctx := android.NewTestArchContext(config) - android.RegisterPrebuiltMutators(ctx) - ctx.PreArchMutators(android.RegisterDefaultsPreArchMutators) - genrule.RegisterGenruleBuildComponents(ctx) - cc.RegisterRequiredBuildComponentsForTest(ctx) - RegisterRequiredBuildComponentsForTest(ctx) - - return ctx -} |