mirror of
https://github.com/golang/go.git
synced 2025-05-05 15:43:04 +00:00
cmd/godoc,cmd/gorename,refactor/rename: skip tests on GOOS=android
Change-Id: I7a493ba4c41dddb3049a8e62198d87749fb72f62 Reviewed-on: https://go-review.googlesource.com/c/tools/+/165719 Run-TryBot: Elias Naur <mail@eliasnaur.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
1f7a77873d
commit
ab489119c5
@ -32,6 +32,10 @@ func buildGodoc(t *testing.T) (bin string, cleanup func()) {
|
|||||||
if runtime.GOARCH == "arm" {
|
if runtime.GOARCH == "arm" {
|
||||||
t.Skip("skipping test on arm platforms; too slow")
|
t.Skip("skipping test on arm platforms; too slow")
|
||||||
}
|
}
|
||||||
|
if runtime.GOOS == "android" {
|
||||||
|
t.Skipf("the dependencies are not available on android")
|
||||||
|
}
|
||||||
|
|
||||||
tmp, err := ioutil.TempDir("", "godoc-regtest-")
|
tmp, err := ioutil.TempDir("", "godoc-regtest-")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
|
@ -312,6 +312,9 @@ func g() { fmt.Println(test.Foo(3)) }
|
|||||||
// buildGorename builds the gorename executable.
|
// buildGorename builds the gorename executable.
|
||||||
// It returns its path, and a cleanup function.
|
// It returns its path, and a cleanup function.
|
||||||
func buildGorename(t *testing.T) (tmp, bin string, cleanup func()) {
|
func buildGorename(t *testing.T) (tmp, bin string, cleanup func()) {
|
||||||
|
if runtime.GOOS == "android" {
|
||||||
|
t.Skipf("the dependencies are not available on android")
|
||||||
|
}
|
||||||
|
|
||||||
tmp, err := ioutil.TempDir("", "gorename-regtest-")
|
tmp, err := ioutil.TempDir("", "gorename-regtest-")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -7,12 +7,16 @@ package static
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
"runtime"
|
||||||
"strconv"
|
"strconv"
|
||||||
"testing"
|
"testing"
|
||||||
"unicode"
|
"unicode"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestStaticIsUpToDate(t *testing.T) {
|
func TestStaticIsUpToDate(t *testing.T) {
|
||||||
|
if runtime.GOOS == "android" {
|
||||||
|
t.Skip("files not available on android")
|
||||||
|
}
|
||||||
oldBuf, err := ioutil.ReadFile("static.go")
|
oldBuf, err := ioutil.ReadFile("static.go")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("error while reading static.go: %v\n", err)
|
t.Errorf("error while reading static.go: %v\n", err)
|
||||||
|
@ -1277,10 +1277,10 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestDiff(t *testing.T) {
|
func TestDiff(t *testing.T) {
|
||||||
if runtime.GOOS == "windows" {
|
switch runtime.GOOS {
|
||||||
t.Skipf("diff tool non-existent for windows on builders")
|
case "windows", "android":
|
||||||
}
|
t.Skipf("diff tool non-existent for %s on builders", runtime.GOOS)
|
||||||
if runtime.GOOS == "plan9" {
|
case "plan9":
|
||||||
t.Skipf("plan9 diff tool doesn't support -u flag")
|
t.Skipf("plan9 diff tool doesn't support -u flag")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user