summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-util/soong/files/blueprint-test-go-1.10.patch')
-rw-r--r--dev-util/soong/files/blueprint-test-go-1.10.patch64
1 files changed, 64 insertions, 0 deletions
diff --git a/dev-util/soong/files/blueprint-test-go-1.10.patch b/dev-util/soong/files/blueprint-test-go-1.10.patch
new file mode 100644
index 0000000..23b7caa
--- /dev/null
+++ b/dev-util/soong/files/blueprint-test-go-1.10.patch
@@ -0,0 +1,64 @@
+Index: soong-8.1.0_p41/build/blueprint/gotestmain/gotestmain.go
+===================================================================
+--- soong-8.1.0_p41.orig/build/blueprint/gotestmain/gotestmain.go
++++ soong-8.1.0_p41/build/blueprint/gotestmain/gotestmain.go
+@@ -105,12 +105,11 @@ var testMainTmpl = template.Must(templat
+ package main
+
+ import (
+- "io"
+ {{if not .HasMain}}
+ "os"
+ {{end}}
+- "regexp"
+ "testing"
++ "testing/internal/testdeps"
+
+ pkg "{{.Package}}"
+ )
+@@ -121,44 +120,9 @@ var t = []testing.InternalTest{
+ {{end}}
+ }
+
+-var matchPat string
+-var matchRe *regexp.Regexp
+-
+-type matchString struct{}
+-
+-func MatchString(pat, str string) (result bool, err error) {
+- if matchRe == nil || matchPat != pat {
+- matchPat = pat
+- matchRe, err = regexp.Compile(matchPat)
+- if err != nil {
+- return
+- }
+- }
+- return matchRe.MatchString(str), nil
+-}
+-
+-func (matchString) MatchString(pat, str string) (bool, error) {
+- return MatchString(pat, str)
+-}
+-
+-func (matchString) StartCPUProfile(w io.Writer) error {
+- panic("shouldn't get here")
+-}
+-
+-func (matchString) StopCPUProfile() {
+-}
+-
+-func (matchString) WriteHeapProfile(w io.Writer) error {
+- panic("shouldn't get here")
+-}
+-
+-func (matchString) WriteProfileTo(string, io.Writer, int) error {
+- panic("shouldn't get here")
+-}
+-
+ func main() {
+ {{if .MainStartTakesInterface}}
+- m := testing.MainStart(matchString{}, t, nil, nil)
++ m := testing.MainStart(testdeps.TestDeps{}, t, nil, nil)
+ {{else}}
+ m := testing.MainStart(MatchString, t, nil, nil)
+ {{end}}