net/tlsdial,tstest,version: use go command from $PATH

Go now includes the GOROOT bin directory in $PATH while running tests
and generate, so it is no longer necessary to construct a path using
runtime.GOROOT().

Fixes #6689

Signed-off-by: James Tucker <james@tailscale.com>
This commit is contained in:
James Tucker
2022-12-09 14:05:21 -08:00
committed by James Tucker
parent 467ace7d0c
commit b2c55e62c8
5 changed files with 5 additions and 12 deletions

View File

@ -11,8 +11,6 @@ import (
"fmt"
"os"
"os/exec"
"path/filepath"
"runtime"
"strings"
"testing"
@ -53,7 +51,7 @@ func TestInQemu(t *testing.T) {
}
t.Logf("using %v", look)
}
cmd := exec.Command(filepath.Join(runtime.GOROOT(), "bin", "go"),
cmd := exec.Command("go",
"test",
"--exec="+execVia,
"-v",