diff options
| author | Bryan C. Mills <bcmills@google.com> | 2019-08-29 12:52:26 -0400 |
|---|---|---|
| committer | Bryan C. Mills <bcmills@google.com> | 2019-08-29 16:58:21 +0000 |
| commit | 3c9f1af8b2da3b3661a39ee550190917c0cf5208 (patch) | |
| tree | e7b444d8ab1c1f28772ea30acb92721dc0cc9330 | |
| parent | 1f1f3d2b450bb9b46a281dc119148605afd67c6d (diff) | |
| download | golang-id-tour-3c9f1af8b2da3b3661a39ee550190917c0cf5208.tar.xz | |
content: skip test if the 'go' command is missing
Change-Id: I52c906fc33b1e94c64419cbf574f15d67ce90e39
Reviewed-on: https://go-review.googlesource.com/c/tour/+/192328
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
| -rw-r--r-- | content/content_test.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/content/content_test.go b/content/content_test.go index 1052b7e..4c0ff2a 100644 --- a/content/content_test.go +++ b/content/content_test.go @@ -21,6 +21,10 @@ import ( // Files that contain the string "// +build no-build" are not built. // Files that contain the string "// +build no-run" are not executed. func TestContent(t *testing.T) { + if _, err := exec.LookPath("go"); err != nil { + t.Skipf("skipping because 'go' executable not available: %v", err) + } + scratch, err := ioutil.TempDir("", "tour-content-test") if err != nil { t.Fatal(err) |
