Rename generate proto config file to match classpath type.
There is no need to leak soong module names. Bug: 180105615 Test: m && launch_cvd; atest CtsClasspathsTestCases Change-Id: I04f4e181d2f42b9d71641980a2c7c4e8cbc8e426 Merged-In: I04f4e181d2f42b9d71641980a2c7c4e8cbc8e426
This commit is contained in:
parent
b40610ad00
commit
53d0678b57
|
@ -279,7 +279,7 @@ func TestBootclasspathFragmentInArtApex(t *testing.T) {
|
||||||
).RunTest(t)
|
).RunTest(t)
|
||||||
|
|
||||||
ensureExactContents(t, result.TestContext, "com.android.art", "android_common_com.android.art_image", []string{
|
ensureExactContents(t, result.TestContext, "com.android.art", "android_common_com.android.art_image", []string{
|
||||||
"etc/classpaths/mybootclasspathfragment.pb",
|
"etc/classpaths/bootclasspath.pb",
|
||||||
"javalib/arm/boot.art",
|
"javalib/arm/boot.art",
|
||||||
"javalib/arm/boot.oat",
|
"javalib/arm/boot.oat",
|
||||||
"javalib/arm/boot.vdex",
|
"javalib/arm/boot.vdex",
|
||||||
|
@ -491,7 +491,7 @@ func TestBootclasspathFragmentContentsNoName(t *testing.T) {
|
||||||
ensureExactContents(t, result.TestContext, "myapex", "android_common_myapex_image", []string{
|
ensureExactContents(t, result.TestContext, "myapex", "android_common_myapex_image", []string{
|
||||||
// This does not include art, oat or vdex files as they are only included for the art boot
|
// This does not include art, oat or vdex files as they are only included for the art boot
|
||||||
// image.
|
// image.
|
||||||
"etc/classpaths/mybootclasspathfragment.pb",
|
"etc/classpaths/bootclasspath.pb",
|
||||||
"javalib/bar.jar",
|
"javalib/bar.jar",
|
||||||
"javalib/foo.jar",
|
"javalib/foo.jar",
|
||||||
})
|
})
|
||||||
|
|
|
@ -67,7 +67,7 @@ func TestSystemserverclasspathFragmentContents(t *testing.T) {
|
||||||
`)
|
`)
|
||||||
|
|
||||||
ensureExactContents(t, result.TestContext, "myapex", "android_common_myapex_image", []string{
|
ensureExactContents(t, result.TestContext, "myapex", "android_common_myapex_image", []string{
|
||||||
"etc/classpaths/mysystemserverclasspathfragment.pb",
|
"etc/classpaths/systemserverclasspath.pb",
|
||||||
"javalib/foo.jar",
|
"javalib/foo.jar",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,7 @@ func configuredJarListToClasspathJars(ctx android.ModuleContext, configuredJars
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *ClasspathFragmentBase) generateClasspathProtoBuildActions(ctx android.ModuleContext, jars []classpathJar) {
|
func (c *ClasspathFragmentBase) generateClasspathProtoBuildActions(ctx android.ModuleContext, jars []classpathJar) {
|
||||||
outputFilename := ctx.ModuleName() + ".pb"
|
outputFilename := strings.ToLower(c.classpathType.String()) + ".pb"
|
||||||
c.outputFilepath = android.PathForModuleOut(ctx, outputFilename).OutputPath
|
c.outputFilepath = android.PathForModuleOut(ctx, outputFilename).OutputPath
|
||||||
c.installDirPath = android.PathForModuleInstall(ctx, "etc", "classpaths")
|
c.installDirPath = android.PathForModuleInstall(ctx, "etc", "classpaths")
|
||||||
|
|
||||||
|
|
|
@ -287,7 +287,7 @@ func TestPlatformBootclasspath_ClasspathFragmentPaths(t *testing.T) {
|
||||||
).RunTest(t)
|
).RunTest(t)
|
||||||
|
|
||||||
p := result.Module("platform-bootclasspath", "android_common").(*platformBootclasspathModule)
|
p := result.Module("platform-bootclasspath", "android_common").(*platformBootclasspathModule)
|
||||||
android.AssertStringEquals(t, "output filepath", p.Name()+".pb", p.ClasspathFragmentBase.outputFilepath.Base())
|
android.AssertStringEquals(t, "output filepath", "bootclasspath.pb", p.ClasspathFragmentBase.outputFilepath.Base())
|
||||||
android.AssertPathRelativeToTopEquals(t, "install filepath", "out/soong/target/product/test_device/system/etc/classpaths", p.ClasspathFragmentBase.installDirPath)
|
android.AssertPathRelativeToTopEquals(t, "install filepath", "out/soong/target/product/test_device/system/etc/classpaths", p.ClasspathFragmentBase.installDirPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -327,7 +327,7 @@ func TestPlatformBootclasspathModule_AndroidMkEntries(t *testing.T) {
|
||||||
want := map[string][]string{
|
want := map[string][]string{
|
||||||
"LOCAL_MODULE": {"platform-bootclasspath"},
|
"LOCAL_MODULE": {"platform-bootclasspath"},
|
||||||
"LOCAL_MODULE_CLASS": {"ETC"},
|
"LOCAL_MODULE_CLASS": {"ETC"},
|
||||||
"LOCAL_INSTALLED_MODULE_STEM": {"platform-bootclasspath.pb"},
|
"LOCAL_INSTALLED_MODULE_STEM": {"bootclasspath.pb"},
|
||||||
// Output and Install paths are tested separately in TestPlatformBootclasspath_ClasspathFragmentPaths
|
// Output and Install paths are tested separately in TestPlatformBootclasspath_ClasspathFragmentPaths
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ var prepareForTestWithSystemServerClasspath = android.GroupFixturePreparers(
|
||||||
PrepareForTestWithJavaDefaultModules,
|
PrepareForTestWithJavaDefaultModules,
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestPlatformSystemserverClasspathVariant(t *testing.T) {
|
func TestPlatformSystemServerClasspathVariant(t *testing.T) {
|
||||||
result := android.GroupFixturePreparers(
|
result := android.GroupFixturePreparers(
|
||||||
prepareForTestWithSystemServerClasspath,
|
prepareForTestWithSystemServerClasspath,
|
||||||
android.FixtureWithRootAndroidBp(`
|
android.FixtureWithRootAndroidBp(`
|
||||||
|
@ -38,7 +38,7 @@ func TestPlatformSystemserverClasspathVariant(t *testing.T) {
|
||||||
android.AssertIntEquals(t, "expect 1 variant", 1, len(variants))
|
android.AssertIntEquals(t, "expect 1 variant", 1, len(variants))
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestPlatformSystemserverClasspath_ClasspathFragmentPaths(t *testing.T) {
|
func TestPlatformSystemServerClasspath_ClasspathFragmentPaths(t *testing.T) {
|
||||||
result := android.GroupFixturePreparers(
|
result := android.GroupFixturePreparers(
|
||||||
prepareForTestWithSystemServerClasspath,
|
prepareForTestWithSystemServerClasspath,
|
||||||
android.FixtureWithRootAndroidBp(`
|
android.FixtureWithRootAndroidBp(`
|
||||||
|
@ -49,11 +49,11 @@ func TestPlatformSystemserverClasspath_ClasspathFragmentPaths(t *testing.T) {
|
||||||
).RunTest(t)
|
).RunTest(t)
|
||||||
|
|
||||||
p := result.Module("platform-systemserverclasspath", "android_common").(*platformSystemServerClasspathModule)
|
p := result.Module("platform-systemserverclasspath", "android_common").(*platformSystemServerClasspathModule)
|
||||||
android.AssertStringEquals(t, "output filepath", p.Name()+".pb", p.ClasspathFragmentBase.outputFilepath.Base())
|
android.AssertStringEquals(t, "output filepath", "systemserverclasspath.pb", p.ClasspathFragmentBase.outputFilepath.Base())
|
||||||
android.AssertPathRelativeToTopEquals(t, "install filepath", "out/soong/target/product/test_device/system/etc/classpaths", p.ClasspathFragmentBase.installDirPath)
|
android.AssertPathRelativeToTopEquals(t, "install filepath", "out/soong/target/product/test_device/system/etc/classpaths", p.ClasspathFragmentBase.installDirPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestPlatformSystemserverClasspathModule_AndroidMkEntries(t *testing.T) {
|
func TestPlatformSystemServerClasspathModule_AndroidMkEntries(t *testing.T) {
|
||||||
preparer := android.GroupFixturePreparers(
|
preparer := android.GroupFixturePreparers(
|
||||||
prepareForTestWithSystemServerClasspath,
|
prepareForTestWithSystemServerClasspath,
|
||||||
android.FixtureWithRootAndroidBp(`
|
android.FixtureWithRootAndroidBp(`
|
||||||
|
@ -78,8 +78,8 @@ func TestPlatformSystemserverClasspathModule_AndroidMkEntries(t *testing.T) {
|
||||||
want := map[string][]string{
|
want := map[string][]string{
|
||||||
"LOCAL_MODULE": {"platform-systemserverclasspath"},
|
"LOCAL_MODULE": {"platform-systemserverclasspath"},
|
||||||
"LOCAL_MODULE_CLASS": {"ETC"},
|
"LOCAL_MODULE_CLASS": {"ETC"},
|
||||||
"LOCAL_INSTALLED_MODULE_STEM": {"platform-systemserverclasspath.pb"},
|
"LOCAL_INSTALLED_MODULE_STEM": {"systemserverclasspath.pb"},
|
||||||
// Output and Install paths are tested separately in TestSystemserverClasspath_ClasspathFragmentPaths
|
// Output and Install paths are tested separately in TestPlatformSystemServerClasspath_ClasspathFragmentPaths
|
||||||
}
|
}
|
||||||
|
|
||||||
p := result.Module("platform-systemserverclasspath", "android_common").(*platformSystemServerClasspathModule)
|
p := result.Module("platform-systemserverclasspath", "android_common").(*platformSystemServerClasspathModule)
|
||||||
|
@ -96,7 +96,7 @@ func TestPlatformSystemserverClasspathModule_AndroidMkEntries(t *testing.T) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestSystemserverclasspathFragmentWithoutContents(t *testing.T) {
|
func TestSystemServerClasspathFragmentWithoutContents(t *testing.T) {
|
||||||
prepareForTestWithSystemServerClasspath.
|
prepareForTestWithSystemServerClasspath.
|
||||||
ExtendWithErrorHandler(android.FixtureExpectsAtLeastOneErrorMatchingPattern(
|
ExtendWithErrorHandler(android.FixtureExpectsAtLeastOneErrorMatchingPattern(
|
||||||
`\Qempty contents are not allowed\E`)).
|
`\Qempty contents are not allowed\E`)).
|
||||||
|
|
Loading…
Reference in New Issue