From 5a34ffb350fb295780e5c373fd1c78430fa4e3ed Mon Sep 17 00:00:00 2001 From: Chris Parsons Date: Wed, 21 Jul 2021 14:34:58 -0400 Subject: Remove bp2build deps mutator Refactor bp2build to retrieve modules directly by name, instead of via DirectDeps. This functions properly as bp2build has no need for variant information of the blueprint graph. Test: USE_BAZEL_ANALYSIS=1 m fmtlib Change-Id: Ief4b67bc56f24929871af772f3a742f07085bf8c --- android/testing.go | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'android/testing.go') diff --git a/android/testing.go b/android/testing.go index 17a812ea1..6ba8e3cde 100644 --- a/android/testing.go +++ b/android/testing.go @@ -171,9 +171,9 @@ func NewTestArchContext(config Config) *TestContext { type TestContext struct { *Context - preArch, preDeps, postDeps, finalDeps []RegisterMutatorFunc - bp2buildPreArch, bp2buildDeps, bp2buildMutators []RegisterMutatorFunc - NameResolver *NameResolver + preArch, preDeps, postDeps, finalDeps []RegisterMutatorFunc + bp2buildPreArch, bp2buildMutators []RegisterMutatorFunc + NameResolver *NameResolver // The list of pre-singletons and singletons registered for the test. preSingletons, singletons sortableComponents @@ -224,12 +224,6 @@ func (ctx *TestContext) PreArchBp2BuildMutators(f RegisterMutatorFunc) { ctx.bp2buildPreArch = append(ctx.bp2buildPreArch, f) } -// DepsBp2BuildMutators adds mutators to be register for converting Android Blueprint modules into -// Bazel BUILD targets that should run prior to conversion to resolve dependencies. -func (ctx *TestContext) DepsBp2BuildMutators(f RegisterMutatorFunc) { - ctx.bp2buildDeps = append(ctx.bp2buildDeps, f) -} - // registeredComponentOrder defines the order in which a sortableComponent type is registered at // runtime and provides support for reordering the components registered for a test in the same // way. @@ -464,7 +458,7 @@ func (ctx *TestContext) Register() { // RegisterForBazelConversion prepares a test context for bp2build conversion. func (ctx *TestContext) RegisterForBazelConversion() { - RegisterMutatorsForBazelConversion(ctx.Context, ctx.bp2buildPreArch, ctx.bp2buildDeps, ctx.bp2buildMutators) + RegisterMutatorsForBazelConversion(ctx.Context, ctx.bp2buildPreArch, ctx.bp2buildMutators) } func (ctx *TestContext) ParseFileList(rootDir string, filePaths []string) (deps []string, errs []error) { -- cgit v1.2.3-59-g8ed1b