Merge "Fix soong for go test ./..." into main
This commit is contained in:
@@ -6,6 +6,7 @@ bootstrap_go_package {
|
|||||||
name: "soong-bp2build",
|
name: "soong-bp2build",
|
||||||
pkgPath: "android/soong/bp2build",
|
pkgPath: "android/soong/bp2build",
|
||||||
srcs: [
|
srcs: [
|
||||||
|
"aconfig_conversion_test.go",
|
||||||
"androidbp_to_build_templates.go",
|
"androidbp_to_build_templates.go",
|
||||||
"bp2build.go",
|
"bp2build.go",
|
||||||
"bp2build_product_config.go",
|
"bp2build_product_config.go",
|
||||||
@@ -21,6 +22,7 @@ bootstrap_go_package {
|
|||||||
deps: [
|
deps: [
|
||||||
"blueprint-bootstrap",
|
"blueprint-bootstrap",
|
||||||
"soong-aidl-library",
|
"soong-aidl-library",
|
||||||
|
"soong-aconfig",
|
||||||
"soong-android",
|
"soong-android",
|
||||||
"soong-android-allowlists",
|
"soong-android-allowlists",
|
||||||
"soong-android-soongconfig",
|
"soong-android-soongconfig",
|
||||||
|
@@ -156,7 +156,7 @@ func TestJavaAconfigLibrary(t *testing.T) {
|
|||||||
name: "foo",
|
name: "foo",
|
||||||
aconfig_declarations: "foo_aconfig_declarations",
|
aconfig_declarations: "foo_aconfig_declarations",
|
||||||
libs: ["foo_java_library"],
|
libs: ["foo_java_library"],
|
||||||
test: true,
|
mode: "test",
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
expectedBazelTargets := []string{
|
expectedBazelTargets := []string{
|
||||||
@@ -184,7 +184,6 @@ func TestJavaAconfigLibrary(t *testing.T) {
|
|||||||
AttrNameToString{
|
AttrNameToString{
|
||||||
"aconfig_declarations": `":foo_aconfig_declarations"`,
|
"aconfig_declarations": `":foo_aconfig_declarations"`,
|
||||||
"libs": `[":foo_java_library-neverlink"]`,
|
"libs": `[":foo_java_library-neverlink"]`,
|
||||||
"test": `True`,
|
|
||||||
"sdk_version": `"system_current"`,
|
"sdk_version": `"system_current"`,
|
||||||
"target_compatible_with": `["//build/bazel_common_rules/platforms/os:android"]`,
|
"target_compatible_with": `["//build/bazel_common_rules/platforms/os:android"]`,
|
||||||
},
|
},
|
||||||
@@ -213,7 +212,7 @@ func TestJavaAconfigLibraryAsTaggedOutput(t *testing.T) {
|
|||||||
java_aconfig_library {
|
java_aconfig_library {
|
||||||
name: "foo_aconfig_library",
|
name: "foo_aconfig_library",
|
||||||
aconfig_declarations: "foo_aconfig_declarations",
|
aconfig_declarations: "foo_aconfig_declarations",
|
||||||
test: true,
|
mode: "test",
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
expectedBazelTargets := []string{
|
expectedBazelTargets := []string{
|
||||||
@@ -230,7 +229,6 @@ func TestJavaAconfigLibraryAsTaggedOutput(t *testing.T) {
|
|||||||
"foo_aconfig_library",
|
"foo_aconfig_library",
|
||||||
AttrNameToString{
|
AttrNameToString{
|
||||||
"aconfig_declarations": `":foo_aconfig_declarations"`,
|
"aconfig_declarations": `":foo_aconfig_declarations"`,
|
||||||
"test": `True`,
|
|
||||||
"sdk_version": `"system_current"`,
|
"sdk_version": `"system_current"`,
|
||||||
"target_compatible_with": `["//build/bazel_common_rules/platforms/os:android"]`,
|
"target_compatible_with": `["//build/bazel_common_rules/platforms/os:android"]`,
|
||||||
},
|
},
|
||||||
|
@@ -720,7 +720,7 @@ func TestDataLibs(t *testing.T) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if len(testBinary.dataPaths()) != 1 {
|
if len(testBinary.dataPaths()) != 1 {
|
||||||
t.Errorf("expected exactly one test data file. test data files: [%s]", testBinary.dataPaths())
|
t.Errorf("expected exactly one test data file. test data files: [%v]", testBinary.dataPaths())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -777,7 +777,7 @@ func TestDataLibsRelativeInstallPath(t *testing.T) {
|
|||||||
t.Fatalf("expected exactly one output file. output files: [%s]", outputFiles)
|
t.Fatalf("expected exactly one output file. output files: [%s]", outputFiles)
|
||||||
}
|
}
|
||||||
if len(testBinary.dataPaths()) != 2 {
|
if len(testBinary.dataPaths()) != 2 {
|
||||||
t.Fatalf("expected exactly one test data file. test data files: [%s]", testBinary.dataPaths())
|
t.Fatalf("expected exactly one test data file. test data files: [%v]", testBinary.dataPaths())
|
||||||
}
|
}
|
||||||
|
|
||||||
outputPath := outputFiles[0].String()
|
outputPath := outputFiles[0].String()
|
||||||
@@ -3332,7 +3332,7 @@ func TestDataLibsPrebuiltSharedTestLibrary(t *testing.T) {
|
|||||||
t.Errorf("expected exactly one output file. output files: [%s]", outputFiles)
|
t.Errorf("expected exactly one output file. output files: [%s]", outputFiles)
|
||||||
}
|
}
|
||||||
if len(testBinary.dataPaths()) != 1 {
|
if len(testBinary.dataPaths()) != 1 {
|
||||||
t.Errorf("expected exactly one test data file. test data files: [%s]", testBinary.dataPaths())
|
t.Errorf("expected exactly one test data file. test data files: [%v]", testBinary.dataPaths())
|
||||||
}
|
}
|
||||||
|
|
||||||
outputPath := outputFiles[0].String()
|
outputPath := outputFiles[0].String()
|
||||||
|
@@ -38,7 +38,7 @@ func TestRustTest(t *testing.T) {
|
|||||||
|
|
||||||
dataPaths := testingModule.Module().(*Module).compiler.(*testDecorator).dataPaths()
|
dataPaths := testingModule.Module().(*Module).compiler.(*testDecorator).dataPaths()
|
||||||
if len(dataPaths) != 1 {
|
if len(dataPaths) != 1 {
|
||||||
t.Errorf("expected exactly one test data file. test data files: [%s]", dataPaths)
|
t.Errorf("expected exactly one test data file. test data files: [%v]", dataPaths)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -116,7 +116,7 @@ func TestDataLibs(t *testing.T) {
|
|||||||
t.Fatalf("expected exactly one output file. output files: [%s]", outputFiles)
|
t.Fatalf("expected exactly one output file. output files: [%s]", outputFiles)
|
||||||
}
|
}
|
||||||
if len(testBinary.dataPaths()) != 2 {
|
if len(testBinary.dataPaths()) != 2 {
|
||||||
t.Fatalf("expected exactly two test data files. test data files: [%s]", testBinary.dataPaths())
|
t.Fatalf("expected exactly two test data files. test data files: [%v]", testBinary.dataPaths())
|
||||||
}
|
}
|
||||||
|
|
||||||
outputPath := outputFiles[0].String()
|
outputPath := outputFiles[0].String()
|
||||||
@@ -178,7 +178,7 @@ func TestDataLibsRelativeInstallPath(t *testing.T) {
|
|||||||
t.Fatalf("expected exactly one output file. output files: [%s]", outputFiles)
|
t.Fatalf("expected exactly one output file. output files: [%s]", outputFiles)
|
||||||
}
|
}
|
||||||
if len(testBinary.dataPaths()) != 3 {
|
if len(testBinary.dataPaths()) != 3 {
|
||||||
t.Fatalf("expected exactly two test data files. test data files: [%s]", testBinary.dataPaths())
|
t.Fatalf("expected exactly two test data files. test data files: [%v]", testBinary.dataPaths())
|
||||||
}
|
}
|
||||||
|
|
||||||
outputPath := outputFiles[0].String()
|
outputPath := outputFiles[0].String()
|
||||||
|
@@ -1,2 +0,0 @@
|
|||||||
module test_spec_proto
|
|
||||||
go 1.18
|
|
Reference in New Issue
Block a user