Remove emptyFixtureFactory from apex and java
Bug: 183235980 Test: m nothing Change-Id: I350b45e2f57430fb158f4141a566e75de17208cd
This commit is contained in:
@@ -117,8 +117,6 @@ var withUnbundledBuild = android.FixtureModifyProductVariables(
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
var emptyFixtureFactory = android.NewFixtureFactory(&buildDir)
|
|
||||||
|
|
||||||
var apexFixtureFactory = android.NewFixtureFactory(
|
var apexFixtureFactory = android.NewFixtureFactory(
|
||||||
&buildDir,
|
&buildDir,
|
||||||
// General preparers in alphabetical order as test infrastructure will enforce correct
|
// General preparers in alphabetical order as test infrastructure will enforce correct
|
||||||
@@ -1188,7 +1186,7 @@ var prepareForTestOfRuntimeApexWithHwasan = android.GroupFixturePreparers(
|
|||||||
)
|
)
|
||||||
|
|
||||||
func TestRuntimeApexShouldInstallHwasanIfLibcDependsOnIt(t *testing.T) {
|
func TestRuntimeApexShouldInstallHwasanIfLibcDependsOnIt(t *testing.T) {
|
||||||
result := emptyFixtureFactory.Extend(prepareForTestOfRuntimeApexWithHwasan).RunTestWithBp(t, `
|
result := android.GroupFixturePreparers(prepareForTestOfRuntimeApexWithHwasan).RunTestWithBp(t, `
|
||||||
cc_library {
|
cc_library {
|
||||||
name: "libc",
|
name: "libc",
|
||||||
no_libcrt: true,
|
no_libcrt: true,
|
||||||
@@ -1234,7 +1232,7 @@ func TestRuntimeApexShouldInstallHwasanIfLibcDependsOnIt(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestRuntimeApexShouldInstallHwasanIfHwaddressSanitized(t *testing.T) {
|
func TestRuntimeApexShouldInstallHwasanIfHwaddressSanitized(t *testing.T) {
|
||||||
result := emptyFixtureFactory.Extend(
|
result := android.GroupFixturePreparers(
|
||||||
prepareForTestOfRuntimeApexWithHwasan,
|
prepareForTestOfRuntimeApexWithHwasan,
|
||||||
android.FixtureModifyProductVariables(func(variables android.FixtureProductVariables) {
|
android.FixtureModifyProductVariables(func(variables android.FixtureProductVariables) {
|
||||||
variables.SanitizeDevice = []string{"hwaddress"}
|
variables.SanitizeDevice = []string{"hwaddress"}
|
||||||
|
@@ -48,10 +48,24 @@ func tearDown() {
|
|||||||
os.RemoveAll(buildDir)
|
os.RemoveAll(buildDir)
|
||||||
}
|
}
|
||||||
|
|
||||||
var emptyFixtureFactory = android.NewFixtureFactory(&buildDir)
|
// Legacy factory to use to create fixtures for tests in this package.
|
||||||
|
//
|
||||||
|
// deprecated: See prepareForJavaTest
|
||||||
|
var javaFixtureFactory = android.NewFixtureFactory(
|
||||||
|
&buildDir,
|
||||||
|
prepareForJavaTest,
|
||||||
|
)
|
||||||
|
|
||||||
// Factory to use to create fixtures for tests in this package.
|
// Legacy preparer used for running tests within the java package.
|
||||||
var javaFixtureFactory = emptyFixtureFactory.Extend(
|
//
|
||||||
|
// This includes everything that was needed to run any test in the java package prior to the
|
||||||
|
// introduction of the test fixtures. Tests that are being converted to use fixtures directly
|
||||||
|
// rather than through the testJava...() methods should avoid using this and instead use the
|
||||||
|
// various preparers directly, using android.GroupFixturePreparers(...) to group them when
|
||||||
|
// necessary.
|
||||||
|
//
|
||||||
|
// deprecated
|
||||||
|
var prepareForJavaTest = android.GroupFixturePreparers(
|
||||||
genrule.PrepareForTestWithGenRuleBuildComponents,
|
genrule.PrepareForTestWithGenRuleBuildComponents,
|
||||||
// Get the CC build components but not default modules.
|
// Get the CC build components but not default modules.
|
||||||
cc.PrepareForTestWithCcBuildComponents,
|
cc.PrepareForTestWithCcBuildComponents,
|
||||||
|
@@ -21,7 +21,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func TestPlatformCompatConfig(t *testing.T) {
|
func TestPlatformCompatConfig(t *testing.T) {
|
||||||
result := emptyFixtureFactory.RunTest(t,
|
result := android.GroupFixturePreparers(
|
||||||
PrepareForTestWithPlatformCompatConfig,
|
PrepareForTestWithPlatformCompatConfig,
|
||||||
android.FixtureWithRootAndroidBp(`
|
android.FixtureWithRootAndroidBp(`
|
||||||
platform_compat_config {
|
platform_compat_config {
|
||||||
@@ -34,7 +34,7 @@ func TestPlatformCompatConfig(t *testing.T) {
|
|||||||
name: "myconfig3",
|
name: "myconfig3",
|
||||||
}
|
}
|
||||||
`),
|
`),
|
||||||
)
|
).RunTest(t)
|
||||||
|
|
||||||
checkMergedCompatConfigInputs(t, result, "myconfig",
|
checkMergedCompatConfigInputs(t, result, "myconfig",
|
||||||
"out/soong/.intermediates/myconfig1/myconfig1_meta.xml",
|
"out/soong/.intermediates/myconfig1/myconfig1_meta.xml",
|
||||||
|
Reference in New Issue
Block a user