diff options
author | Russ Cox <rsc@golang.org> | 2009-01-22 14:23:50 -0800 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-01-22 14:23:50 -0800 |
commit | 12d1471dbf58056287afab1d8503d34d45f9c391 (patch) | |
tree | 8f1f0b22a06f9f9be09ed758a30f666c7f40abaa | |
parent | bc1696eb57e876c74d00b5f5512e05956f915ea8 (diff) | |
download | golang-12d1471dbf58056287afab1d8503d34d45f9c391.tar.gz |
let test sources specify commands to run
before their compilation.
R=r
OCL=23300
CL=23300
-rwxr-xr-x | src/cmd/gotest/gotest | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cmd/gotest/gotest b/src/cmd/gotest/gotest index 82cc7381c..d95201ad8 100755 --- a/src/cmd/gotest/gotest +++ b/src/cmd/gotest/gotest @@ -33,6 +33,11 @@ esac ofiles=$(echo $gofiles | sed 's/\.go/.6/g') files=$(echo $gofiles | sed 's/\.go//g') +# Run any commands given in sources, like +# // gotest: 6g foo.go +# to build any test-only dependencies. +sed -n 's/^\/\/ gotest: //p' $gofiles | sh + for i in $gofiles do 6g $i |