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
diff --git a/cc/cc_test.go b/cc/cc_test.go
index 794c5ee..e2dba90 100644
--- a/cc/cc_test.go
+++ b/cc/cc_test.go
@@ -720,7 +720,7 @@
return
}
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
}
@@ -777,7 +777,7 @@
t.Fatalf("expected exactly one output file. output files: [%s]", outputFiles)
}
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()
@@ -3332,7 +3332,7 @@
t.Errorf("expected exactly one output file. output files: [%s]", outputFiles)
}
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()