diff options
author | Bryan C. Mills <bcmills@google.com> | 2019-11-15 22:10:44 +0000 |
---|---|---|
committer | Bryan C. Mills <bcmills@google.com> | 2019-11-15 22:47:41 +0000 |
commit | 72f333a14b071e7560c67abcaacec176aaa604cf (patch) | |
tree | 6e8edbc13161c39ebba6fabf62685de85d8b3c2f /test/sinit_run.go | |
parent | dab1a10a98e376502e0ab5dfb6d2ab82394c19b6 (diff) | |
download | go-72f333a14b071e7560c67abcaacec176aaa604cf.tar.gz go-72f333a14b071e7560c67abcaacec176aaa604cf.zip |
Revert "test: avoid writing temporary files to GOROOT"
This reverts CL 207352
Reason for revert: broke more builders than it fixed. 😞
Change-Id: Ic5adefe92edfa2230b9c7d750c922473a6a5ded4
Reviewed-on: https://go-review.googlesource.com/c/go/+/207477
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'test/sinit_run.go')
-rw-r--r-- | test/sinit_run.go | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/test/sinit_run.go b/test/sinit_run.go index afd15ffbf2..fdd19c492f 100644 --- a/test/sinit_run.go +++ b/test/sinit_run.go @@ -17,18 +17,15 @@ import ( ) func main() { - cmd := exec.Command("go", "tool", "compile", "-o", os.DevNull, "-S", "sinit.go") + cmd := exec.Command("go", "tool", "compile", "-S", "sinit.go") out, err := cmd.CombinedOutput() if err != nil { fmt.Println(string(out)) fmt.Println(err) os.Exit(1) } + os.Remove("sinit.o") - if len(bytes.TrimSpace(out)) == 0 { - fmt.Println("'go tool compile -S sinit.go' printed no output") - os.Exit(1) - } if bytes.Contains(out, []byte("initdone")) { fmt.Println("sinit generated an init function") os.Exit(1) |