Skip to content

Commit a0e4714

Browse files
committed
upgrade to Go 1.10
A workaround for golang/go#23019 has been implemented to be able to execute tests on Go 1.10.
1 parent 874a74a commit a0e4714

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
language: go
2-
go: 1.9.x
2+
go: 1.10.x
33
env:
44
global:
55
- CGO_ENABLED: 0

common.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package main
33
import (
44
"context"
55
"fmt"
6+
"io"
67
"net"
78
"os"
89
"os/exec"
@@ -90,7 +91,12 @@ func RunWithEnv(env []string, cmd string, args ...string) error {
9091
ctx, cancel := GetTimeoutContext(DefaultTimeout)
9192
defer cancel()
9293
c := exec.CommandContext(ctx, cmd, args...)
93-
c.Stderr = os.Stderr
94+
95+
// XXX: Workaround for https://github.com/golang/go/issues/23019
96+
// Otherwise, go test will hang forever on Go 1.10.
97+
// Workaround found on https://go-review.googlesource.com/c/go/+/42271/3/misc/android/go_android_exec.go#36
98+
c.Stderr = struct{ io.Writer }{os.Stderr}
99+
94100
c.Stdout = os.Stdout
95101
c.Env = env
96102
return c.Run()

0 commit comments

Comments
 (0)