diff options
author | Russ Cox <rsc@golang.org> | 2012-03-07 01:54:39 -0500 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2012-03-07 01:54:39 -0500 |
commit | f30aac7243296cd0cdadb944bb4b33980a1b3e7a (patch) | |
tree | 31e8e0e7298c00f105b640fa6342c4ecb71d6271 /test/testlib | |
parent | 76fa5fdd23b4674249e6b1c952691e49e01307e4 (diff) | |
download | go-f30aac7243296cd0cdadb944bb4b33980a1b3e7a.tar.gz |
test: invoke go command in run.go
Lets us run multifile tests and tests with arguments.
R=golang-dev, r
CC=golang-dev
http://codereview.appspot.com/5753068
Diffstat (limited to 'test/testlib')
-rw-r--r-- | test/testlib | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/test/testlib b/test/testlib index 2e4fefc8c..d3178cceb 100644 --- a/test/testlib +++ b/test/testlib @@ -14,7 +14,21 @@ build() { } run() { - $G $D/$F.go && $L $F.$A && ./$A.out "$@" + gofiles="" + ingo=true + while $ingo; do + case "$1" in + *.go) + gofiles="$gofiles $1" + shift + ;; + *) + ingo=false + ;; + esac + done + + $G $D/$F.go "$gofiles" && $L $F.$A && ./$A.out "$@" } cmpout() { |