summaryrefslogtreecommitdiff
path: root/test/testlib
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2012-03-07 01:54:39 -0500
committerRuss Cox <rsc@golang.org>2012-03-07 01:54:39 -0500
commitf30aac7243296cd0cdadb944bb4b33980a1b3e7a (patch)
tree31e8e0e7298c00f105b640fa6342c4ecb71d6271 /test/testlib
parent76fa5fdd23b4674249e6b1c952691e49e01307e4 (diff)
downloadgo-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/testlib16
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() {