blob: 2f13d80ac8ba1fcd41fd09c7c930a383d54a59d4 [file] [log] [blame]
Tim Windelschmidt6d33a432025-02-04 14:34:25 +01001// Copyright The Monogon Project Authors.
2// SPDX-License-Identifier: Apache-2.0
3
Serge Bazanskiab4ef132021-09-24 13:58:13 +02004package gotoolchain
5
6import (
7 "os"
8 "os/exec"
9 "path"
10 "testing"
11)
12
13func 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
20func 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}