internal/lsp,internal/lsp/cmd: skip tests on android
Change-Id: Idd9ddd32742a9f85096b71509511492b54538190 Reviewed-on: https://go-review.googlesource.com/c/tools/+/167818 Run-TryBot: Elias Naur <mail@eliasnaur.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
This commit is contained in:
parent
658e28e1e6
commit
f0bfdbff1f
|
@ -14,6 +14,7 @@ import (
|
|||
"os/exec"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"runtime"
|
||||
"strconv"
|
||||
"strings"
|
||||
"testing"
|
||||
|
@ -27,6 +28,9 @@ import (
|
|||
var verifyGuru = flag.Bool("verify-guru", false, "Check that the guru compatability matches")
|
||||
|
||||
func TestDefinitionHelpExample(t *testing.T) {
|
||||
if runtime.GOOS == "android" {
|
||||
t.Skip("not all source files are available on android")
|
||||
}
|
||||
dir, err := os.Getwd()
|
||||
if err != nil {
|
||||
t.Errorf("could not get wd: %v", err)
|
||||
|
|
|
@ -13,6 +13,7 @@ import (
|
|||
"go/token"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
|
@ -118,6 +119,14 @@ func testLSP(t *testing.T, exporter packagestest.Exporter) {
|
|||
})
|
||||
|
||||
t.Run("Format", func(t *testing.T) {
|
||||
if _, err := exec.LookPath("gofmt"); err != nil {
|
||||
switch runtime.GOOS {
|
||||
case "android":
|
||||
t.Skip("gofmt is not installed")
|
||||
default:
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
t.Helper()
|
||||
if goVersion111 { // TODO(rstambler): Remove this when we no longer support Go 1.10.
|
||||
if len(expectedFormat) != expectedFormatCount {
|
||||
|
|
Loading…
Reference in New Issue