diff options
| author | Russ Cox <rsc@golang.org> | 2015-08-18 12:46:32 -0400 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2015-08-18 16:52:55 +0000 |
| commit | 263602e3bdefbb5ad721bca837f8bd191a4e2281 (patch) | |
| tree | 8a1466d266a1e8584f7f44cc4c7eca06de24b73c /git-codereview | |
| parent | 719edc39c86306800b6002204d8e09014b0e2c48 (diff) | |
| download | go-x-review-263602e3bdefbb5ad721bca837f8bd191a4e2281.tar.xz | |
git-codereview: skip git tests when there's no git
To fix linux builders for golang/go#11811.
Change-Id: I8058e09bc39c374ab9af469b2a6c732be14453f2
Reviewed-on: https://go-review.googlesource.com/13692
Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'git-codereview')
| -rw-r--r-- | git-codereview/util_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/git-codereview/util_test.go b/git-codereview/util_test.go index 8c0d924..400beb4 100644 --- a/git-codereview/util_test.go +++ b/git-codereview/util_test.go @@ -103,6 +103,14 @@ func (gt *gitTest) serverWorkUnrelated(t *testing.T) { } func newGitTest(t *testing.T) (gt *gitTest) { + // The Linux builders seem not to have git in their paths. + // That makes this whole repo a bit useless on such systems, + // but make sure the tests don't fail. + _, err := exec.LookPath("git") + if err != nil { + t.Skip("cannot find git in path: %v", err) + } + tmpdir, err := ioutil.TempDir("", "git-codereview-test") if err != nil { t.Fatal(err) |
