diff options
author | Shenghou Ma <minux.ma@gmail.com> | 2012-03-22 02:14:44 +0800 |
---|---|---|
committer | Shenghou Ma <minux.ma@gmail.com> | 2012-03-22 02:14:44 +0800 |
commit | f28fabf453b82b89ba1f283c5124cfd655ca65c9 (patch) | |
tree | 190023da95a60667195a206179795660e5efe4be | |
parent | 0a77fadd70443040c8899e1df4825380e5f455ad (diff) | |
download | go-f28fabf453b82b89ba1f283c5124cfd655ca65c9.tar.gz |
test: use testlib in a few more cases
Introduce a new skip cmd.
R=golang-dev, bradfitz, iant, iant
CC=golang-dev
http://codereview.appspot.com/5868048
-rw-r--r-- | test/cmplxdivide.c | 1 | ||||
-rw-r--r-- | test/cmplxdivide1.go | 1 | ||||
-rw-r--r-- | test/ddd2.go | 2 | ||||
-rw-r--r-- | test/fixedbugs/bug223.go | 4 | ||||
-rw-r--r-- | test/import2.go | 2 | ||||
-rw-r--r-- | test/interface/embed0.go | 2 | ||||
-rw-r--r-- | test/interface/private1.go | 2 | ||||
-rw-r--r-- | test/interface/recursive1.go | 2 | ||||
-rw-r--r-- | test/method4a.go | 2 | ||||
-rw-r--r-- | test/run.go | 7 | ||||
-rw-r--r-- | test/testlib | 4 |
11 files changed, 19 insertions, 10 deletions
diff --git a/test/cmplxdivide.c b/test/cmplxdivide.c index b340f04d8..12dc4f1c0 100644 --- a/test/cmplxdivide.c +++ b/test/cmplxdivide.c @@ -51,6 +51,7 @@ main(void) int i, j, k, l; double complex n, d, q; + printf("// skip\n"); printf("// # generated by cmplxdivide.c\n"); printf("\n"); printf("package main\n"); diff --git a/test/cmplxdivide1.go b/test/cmplxdivide1.go index 6a1dee9fe..e9031dd15 100644 --- a/test/cmplxdivide1.go +++ b/test/cmplxdivide1.go @@ -1,3 +1,4 @@ +// skip // # generated by cmplxdivide.c package main diff --git a/test/ddd2.go b/test/ddd2.go index 2edae36b1..a141a39c7 100644 --- a/test/ddd2.go +++ b/test/ddd2.go @@ -1,4 +1,4 @@ -// true +// skip // Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/fixedbugs/bug223.go b/test/fixedbugs/bug223.go index 80f9cae81..eccf574a1 100644 --- a/test/fixedbugs/bug223.go +++ b/test/fixedbugs/bug223.go @@ -1,4 +1,4 @@ -// (! $G $D/$F.go) | grep 'initialization loop' >/dev/null || echo BUG: bug223 +// errorcheck // Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style @@ -18,4 +18,4 @@ func f() { } } -var m = map[string]F{"f": f} +var m = map[string]F{"f": f} // ERROR "initialization loop" diff --git a/test/import2.go b/test/import2.go index 0acfabcc1..5c275f34b 100644 --- a/test/import2.go +++ b/test/import2.go @@ -1,4 +1,4 @@ -// true # used by import3 +// skip # used by import3 // Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/interface/embed0.go b/test/interface/embed0.go index dee8319e4..e2ee20ade 100644 --- a/test/interface/embed0.go +++ b/test/interface/embed0.go @@ -1,4 +1,4 @@ -// true # used by embed1.go +// skip # used by embed1.go // Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/interface/private1.go b/test/interface/private1.go index 9c831a2f4..3281c38be 100644 --- a/test/interface/private1.go +++ b/test/interface/private1.go @@ -1,4 +1,4 @@ -// true # used by private.go +// skip # used by private.go // Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/interface/recursive1.go b/test/interface/recursive1.go index 524dda82c..cc3cdc37f 100644 --- a/test/interface/recursive1.go +++ b/test/interface/recursive1.go @@ -1,4 +1,4 @@ -// true # used by recursive2 +// skip # used by recursive2 // Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/method4a.go b/test/method4a.go index 11fa218f3..d23039bfa 100644 --- a/test/method4a.go +++ b/test/method4a.go @@ -1,4 +1,4 @@ -// true +// skip // Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style diff --git a/test/run.go b/test/run.go index bf79079b6..ac6e3c0e2 100644 --- a/test/run.go +++ b/test/run.go @@ -1,4 +1,4 @@ -// #ignore +// skip // Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style @@ -172,7 +172,7 @@ type test struct { donec chan bool // closed when done src string - action string // "compile", "build", "run", "errorcheck" + action string // "compile", "build", "run", "errorcheck", "skip" tempDir string err error @@ -253,6 +253,9 @@ func (t *test) run() { fallthrough case "compile", "build", "run", "errorcheck": t.action = action + case "skip": + t.action = "skip" + return default: t.err = skipError("skipped; unknown pattern: " + action) t.action = "??" diff --git a/test/testlib b/test/testlib index 4c7d9578b..3858431a7 100644 --- a/test/testlib +++ b/test/testlib @@ -38,3 +38,7 @@ cmpout() { errorcheck() { errchk $G -e $D/$F.go } + +skip() { + true +} |