Remove usages of FixtureFactory from misc packages

These packages have already been migrated to use per test build
directory so have no need for a FixtureFactory.

Bug: 183235980
Test: m nothing
Change-Id: I667d1d992caaf0f615de91f89efdae11c44986c2
This commit is contained in:
Paul Duffin
2021-03-20 00:36:55 +00:00
parent 30ac3e7ca7
commit 89648f98fa
9 changed files with 47 additions and 56 deletions

View File

@@ -13,8 +13,7 @@ func TestMain(m *testing.M) {
os.Exit(m.Run())
}
var shFixtureFactory = android.NewFixtureFactory(
nil,
var prepareForShTest = android.GroupFixturePreparers(
cc.PrepareForTestWithCcBuildComponents,
PrepareForTestWithShBuildComponents,
android.FixtureMergeMockFs(android.MockFS{
@@ -24,19 +23,19 @@ var shFixtureFactory = android.NewFixtureFactory(
}),
)
// testShBinary runs tests using the shFixtureFactory
// testShBinary runs tests using the prepareForShTest
//
// Do not add any new usages of this, instead use the shFixtureFactory directly as it makes it much
// Do not add any new usages of this, instead use the prepareForShTest directly as it makes it much
// easier to customize the test behavior.
//
// If it is necessary to customize the behavior of an existing test that uses this then please first
// convert the test to using shFixtureFactory first and then in a following change add the
// convert the test to using prepareForShTest first and then in a following change add the
// appropriate fixture preparers. Keeping the conversion change separate makes it easy to verify
// that it did not change the test behavior unexpectedly.
//
// deprecated
func testShBinary(t *testing.T, bp string) (*android.TestContext, android.Config) {
result := shFixtureFactory.RunTestWithBp(t, bp)
result := prepareForShTest.RunTestWithBp(t, bp)
return result.TestContext, result.Config
}