Loading android/androidmk_test.go +4 −4 Original line number Diff line number Diff line Loading @@ -80,10 +80,10 @@ func TestAndroidMkSingleton_PassesUpdatedAndroidMkDataToCustomCallback(t *testin config := TestConfig(buildDir, nil, bp, nil) config.inMake = true // Enable androidmk Singleton ctx := NewTestContext() ctx := NewTestContext(config) ctx.RegisterSingletonType("androidmk", AndroidMkSingleton) ctx.RegisterModuleType("custom", customModuleFactory) ctx.Register(config) ctx.Register() _, errs := ctx.ParseFileList(".", []string{"Android.bp"}) FailIfErrored(t, errs) Loading Loading @@ -252,10 +252,10 @@ func TestGetDistForGoals(t *testing.T) { config := TestConfig(buildDir, nil, testCase.bp, nil) config.inMake = true // Enable androidmk Singleton ctx := NewTestContext() ctx := NewTestContext(config) ctx.RegisterSingletonType("androidmk", AndroidMkSingleton) ctx.RegisterModuleType("custom", customModuleFactory) ctx.Register(config) ctx.Register() _, errs := ctx.ParseFileList(".", []string{"Android.bp"}) FailIfErrored(t, errs) Loading android/arch_test.go +4 −4 Original line number Diff line number Diff line Loading @@ -353,9 +353,9 @@ func TestArchMutator(t *testing.T) { t.Run(tt.name, func(t *testing.T) { config := TestArchConfig(buildDir, nil, bp, nil) ctx := NewTestArchContext() ctx := NewTestArchContext(config) ctx.RegisterModuleType("module", archTestModuleFactory) ctx.Register(config) ctx.Register() if tt.config != nil { tt.config(config) } Loading Loading @@ -442,9 +442,9 @@ func TestArchMutatorNativeBridge(t *testing.T) { t.Run(tt.name, func(t *testing.T) { config := TestArchConfigNativeBridge(buildDir, nil, bp, nil) ctx := NewTestArchContext() ctx := NewTestArchContext(config) ctx.RegisterModuleType("module", archTestModuleFactory) ctx.Register(config) ctx.Register() if tt.config != nil { tt.config(config) } Loading android/csuite_config_test.go +2 −2 Original line number Diff line number Diff line Loading @@ -21,9 +21,9 @@ import ( func testCSuiteConfig(test *testing.T, bpFileContents string) *TestContext { config := TestArchConfig(buildDir, nil, bpFileContents, nil) ctx := NewTestArchContext() ctx := NewTestArchContext(config) ctx.RegisterModuleType("csuite_config", CSuiteConfigFactory) ctx.Register(config) ctx.Register() _, errs := ctx.ParseFileList(".", []string{"Android.bp"}) FailIfErrored(test, errs) _, errs = ctx.PrepareBuildActions(config) Loading android/defaults_test.go +4 −4 Original line number Diff line number Diff line Loading @@ -80,14 +80,14 @@ func TestDefaults(t *testing.T) { config := TestConfig(buildDir, nil, bp, nil) ctx := NewTestContext() ctx := NewTestContext(config) ctx.RegisterModuleType("test", defaultsTestModuleFactory) ctx.RegisterModuleType("defaults", defaultsTestDefaultsFactory) ctx.PreArchMutators(RegisterDefaultsPreArchMutators) ctx.Register(config) ctx.Register() _, errs := ctx.ParseFileList(".", []string{"Android.bp"}) FailIfErrored(t, errs) Loading Loading @@ -125,7 +125,7 @@ func TestDefaultsAllowMissingDependencies(t *testing.T) { config := TestConfig(buildDir, nil, bp, nil) config.TestProductVariables.Allow_missing_dependencies = proptools.BoolPtr(true) ctx := NewTestContext() ctx := NewTestContext(config) ctx.SetAllowMissingDependencies(true) ctx.RegisterModuleType("test", defaultsTestModuleFactory) Loading @@ -133,7 +133,7 @@ func TestDefaultsAllowMissingDependencies(t *testing.T) { ctx.PreArchMutators(RegisterDefaultsPreArchMutators) ctx.Register(config) ctx.Register() _, errs := ctx.ParseFileList(".", []string{"Android.bp"}) FailIfErrored(t, errs) Loading android/module_test.go +3 −4 Original line number Diff line number Diff line Loading @@ -164,9 +164,6 @@ func depsModuleFactory() Module { } func TestErrorDependsOnDisabledModule(t *testing.T) { ctx := NewTestContext() ctx.RegisterModuleType("deps", depsModuleFactory) bp := ` deps { name: "foo", Loading @@ -180,7 +177,9 @@ func TestErrorDependsOnDisabledModule(t *testing.T) { config := TestConfig(buildDir, nil, bp, nil) ctx.Register(config) ctx := NewTestContext(config) ctx.RegisterModuleType("deps", depsModuleFactory) ctx.Register() _, errs := ctx.ParseFileList(".", []string{"Android.bp"}) FailIfErrored(t, errs) Loading Loading
android/androidmk_test.go +4 −4 Original line number Diff line number Diff line Loading @@ -80,10 +80,10 @@ func TestAndroidMkSingleton_PassesUpdatedAndroidMkDataToCustomCallback(t *testin config := TestConfig(buildDir, nil, bp, nil) config.inMake = true // Enable androidmk Singleton ctx := NewTestContext() ctx := NewTestContext(config) ctx.RegisterSingletonType("androidmk", AndroidMkSingleton) ctx.RegisterModuleType("custom", customModuleFactory) ctx.Register(config) ctx.Register() _, errs := ctx.ParseFileList(".", []string{"Android.bp"}) FailIfErrored(t, errs) Loading Loading @@ -252,10 +252,10 @@ func TestGetDistForGoals(t *testing.T) { config := TestConfig(buildDir, nil, testCase.bp, nil) config.inMake = true // Enable androidmk Singleton ctx := NewTestContext() ctx := NewTestContext(config) ctx.RegisterSingletonType("androidmk", AndroidMkSingleton) ctx.RegisterModuleType("custom", customModuleFactory) ctx.Register(config) ctx.Register() _, errs := ctx.ParseFileList(".", []string{"Android.bp"}) FailIfErrored(t, errs) Loading
android/arch_test.go +4 −4 Original line number Diff line number Diff line Loading @@ -353,9 +353,9 @@ func TestArchMutator(t *testing.T) { t.Run(tt.name, func(t *testing.T) { config := TestArchConfig(buildDir, nil, bp, nil) ctx := NewTestArchContext() ctx := NewTestArchContext(config) ctx.RegisterModuleType("module", archTestModuleFactory) ctx.Register(config) ctx.Register() if tt.config != nil { tt.config(config) } Loading Loading @@ -442,9 +442,9 @@ func TestArchMutatorNativeBridge(t *testing.T) { t.Run(tt.name, func(t *testing.T) { config := TestArchConfigNativeBridge(buildDir, nil, bp, nil) ctx := NewTestArchContext() ctx := NewTestArchContext(config) ctx.RegisterModuleType("module", archTestModuleFactory) ctx.Register(config) ctx.Register() if tt.config != nil { tt.config(config) } Loading
android/csuite_config_test.go +2 −2 Original line number Diff line number Diff line Loading @@ -21,9 +21,9 @@ import ( func testCSuiteConfig(test *testing.T, bpFileContents string) *TestContext { config := TestArchConfig(buildDir, nil, bpFileContents, nil) ctx := NewTestArchContext() ctx := NewTestArchContext(config) ctx.RegisterModuleType("csuite_config", CSuiteConfigFactory) ctx.Register(config) ctx.Register() _, errs := ctx.ParseFileList(".", []string{"Android.bp"}) FailIfErrored(test, errs) _, errs = ctx.PrepareBuildActions(config) Loading
android/defaults_test.go +4 −4 Original line number Diff line number Diff line Loading @@ -80,14 +80,14 @@ func TestDefaults(t *testing.T) { config := TestConfig(buildDir, nil, bp, nil) ctx := NewTestContext() ctx := NewTestContext(config) ctx.RegisterModuleType("test", defaultsTestModuleFactory) ctx.RegisterModuleType("defaults", defaultsTestDefaultsFactory) ctx.PreArchMutators(RegisterDefaultsPreArchMutators) ctx.Register(config) ctx.Register() _, errs := ctx.ParseFileList(".", []string{"Android.bp"}) FailIfErrored(t, errs) Loading Loading @@ -125,7 +125,7 @@ func TestDefaultsAllowMissingDependencies(t *testing.T) { config := TestConfig(buildDir, nil, bp, nil) config.TestProductVariables.Allow_missing_dependencies = proptools.BoolPtr(true) ctx := NewTestContext() ctx := NewTestContext(config) ctx.SetAllowMissingDependencies(true) ctx.RegisterModuleType("test", defaultsTestModuleFactory) Loading @@ -133,7 +133,7 @@ func TestDefaultsAllowMissingDependencies(t *testing.T) { ctx.PreArchMutators(RegisterDefaultsPreArchMutators) ctx.Register(config) ctx.Register() _, errs := ctx.ParseFileList(".", []string{"Android.bp"}) FailIfErrored(t, errs) Loading
android/module_test.go +3 −4 Original line number Diff line number Diff line Loading @@ -164,9 +164,6 @@ func depsModuleFactory() Module { } func TestErrorDependsOnDisabledModule(t *testing.T) { ctx := NewTestContext() ctx.RegisterModuleType("deps", depsModuleFactory) bp := ` deps { name: "foo", Loading @@ -180,7 +177,9 @@ func TestErrorDependsOnDisabledModule(t *testing.T) { config := TestConfig(buildDir, nil, bp, nil) ctx.Register(config) ctx := NewTestContext(config) ctx.RegisterModuleType("deps", depsModuleFactory) ctx.Register() _, errs := ctx.ParseFileList(".", []string{"Android.bp"}) FailIfErrored(t, errs) Loading