| Tim Windelschmidt | 6d33a43 | 2025-02-04 14:34:25 +0100 | [diff] [blame] | 1 | // Copyright The Monogon Project Authors. |
| 2 | // SPDX-License-Identifier: Apache-2.0 |
| 3 | |
| Serge Bazanski | ab4ef13 | 2021-09-24 13:58:13 +0200 | [diff] [blame] | 4 | package gotoolchain |
| 5 | |
| 6 | import ( |
| 7 | "os" |
| 8 | "os/exec" |
| 9 | "path" |
| 10 | "testing" |
| 11 | ) |
| 12 | |
| 13 | func TestGoToolRuns(t *testing.T) { |
| 14 | cmd := exec.Command(Go, "version") |
| 15 | if out, err := cmd.CombinedOutput(); err != nil { |
| 16 | t.Fatalf("Failed to run `go version`: %q, %v", string(out), err) |
| 17 | } |
| 18 | } |
| 19 | |
| 20 | func TestGorootContainsRoot(t *testing.T) { |
| 21 | rootfile := path.Join(Root, "ROOT") |
| 22 | if _, err := os.Stat(rootfile); err != nil { |
| 23 | t.Fatalf("ROOT not found in %s", Root) |
| 24 | } |
| 25 | } |