x/tools: disable tests not supported on Android
For golang/go#11811. Change-Id: Icf16a2d47fcf2fe0d79dd825ccb851a3d63a660f Reviewed-on: https://go-review.googlesource.com/13268 Reviewed-by: Rob Pike <r@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
parent
63f996ec75
commit
958ab4f550
|
@ -2,6 +2,10 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// No testdata on Android.
|
||||||
|
|
||||||
|
// +build !android
|
||||||
|
|
||||||
package main_test
|
package main_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// No testdata on Android.
|
||||||
|
|
||||||
|
// +build !android
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// No testdata on Android.
|
||||||
|
|
||||||
|
// +build !android
|
||||||
|
|
||||||
package main_test
|
package main_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// Incomplete source tree on Android.
|
||||||
|
|
||||||
|
// +build !android
|
||||||
|
|
||||||
package buildutil_test
|
package buildutil_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// Incomplete source tree on Android.
|
||||||
|
|
||||||
|
// +build !android
|
||||||
|
|
||||||
package buildutil_test
|
package buildutil_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// No testdata on Android.
|
||||||
|
|
||||||
|
// +build !android
|
||||||
|
|
||||||
package cha_test
|
package cha_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// No testdata on Android.
|
||||||
|
|
||||||
|
// +build !android
|
||||||
|
|
||||||
package rta_test
|
package rta_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -100,6 +100,9 @@ var importerTests = [...]importerTest{
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestGoxImporter(t *testing.T) {
|
func TestGoxImporter(t *testing.T) {
|
||||||
|
if runtime.GOOS == "android" {
|
||||||
|
t.Skipf("no testdata directory on %s", runtime.GOOS)
|
||||||
|
}
|
||||||
initmap := make(map[*types.Package]InitData)
|
initmap := make(map[*types.Package]InitData)
|
||||||
imp := GetImporter([]string{"testdata"}, initmap)
|
imp := GetImporter([]string{"testdata"}, initmap)
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// No testdata on Android.
|
||||||
|
|
||||||
|
// +build !android
|
||||||
|
|
||||||
package loader_test
|
package loader_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -29,6 +29,10 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestStdlib(t *testing.T) {
|
func TestStdlib(t *testing.T) {
|
||||||
|
if runtime.GOOS == "android" {
|
||||||
|
t.Skipf("incomplete std lib on %s", runtime.GOOS)
|
||||||
|
}
|
||||||
|
|
||||||
runtime.GC()
|
runtime.GC()
|
||||||
t0 := time.Now()
|
t0 := time.Now()
|
||||||
var memstats runtime.MemStats
|
var memstats runtime.MemStats
|
||||||
|
@ -115,9 +119,10 @@ func TestStdlib(t *testing.T) {
|
||||||
|
|
||||||
func TestCgoOption(t *testing.T) {
|
func TestCgoOption(t *testing.T) {
|
||||||
switch runtime.GOOS {
|
switch runtime.GOOS {
|
||||||
// On these systems, the net and os/user packages don't use cgo.
|
// On these systems, the net and os/user packages don't use cgo
|
||||||
case "plan9", "solaris", "windows":
|
// or the std library is incomplete (Android).
|
||||||
return
|
case "android", "plan9", "solaris", "windows":
|
||||||
|
t.Skipf("no cgo or incomplete std lib on %s", runtime.GOOS)
|
||||||
}
|
}
|
||||||
// In nocgo builds (e.g. linux-amd64-nocgo),
|
// In nocgo builds (e.g. linux-amd64-nocgo),
|
||||||
// there is no "runtime/cgo" package,
|
// there is no "runtime/cgo" package,
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// No testdata on Android.
|
||||||
|
|
||||||
|
// +build !android
|
||||||
|
|
||||||
package pointer_test
|
package pointer_test
|
||||||
|
|
||||||
// This test uses 'expectation' comments embedded within testdata/*.go
|
// This test uses 'expectation' comments embedded within testdata/*.go
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// Incomplete source tree on Android.
|
||||||
|
|
||||||
|
// +build !android
|
||||||
|
|
||||||
package pointer
|
package pointer
|
||||||
|
|
||||||
// This file runs the pointer analysis on all packages and tests beneath
|
// This file runs the pointer analysis on all packages and tests beneath
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// +build !windows,!plan9
|
// +build !android,!windows,!plan9
|
||||||
|
|
||||||
package interp_test
|
package interp_test
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ import (
|
||||||
"go/token"
|
"go/token"
|
||||||
"os"
|
"os"
|
||||||
"regexp"
|
"regexp"
|
||||||
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
@ -25,6 +26,10 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestObjValueLookup(t *testing.T) {
|
func TestObjValueLookup(t *testing.T) {
|
||||||
|
if runtime.GOOS == "android" {
|
||||||
|
t.Skipf("no testdata directory on %s", runtime.GOOS)
|
||||||
|
}
|
||||||
|
|
||||||
conf := loader.Config{ParserMode: parser.ParseComments}
|
conf := loader.Config{ParserMode: parser.ParseComments}
|
||||||
f, err := conf.ParseFile("testdata/objlookup.go", nil)
|
f, err := conf.ParseFile("testdata/objlookup.go", nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -189,6 +194,10 @@ func checkVarValue(t *testing.T, prog *ssa.Program, pkg *ssa.Package, ref []ast.
|
||||||
// Ensure that, in debug mode, we can determine the ssa.Value
|
// Ensure that, in debug mode, we can determine the ssa.Value
|
||||||
// corresponding to every ast.Expr.
|
// corresponding to every ast.Expr.
|
||||||
func TestValueForExpr(t *testing.T) {
|
func TestValueForExpr(t *testing.T) {
|
||||||
|
if runtime.GOOS == "android" {
|
||||||
|
t.Skipf("no testdata dir on %s", runtime.GOOS)
|
||||||
|
}
|
||||||
|
|
||||||
conf := loader.Config{ParserMode: parser.ParseComments}
|
conf := loader.Config{ParserMode: parser.ParseComments}
|
||||||
f, err := conf.ParseFile("testdata/valueforexpr.go", nil)
|
f, err := conf.ParseFile("testdata/valueforexpr.go", nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// No testdata on Android.
|
||||||
|
|
||||||
|
// +build !android
|
||||||
|
|
||||||
package ssautil_test
|
package ssautil_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// Incomplete source tree on Android.
|
||||||
|
|
||||||
|
// +build !android
|
||||||
|
|
||||||
package ssa_test
|
package ssa_test
|
||||||
|
|
||||||
// This file runs the SSA builder in sanity-checking mode on all
|
// This file runs the SSA builder in sanity-checking mode on all
|
||||||
|
|
|
@ -25,7 +25,8 @@ import (
|
||||||
// import.
|
// import.
|
||||||
func skipSpecialPlatforms(t *testing.T) {
|
func skipSpecialPlatforms(t *testing.T) {
|
||||||
switch platform := runtime.GOOS + "-" + runtime.GOARCH; platform {
|
switch platform := runtime.GOOS + "-" + runtime.GOARCH; platform {
|
||||||
case "nacl-amd64p32",
|
case "android-arm",
|
||||||
|
"nacl-amd64p32",
|
||||||
"nacl-386",
|
"nacl-386",
|
||||||
"nacl-arm",
|
"nacl-arm",
|
||||||
"darwin-arm",
|
"darwin-arm",
|
||||||
|
|
|
@ -9,6 +9,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"reflect"
|
"reflect"
|
||||||
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
@ -16,6 +17,10 @@ import (
|
||||||
// Test that RepoRootForImportPath creates the correct RepoRoot for a given importPath.
|
// Test that RepoRootForImportPath creates the correct RepoRoot for a given importPath.
|
||||||
// TODO(cmang): Add tests for SVN and BZR.
|
// TODO(cmang): Add tests for SVN and BZR.
|
||||||
func TestRepoRootForImportPath(t *testing.T) {
|
func TestRepoRootForImportPath(t *testing.T) {
|
||||||
|
if runtime.GOOS == "android" {
|
||||||
|
t.Skipf("incomplete source tree on %s", runtime.GOOS)
|
||||||
|
}
|
||||||
|
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
path string
|
path string
|
||||||
want *RepoRoot
|
want *RepoRoot
|
||||||
|
|
|
@ -198,6 +198,8 @@ func doQuery(out io.Writer, q *query, useJson bool) {
|
||||||
|
|
||||||
func TestOracle(t *testing.T) {
|
func TestOracle(t *testing.T) {
|
||||||
switch runtime.GOOS {
|
switch runtime.GOOS {
|
||||||
|
case "android":
|
||||||
|
t.Skipf("skipping test on %q (no testdata dir)", runtime.GOOS)
|
||||||
case "windows":
|
case "windows":
|
||||||
t.Skipf("skipping test on %q (no /usr/bin/diff)", runtime.GOOS)
|
t.Skipf("skipping test on %q (no /usr/bin/diff)", runtime.GOOS)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
// Copyright 2015 The Go Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style
|
||||||
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// No testdata on Android.
|
||||||
|
|
||||||
|
// +build !android
|
||||||
|
|
||||||
package eg_test
|
package eg_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -1,3 +1,11 @@
|
||||||
|
// Copyright 2015 The Go Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style
|
||||||
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// Incomplete std lib sources on Android.
|
||||||
|
|
||||||
|
// +build !android
|
||||||
|
|
||||||
package importgraph_test
|
package importgraph_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// Incomplete std lib sources on Android.
|
||||||
|
|
||||||
|
// +build !android
|
||||||
|
|
||||||
package lexical
|
package lexical
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|
Loading…
Reference in New Issue