Skip to content

Commit

Permalink
tests: Include stderr in TestGopherJSCanBeVendored output.
Browse files Browse the repository at this point in the history
This way, we get more information when/if TestGopherJSCanBeVendored
fails.

Before:

	$ go test -v -run=TestGopherJSCanBeVendored
	=== RUN   TestGopherJSCanBeVendored
	--- FAIL: TestGopherJSCanBeVendored (5.20s)
		gorepo_test.go:38: exit status 1
	FAIL
	exit status 1
	FAIL	github.com/gopherjs/gopherjs/tests	5.203s

After:

	$ go test -v -run=TestGopherJSCanBeVendored
	=== RUN   TestGopherJSCanBeVendored
	vendoring github.com/gopherjs/gopherjs/js package is not supported, see #415
	--- FAIL: TestGopherJSCanBeVendored (5.19s)
		gorepo_test.go:40: exit status 1
	FAIL
	exit status 1
	FAIL	github.com/gopherjs/gopherjs/tests	5.190s
  • Loading branch information
dmitshur committed Apr 16, 2018
1 parent 49f2b5c commit 8a9d21b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/gorepo_test.go
Expand Up @@ -33,7 +33,9 @@ func TestGopherJSCanBeVendored(t *testing.T) {
t.Skip("test meant to be run using normal Go compiler (needs os/exec)")
}

got, err := exec.Command("bash", "gopherjsvendored_test.sh").Output()
cmd := exec.Command("bash", "gopherjsvendored_test.sh")
cmd.Stderr = os.Stdout
got, err := cmd.Output()
if err != nil {
t.Fatal(err)
}
Expand Down

0 comments on commit 8a9d21b

Please sign in to comment.