Commit e2662835 authored by Shenghou Ma's avatar Shenghou Ma

test: use testlib in a few more cases

        Introduce a new skip cmd.

R=golang-dev, bradfitz, iant, iant
CC=golang-dev
https://golang.org/cl/5868048
parent 3a3c5aad
......@@ -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");
......
// skip
// # generated by cmplxdivide.c
package main
......
// true
// skip
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
......
// (! $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"
// 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
......
// 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
......
// 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
......
// 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
......
// true
// skip
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
......
// #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 = "??"
......
......@@ -38,3 +38,7 @@ cmpout() {
errorcheck() {
errchk $G -e $D/$F.go
}
skip() {
true
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment