Store order of the components used by the tests

Previously, the TestContext.Register() method stored all the components
that were available, rather than just the ones that were used by the
tests. That was practically useless for debugging. This change just
stores the ones used by the test.

Bug: 181953909
Test: m nothing
Change-Id: I8589b9b4423133709ab0cfd763bd284a7f47a24a
This commit is contained in:
Paul Duffin
2021-03-08 23:42:10 +00:00
parent 062d9338d1
commit f5de6684fd

View File

@@ -378,9 +378,9 @@ func (ctx *TestContext) Register() {
ctx.singletons.registerAll(ctx.Context)
// Save the sorted components order away to make them easy to access while debugging.
ctx.preSingletonOrder = globalOrder.preSingletonOrder.namesInOrder
ctx.mutatorOrder = globalOrder.mutatorOrder.namesInOrder
ctx.singletonOrder = globalOrder.singletonOrder.namesInOrder
ctx.preSingletonOrder = componentsToNames(preSingletons)
ctx.mutatorOrder = componentsToNames(mutators)
ctx.singletonOrder = componentsToNames(singletons)
}
// RegisterForBazelConversion prepares a test context for bp2build conversion.