Merge "Merge SingletonProviderContext with OtherModuleProviderContext" into main
This commit is contained in:
@@ -851,7 +851,7 @@ func TestStaticLibDepReordering(t *testing.T) {
|
||||
|
||||
variant := "android_arm64_armv8-a_static"
|
||||
moduleA := ctx.ModuleForTests("a", variant).Module().(*Module)
|
||||
staticLibInfo, _ := android.SingletonModuleProvider(ctx, moduleA, StaticLibraryInfoProvider)
|
||||
staticLibInfo, _ := android.OtherModuleProvider(ctx, moduleA, StaticLibraryInfoProvider)
|
||||
actual := android.Paths(staticLibInfo.TransitiveStaticLibrariesForOrdering.ToList()).RelativeToTop()
|
||||
expected := GetOutputPaths(ctx, variant, []string{"a", "c", "b", "d"})
|
||||
|
||||
@@ -887,7 +887,7 @@ func TestStaticLibDepReorderingWithShared(t *testing.T) {
|
||||
|
||||
variant := "android_arm64_armv8-a_static"
|
||||
moduleA := ctx.ModuleForTests("a", variant).Module().(*Module)
|
||||
staticLibInfo, _ := android.SingletonModuleProvider(ctx, moduleA, StaticLibraryInfoProvider)
|
||||
staticLibInfo, _ := android.OtherModuleProvider(ctx, moduleA, StaticLibraryInfoProvider)
|
||||
actual := android.Paths(staticLibInfo.TransitiveStaticLibrariesForOrdering.ToList()).RelativeToTop()
|
||||
expected := GetOutputPaths(ctx, variant, []string{"a", "c", "b"})
|
||||
|
||||
@@ -999,7 +999,7 @@ func TestLlndkLibrary(t *testing.T) {
|
||||
checkExportedIncludeDirs := func(module, variant string, expectedSystemDirs []string, expectedDirs ...string) {
|
||||
t.Helper()
|
||||
m := result.ModuleForTests(module, variant).Module()
|
||||
f, _ := android.SingletonModuleProvider(result, m, FlagExporterInfoProvider)
|
||||
f, _ := android.OtherModuleProvider(result, m, FlagExporterInfoProvider)
|
||||
android.AssertPathsRelativeToTopEquals(t, "exported include dirs for "+module+"["+variant+"]",
|
||||
expectedDirs, f.IncludeDirs)
|
||||
android.AssertPathsRelativeToTopEquals(t, "exported include dirs for "+module+"["+variant+"]",
|
||||
@@ -1027,7 +1027,7 @@ func TestLlndkLibrary(t *testing.T) {
|
||||
}
|
||||
}
|
||||
vendorModule := result.ModuleForTests(module, vendorVariant).Module()
|
||||
vendorInfo, _ := android.SingletonModuleProvider(result, vendorModule, FlagExporterInfoProvider)
|
||||
vendorInfo, _ := android.OtherModuleProvider(result, vendorModule, FlagExporterInfoProvider)
|
||||
vendorDirs := android.Concat(vendorInfo.IncludeDirs, vendorInfo.SystemIncludeDirs)
|
||||
android.AssertStringEquals(t, module+" has different exported include dirs for vendor variant and ABI check",
|
||||
android.JoinPathsWithPrefix(vendorDirs, "-I"), abiCheckFlags)
|
||||
@@ -2452,7 +2452,7 @@ func TestIncludeDirsExporting(t *testing.T) {
|
||||
|
||||
checkIncludeDirs := func(t *testing.T, ctx *android.TestContext, module android.Module, checkers ...exportedChecker) {
|
||||
t.Helper()
|
||||
exported, _ := android.SingletonModuleProvider(ctx, module, FlagExporterInfoProvider)
|
||||
exported, _ := android.OtherModuleProvider(ctx, module, FlagExporterInfoProvider)
|
||||
name := module.Name()
|
||||
|
||||
for _, checker := range checkers {
|
||||
|
||||
@@ -47,7 +47,7 @@ var prepareForTsanTest = android.FixtureAddFile("tsan/Android.bp", []byte(`
|
||||
`))
|
||||
|
||||
type providerInterface interface {
|
||||
android.SingletonModuleProviderContext
|
||||
android.OtherModuleProviderContext
|
||||
}
|
||||
|
||||
// expectSharedLinkDep verifies that the from module links against the to module as a
|
||||
@@ -55,7 +55,7 @@ type providerInterface interface {
|
||||
func expectSharedLinkDep(t *testing.T, ctx providerInterface, from, to android.TestingModule) {
|
||||
t.Helper()
|
||||
fromLink := from.Description("link")
|
||||
toInfo, _ := android.SingletonModuleProvider(ctx, to.Module(), SharedLibraryInfoProvider)
|
||||
toInfo, _ := android.OtherModuleProvider(ctx, to.Module(), SharedLibraryInfoProvider)
|
||||
|
||||
if g, w := fromLink.OrderOnly.Strings(), toInfo.SharedLibrary.RelativeToTop().String(); !android.InList(w, g) {
|
||||
t.Errorf("%s should link against %s, expected %q, got %q",
|
||||
@@ -68,7 +68,7 @@ func expectSharedLinkDep(t *testing.T, ctx providerInterface, from, to android.T
|
||||
func expectNoSharedLinkDep(t *testing.T, ctx providerInterface, from, to android.TestingModule) {
|
||||
t.Helper()
|
||||
fromLink := from.Description("link")
|
||||
toInfo, _ := android.SingletonModuleProvider(ctx, to.Module(), SharedLibraryInfoProvider)
|
||||
toInfo, _ := android.OtherModuleProvider(ctx, to.Module(), SharedLibraryInfoProvider)
|
||||
|
||||
if g, w := fromLink.OrderOnly.Strings(), toInfo.SharedLibrary.RelativeToTop().String(); android.InList(w, g) {
|
||||
t.Errorf("%s should not link against %s, expected %q, got %q",
|
||||
@@ -81,7 +81,7 @@ func expectNoSharedLinkDep(t *testing.T, ctx providerInterface, from, to android
|
||||
func expectStaticLinkDep(t *testing.T, ctx providerInterface, from, to android.TestingModule) {
|
||||
t.Helper()
|
||||
fromLink := from.Description("link")
|
||||
toInfo, _ := android.SingletonModuleProvider(ctx, to.Module(), StaticLibraryInfoProvider)
|
||||
toInfo, _ := android.OtherModuleProvider(ctx, to.Module(), StaticLibraryInfoProvider)
|
||||
|
||||
if g, w := fromLink.Implicits.Strings(), toInfo.StaticLibrary.RelativeToTop().String(); !android.InList(w, g) {
|
||||
t.Errorf("%s should link against %s, expected %q, got %q",
|
||||
@@ -95,7 +95,7 @@ func expectStaticLinkDep(t *testing.T, ctx providerInterface, from, to android.T
|
||||
func expectNoStaticLinkDep(t *testing.T, ctx providerInterface, from, to android.TestingModule) {
|
||||
t.Helper()
|
||||
fromLink := from.Description("link")
|
||||
toInfo, _ := android.SingletonModuleProvider(ctx, to.Module(), StaticLibraryInfoProvider)
|
||||
toInfo, _ := android.OtherModuleProvider(ctx, to.Module(), StaticLibraryInfoProvider)
|
||||
|
||||
if g, w := fromLink.Implicits.Strings(), toInfo.StaticLibrary.RelativeToTop().String(); android.InList(w, g) {
|
||||
t.Errorf("%s should not link against %s, expected %q, got %q",
|
||||
|
||||
Reference in New Issue
Block a user