Skip to content

Commit

Permalink
cmd/go: skip tests using Git on Plan 9
Browse files Browse the repository at this point in the history
TestScript/get_unicode, TestScript/get_dotfiles and
TestScript/get_brace are failing on Plan 9 since they
expect a full-featured git command, while the git tool
has been emulated as a simple rc script on Plan 9.

This change skips tests using Git on Plan 9.

Fixes #29640.

Change-Id: Id7f6fdca552167f4631fe401f63167e5653daafa
Reviewed-on: https://go-review.googlesource.com/c/157119
Run-TryBot: David du Colombier <0intro@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
  • Loading branch information
0intro committed Jan 9, 2019
1 parent 52cae27 commit 9a5a504
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/cmd/go/script_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,11 @@ Script:
if strings.HasPrefix(cond, "exec:") {
prog := cond[len("exec:"):]
ok = execCache.Do(prog, func() interface{} {
if runtime.GOOS == "plan9" && prog == "git" {
// The Git command is usually not the real Git on Plan 9.
// See https://golang.org/issues/29640.
return false
}
_, err := exec.LookPath(prog)
return err == nil
}).(bool)
Expand Down

0 comments on commit 9a5a504

Please sign in to comment.