Fix soong for go test ./...
Fix various issues that prevent building or running tests with the Go tools: Remove testing/test_spec_proto/go.mod. There's already a go.mod at the top level, and adding testing/test_spec_proto/go.mod breaks compiling with the Go tools in IntelliJ or from the command line. Fix go vet issues when trying to print []DataPath. Fix aconfig_conversion_test.go and add it to Android.bp so it runs in presubmit. Test: go test ./... Change-Id: I18af2f05631446fe507744a2951e4b02c7ab59be
This commit is contained in:
@@ -6,6 +6,7 @@ bootstrap_go_package {
|
||||
name: "soong-bp2build",
|
||||
pkgPath: "android/soong/bp2build",
|
||||
srcs: [
|
||||
"aconfig_conversion_test.go",
|
||||
"androidbp_to_build_templates.go",
|
||||
"bp2build.go",
|
||||
"bp2build_product_config.go",
|
||||
@@ -21,6 +22,7 @@ bootstrap_go_package {
|
||||
deps: [
|
||||
"blueprint-bootstrap",
|
||||
"soong-aidl-library",
|
||||
"soong-aconfig",
|
||||
"soong-android",
|
||||
"soong-android-allowlists",
|
||||
"soong-android-soongconfig",
|
||||
|
@@ -156,7 +156,7 @@ func TestJavaAconfigLibrary(t *testing.T) {
|
||||
name: "foo",
|
||||
aconfig_declarations: "foo_aconfig_declarations",
|
||||
libs: ["foo_java_library"],
|
||||
test: true,
|
||||
mode: "test",
|
||||
}
|
||||
`
|
||||
expectedBazelTargets := []string{
|
||||
@@ -184,7 +184,6 @@ func TestJavaAconfigLibrary(t *testing.T) {
|
||||
AttrNameToString{
|
||||
"aconfig_declarations": `":foo_aconfig_declarations"`,
|
||||
"libs": `[":foo_java_library-neverlink"]`,
|
||||
"test": `True`,
|
||||
"sdk_version": `"system_current"`,
|
||||
"target_compatible_with": `["//build/bazel_common_rules/platforms/os:android"]`,
|
||||
},
|
||||
@@ -213,7 +212,7 @@ func TestJavaAconfigLibraryAsTaggedOutput(t *testing.T) {
|
||||
java_aconfig_library {
|
||||
name: "foo_aconfig_library",
|
||||
aconfig_declarations: "foo_aconfig_declarations",
|
||||
test: true,
|
||||
mode: "test",
|
||||
}
|
||||
`
|
||||
expectedBazelTargets := []string{
|
||||
@@ -230,7 +229,6 @@ func TestJavaAconfigLibraryAsTaggedOutput(t *testing.T) {
|
||||
"foo_aconfig_library",
|
||||
AttrNameToString{
|
||||
"aconfig_declarations": `":foo_aconfig_declarations"`,
|
||||
"test": `True`,
|
||||
"sdk_version": `"system_current"`,
|
||||
"target_compatible_with": `["//build/bazel_common_rules/platforms/os:android"]`,
|
||||
},
|
||||
|
Reference in New Issue
Block a user